From 8cac5b2ad2a30779f3055161acffdf0f72509067 Mon Sep 17 00:00:00 2001 From: Regalis Date: Wed, 5 Oct 2016 18:29:55 +0300 Subject: [PATCH] Removed duplicate child update code from GUIListBox --- Subsurface/Source/GUI/GUIListBox.cs | 30 ----------------------------- 1 file changed, 30 deletions(-) diff --git a/Subsurface/Source/GUI/GUIListBox.cs b/Subsurface/Source/GUI/GUIListBox.cs index db7e96de0..987848f4f 100644 --- a/Subsurface/Source/GUI/GUIListBox.cs +++ b/Subsurface/Source/GUI/GUIListBox.cs @@ -287,36 +287,6 @@ namespace Barotrauma { scrollBar.BarScroll -= (PlayerInput.ScrollWheelSpeed / 500.0f) * BarSize; } - - for (int i = 0; i < children.Count; i++) - { - GUIComponent child = children[i]; - if (child == frame || !child.Visible) continue; - - if (enabled && child.CanBeFocused && - (MouseOn == this || (MouseOn != null && this.IsParentOf(MouseOn))) && child.Rect.Contains(PlayerInput.MousePosition)) - { - child.State = ComponentState.Hover; - if (PlayerInput.LeftButtonClicked()) - { - Debug.WriteLine("clicked"); - Select(i); - } - } - else if (selected.Contains(child)) - { - child.State = ComponentState.Selected; - - if (CheckSelected != null) - { - if (CheckSelected() != child.UserData) selected.Remove(child); - } - } - else - { - child.State = ComponentState.None; - } - } } public void Select(int childIndex, bool force = false)