- 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:
Regalis
2017-04-08 22:22:53 +03:00
parent 3844dd9dac
commit 34f0ae39b6
18 changed files with 296 additions and 182 deletions
@@ -176,13 +176,13 @@ namespace Barotrauma
passwordBox.Enabled = false;
passwordBox.UserData = "password";
new GUITextBlock(new Rectangle(columnX[0], 0, 0, 0), serverName, "", serverFrame);
new GUITextBlock(new Rectangle(columnX[0], 0, 0, 0), serverName, "", Alignment.TopLeft, Alignment.CenterLeft, serverFrame);
int playerCount = 0, maxPlayers = 1;
int.TryParse(currPlayersStr, out playerCount);
int.TryParse(maxPlayersStr, out maxPlayers);
new GUITextBlock(new Rectangle(columnX[1], 0, 0, 0), playerCount + "/" + maxPlayers, "", serverFrame);
new GUITextBlock(new Rectangle(columnX[1], 0, 0, 0), playerCount + "/" + maxPlayers, "", Alignment.TopLeft, Alignment.CenterLeft, serverFrame);
var gameStartedBox = new GUITickBox(new Rectangle(columnX[2] + (columnX[3] - columnX[2])/ 2, 0, 20, 20), "", Alignment.TopLeft, serverFrame);
gameStartedBox.Selected = gameStarted == "1";