More descriptive error message if server ip/port is can't be resolved, updateinfobox automatic scroll

This commit is contained in:
Regalis
2015-10-08 22:55:33 +03:00
parent 709d4efde9
commit 4120cabd6e
8 changed files with 53 additions and 10 deletions

View File

@@ -15,6 +15,8 @@ namespace Subsurface
public delegate bool OnPressedHandler();
public OnPressedHandler OnPressed;
public bool CanBeSelected = true;
public bool Enabled { get; set; }
public override Color Color
@@ -119,7 +121,7 @@ namespace Subsurface
{
if (OnClicked != null)
{
if (OnClicked(this, UserData)) state = ComponentState.Selected;
if (OnClicked(this, UserData) && CanBeSelected) state = ComponentState.Selected;
}
}
}