The "check updates" tickbox in the launcher can be clicked again, nicer changelog formatting in the launcher, setting kb focus to the item searchbox in sub editor automatically

This commit is contained in:
Regalis
2016-12-14 19:53:06 +02:00
parent d6ba825baf
commit 5db3315bf3
3 changed files with 35 additions and 18 deletions
+2 -1
View File
@@ -33,7 +33,8 @@ namespace Barotrauma
public static void ClearUpdateList()
{
if (KeyboardDispatcher.Subscriber is GUIComponent &&
if (keyboardDispatcher != null &&
KeyboardDispatcher.Subscriber is GUIComponent &&
!ComponentsToUpdate.Contains((GUIComponent)KeyboardDispatcher.Subscriber))
{
KeyboardDispatcher.Subscriber = null;
+5 -4
View File
@@ -194,7 +194,6 @@ namespace Barotrauma
GUITextBox searchBox = new GUITextBox(new Rectangle(-20, 0, 180, 15), Alignment.TopRight, GUI.Style, GUItabs[i]);
searchBox.Font = GUI.SmallFont;
searchBox.OnTextChanged = FilterMessages;
GUIComponent.KeyboardDispatcher.Subscriber = searchBox;
var clearButton = new GUIButton(new Rectangle(0, 0, 15, 15), "x", Alignment.TopRight, GUI.Style, GUItabs[i]);
clearButton.OnClicked = ClearFilter;
@@ -601,9 +600,11 @@ namespace Barotrauma
{
selectedTab = (int)obj;
ClearFilter(GUItabs[selectedTab].GetChild<GUIButton>(), null);
GUIComponent.KeyboardDispatcher.Subscriber = GUItabs[selectedTab].GetChild<GUITextBox>();
var searchBox = GUItabs[selectedTab].GetChild<GUITextBox>();
ClearFilter(searchBox, null);
searchBox.AddToGUIUpdateList();
searchBox.Select();
return true;
}