Moved the whitelist UI to server settings, GUITextBoxes can't be selected through other UI elements anymore
This commit is contained in:
@@ -223,26 +223,6 @@ namespace Barotrauma
|
||||
caretVisible = ((caretTimer * 1000.0f) % 1000) < 500;
|
||||
}
|
||||
|
||||
if (rect.Contains(PlayerInput.MousePosition))
|
||||
{
|
||||
|
||||
state = ComponentState.Hover;
|
||||
if (PlayerInput.LeftButtonClicked())
|
||||
{
|
||||
if (MouseOn != null && MouseOn != this && MouseOn!=textBlock && !MouseOn.IsParentOf(this)) return;
|
||||
|
||||
Select();
|
||||
if (OnSelected != null) OnSelected(this, Keys.None);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
state = ComponentState.None;
|
||||
|
||||
}
|
||||
|
||||
textBlock.State = state;
|
||||
|
||||
if (keyboardDispatcher.Subscriber == this)
|
||||
{
|
||||
Character.DisableControls = true;
|
||||
@@ -268,6 +248,24 @@ namespace Barotrauma
|
||||
{
|
||||
if (!Visible) return;
|
||||
|
||||
if (rect.Contains(PlayerInput.MousePosition) && Enabled &&
|
||||
(MouseOn == null || MouseOn == this || IsParentOf(MouseOn) || MouseOn.IsParentOf(this)))
|
||||
{
|
||||
|
||||
state = ComponentState.Hover;
|
||||
if (PlayerInput.LeftButtonClicked())
|
||||
{
|
||||
Select();
|
||||
if (OnSelected != null) OnSelected(this, Keys.None);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
state = ComponentState.None;
|
||||
}
|
||||
|
||||
textBlock.State = state;
|
||||
|
||||
DrawChildren(spriteBatch);
|
||||
|
||||
if (!CaretEnabled) return;
|
||||
|
||||
Reference in New Issue
Block a user