Replaced the arrows in server lobby buttons with images, made GUIImages rotatable (todo: make them align correctly when rotated/scaled), fixed the size of the sub save warning messagebox

This commit is contained in:
Regalis
2017-02-27 22:28:10 +02:00
parent 979c82443c
commit 9e16542b13
4 changed files with 34 additions and 14 deletions
+9 -2
View File
@@ -515,11 +515,18 @@ namespace Barotrauma
infoButton.UserData = -1;
infoButton.OnClicked += ViewJobInfo;
GUIButton upButton = new GUIButton(new Rectangle(30, 2, 15, 15), "^", GUI.Style, jobText);
GUIButton upButton = new GUIButton(new Rectangle(30, 2, 15, 15), "", GUI.Style, jobText);
//TODO: make GUIImages align correctly when scaled/rotated
//so there's no need to do this ↓
new GUIImage(new Rectangle(3,2,0,0), GUI.Arrow, Alignment.Center, upButton).Scale = 0.6f;
upButton.UserData = -1;
upButton.OnClicked += ChangeJobPreference;
GUIButton downButton = new GUIButton(new Rectangle(50, 2, 15, 15), "˅", GUI.Style, jobText);
GUIButton downButton = new GUIButton(new Rectangle(50, 2, 15, 15), "", GUI.Style, jobText);
var downArrow = new GUIImage(new Rectangle(13,14,0,0), GUI.Arrow, Alignment.Center, downButton);
downArrow.Rotation = MathHelper.Pi;
downArrow.Scale = 0.6f;
downButton.UserData = 1;
downButton.OnClicked += ChangeJobPreference;
}