GUIStyle logic changes: instead of having a predetermined GUIComponentStyle for each type of GUIComponent, any GUIComponent can use any style. The GUIComponent constructors take the name of the style as a parameter, and if no style is specified, the default style for the GUIComponent in question will be used.

This commit is contained in:
Regalis
2017-04-07 22:29:07 +03:00
parent 1fe6427c05
commit 3844dd9dac
54 changed files with 484 additions and 475 deletions
+5 -3
View File
@@ -71,13 +71,15 @@ namespace Barotrauma
if (parent != null)
parent.AddChild(this);
box = new GUIFrame(rect, Color.DarkGray, null, this);
box = new GUIFrame(rect, Color.DarkGray, "", this);
box.HoverColor = Color.Gray;
box.SelectedColor = Color.DarkGray;
box.CanBeFocused = false;
text = new GUITextBlock(new Rectangle(rect.Right + 10, rect.Y+2, 20, rect.Height), label, GUI.Style, this, font);
GUI.Style.Apply(box, "", this);
text = new GUITextBlock(new Rectangle(rect.Right + 10, rect.Y+2, 20, rect.Height), label, "", this, font);
this.rect = new Rectangle(box.Rect.X, box.Rect.Y, 240, rect.Height);
Enabled = true;