- Sliced sprites are scaled instead of tiling (so they work properly even if the UI element is smaller than the sprite)
- Option to use separate sprites for different states of a GUIComponent (e.g. hovered/pressed button) - Option to configure "child styles" for the individual elements of a GUIComponent (e.g. the background frame and the handle of a scroll bar)
This commit is contained in:
@@ -81,17 +81,13 @@ namespace Barotrauma
|
||||
|
||||
if (parent != null) parent.AddChild(this);
|
||||
|
||||
button = new GUIButton(this.rect, text, Color.White, Alignment.TopLeft, Alignment.TopLeft, null, null);
|
||||
|
||||
button.TextColor = Color.White;
|
||||
button.Color = Color.Black * 0.8f;
|
||||
button.HoverColor = Color.DarkGray * 0.8f;
|
||||
button.OutlineColor = Color.LightGray * 0.8f;
|
||||
button = new GUIButton(this.rect, text, Color.White, Alignment.TopLeft, Alignment.CenterLeft, "GUIDropDown", null);
|
||||
GUI.Style.Apply(button, style, this);
|
||||
|
||||
button.OnClicked = OnClicked;
|
||||
|
||||
listBox = new GUIListBox(new Rectangle(this.rect.X, this.rect.Bottom, this.rect.Width, 200), style, null);
|
||||
listBox.OnSelected = SelectItem;
|
||||
//listBox.ScrollBarEnabled = false;
|
||||
}
|
||||
|
||||
public override void AddChild(GUIComponent child)
|
||||
|
||||
Reference in New Issue
Block a user