From ac6107ca57b33962fe84c719f756439b4b3e792c Mon Sep 17 00:00:00 2001 From: Jamie Healey Date: Fri, 22 Feb 2019 11:51:06 +0000 Subject: [PATCH 1/2] clear button now is always interactable --- Scripts/Logger/DebugLogPage.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Scripts/Logger/DebugLogPage.cs b/Scripts/Logger/DebugLogPage.cs index f061d17..9bf14bf 100644 --- a/Scripts/Logger/DebugLogPage.cs +++ b/Scripts/Logger/DebugLogPage.cs @@ -1,4 +1,5 @@ -using System.Collections; +using System; +using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; @@ -67,12 +68,13 @@ public PendingLog(string logMessage, string stackTrace, LogType logType) private readonly List allLogs = new List(); private Dictionary logTypeDatas; + public event Action OnLogsCleared; + private void Awake() { entryPrefab.gameObject.SetActive(false); scrollRect.gameObject.SetActive(false); stackTraceContainer.gameObject.SetActive(false); - clearButton.interactable = false; clearButton.onClick.AddListener(Clear); var errorLogData = new LogTypeData(toggleErrorButton, errorIcon); @@ -144,7 +146,6 @@ private void Clear() allLogs.Clear(); - clearButton.interactable = false; scrollRect.gameObject.SetActive(false); } @@ -155,8 +156,6 @@ private void AddLogEntry(string text, string stackTrace, LogType logType) scrollRect.gameObject.SetActive(true); } - clearButton.interactable = true; - var logTypeData = logTypeDatas[logType]; var newLogEntry = Instantiate(entryPrefab, container, false); newLogEntry.transform.SetAsLastSibling(); From eab5129eea3b46b409048c5edeb10561de1b4159 Mon Sep 17 00:00:00 2001 From: Jamie Healey Date: Fri, 22 Feb 2019 11:52:10 +0000 Subject: [PATCH 2/2] remove event --- Scripts/Logger/DebugLogPage.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Scripts/Logger/DebugLogPage.cs b/Scripts/Logger/DebugLogPage.cs index 9bf14bf..7239c1d 100644 --- a/Scripts/Logger/DebugLogPage.cs +++ b/Scripts/Logger/DebugLogPage.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections; +using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; @@ -68,8 +67,6 @@ public PendingLog(string logMessage, string stackTrace, LogType logType) private readonly List allLogs = new List(); private Dictionary logTypeDatas; - public event Action OnLogsCleared; - private void Awake() { entryPrefab.gameObject.SetActive(false);