Fixed clients being unable to select subs, GUIListBoxes can be scrolled even if selection is disabled

This commit is contained in:
Joonas Rikkonen
2018-01-28 19:14:24 +02:00
parent cdff422920
commit 8b3a089884
2 changed files with 2 additions and 4 deletions

View File

@@ -306,8 +306,6 @@ namespace Barotrauma
UpdateChildrenRect(deltaTime);
if (!enabled) return;
if (scrollBarEnabled && !scrollBarHidden) scrollBar.Update(deltaTime);
if ((MouseOn == this || MouseOn == scrollBar || IsParentOf(MouseOn)) && PlayerInput.ScrollWheelSpeed != 0)

View File

@@ -1434,7 +1434,7 @@ namespace Barotrauma
Submarine sub = Submarine.SavedSubmarines.Find(m => m.Name == subName && m.MD5Hash.Hash == md5Hash);
if (sub == null) sub = Submarine.SavedSubmarines.Find(m => m.Name == subName);
var matchingListSub = subList.children.Find(c => c.UserData == sub) as GUITextBlock;
var matchingListSub = subList.children.Find(c => c.UserData == sub);
if (matchingListSub != null)
{
subList.OnSelected -= VotableClicked;
@@ -1452,7 +1452,7 @@ namespace Barotrauma
else if (sub.MD5Hash.Hash == null)
{
errorMsg = TextManager.Get("SubLoadError").Replace("[subname]", subName) + " ";
if (matchingListSub != null) matchingListSub.TextColor = Color.Red;
if (matchingListSub != null) matchingListSub.GetChild<GUITextBox>().TextColor = Color.Red;
}
else
{