Merge branch 'UI-overhaul'

Conflicts:
	Subsurface/Source/Screens/EditMapScreen.cs
This commit is contained in:
Regalis
2017-04-20 21:27:40 +03:00
68 changed files with 1044 additions and 782 deletions
+5 -5
View File
@@ -187,18 +187,18 @@ namespace Barotrauma
int width = 450;
int x = GameMain.GraphicsWidth / 2 - width / 2, y = 10;
editingHUD = new GUIFrame(new Rectangle(x, y, width, 100), GUI.Style);
editingHUD = new GUIFrame(new Rectangle(x, y, width, 100), "");
editingHUD.Padding = new Vector4(10, 10, 0, 0);
editingHUD.UserData = this;
new GUITextBlock(new Rectangle(0, 0, 100, 20), "Linked submarine", GUI.Style,
new GUITextBlock(new Rectangle(0, 0, 100, 20), "Linked submarine", "",
Alignment.TopLeft, Alignment.TopLeft, editingHUD, false, GUI.LargeFont);
var pathBox = new GUITextBox(new Rectangle(10,30,300,20), GUI.Style, editingHUD);
var pathBox = new GUITextBox(new Rectangle(10,30,300,20), "", editingHUD);
pathBox.Font = GUI.SmallFont;
pathBox.Text = filePath;
var reloadButton = new GUIButton(new Rectangle(320,30,80,20), "Refresh", GUI.Style, editingHUD);
var reloadButton = new GUIButton(new Rectangle(320,30,80,20), "Refresh", "", editingHUD);
reloadButton.OnClicked = Reload;
reloadButton.UserData = pathBox;
@@ -209,7 +209,7 @@ namespace Barotrauma
if (!inGame)
{
new GUITextBlock(new Rectangle(0, 0, 0, 20), "Hold space to link to a docking port",
GUI.Style, Alignment.TopRight, Alignment.TopRight, editingHUD, false, GUI.SmallFont);
"", Alignment.TopRight, Alignment.TopRight, editingHUD, false, GUI.SmallFont);
y += 25;
}
+3 -5
View File
@@ -657,15 +657,13 @@ namespace Barotrauma
highlightedListBox = new GUIListBox(
new Rectangle((int)PlayerInput.MousePosition.X+15, (int)PlayerInput.MousePosition.Y+15, 150, highlightedEntities.Count * 15),
null, Alignment.TopLeft, GUI.Style, null, false);
highlightedListBox.Color = Color.Black * 0.6f;
null, Alignment.TopLeft, "GUIToolTip", null, false);
foreach (MapEntity entity in highlightedEntities)
{
var textBlock = new GUITextBlock(
new Rectangle(0,0,0,15),
ToolBox.LimitString(entity.Name, GUI.SmallFont, 140), GUI.Style, highlightedListBox, GUI.SmallFont);
ToolBox.LimitString(entity.Name, GUI.SmallFont, 140), "", highlightedListBox, GUI.SmallFont);
textBlock.UserData = entity;
}
+9 -9
View File
@@ -272,28 +272,28 @@ namespace Barotrauma
if (spawnType == SpawnType.Path)
{
new GUITextBlock(new Rectangle(0, 0, 100, 20), "Editing waypoint", GUI.Style, editingHUD);
new GUITextBlock(new Rectangle(0, 20, 100, 20), "Hold space to link to another waypoint", GUI.Style, editingHUD);
new GUITextBlock(new Rectangle(0, 0, 100, 20), "Editing waypoint", "", editingHUD);
new GUITextBlock(new Rectangle(0, 20, 100, 20), "Hold space to link to another waypoint", "", editingHUD);
}
else
{
new GUITextBlock(new Rectangle(0, 0, 100, 20), "Editing spawnpoint", GUI.Style, editingHUD);
new GUITextBlock(new Rectangle(0, 25, 100, 20), "Spawn type: ", GUI.Style, editingHUD);
new GUITextBlock(new Rectangle(0, 0, 100, 20), "Editing spawnpoint", "", editingHUD);
new GUITextBlock(new Rectangle(0, 25, 100, 20), "Spawn type: ", "", editingHUD);
var spawnTypeText = new GUITextBlock(new Rectangle(0, 25, 200, 20), spawnType.ToString(), GUI.Style, Alignment.Right, Alignment.TopLeft, editingHUD);
var spawnTypeText = new GUITextBlock(new Rectangle(0, 25, 200, 20), spawnType.ToString(), "", Alignment.Right, Alignment.TopLeft, editingHUD);
var button = new GUIButton(new Rectangle(-30,0,20,20), "-", Alignment.Right, GUI.Style, spawnTypeText);
var button = new GUIButton(new Rectangle(-30,0,20,20), "-", Alignment.Right, "", spawnTypeText);
button.UserData = -1;
button.OnClicked = ChangeSpawnType;
button = new GUIButton(new Rectangle(0, 0, 20, 20), "+", Alignment.Right, GUI.Style, spawnTypeText);
button = new GUIButton(new Rectangle(0, 0, 20, 20), "+", Alignment.Right, "", spawnTypeText);
button.UserData = 1;
button.OnClicked = ChangeSpawnType;
y = 40 + 20;
new GUITextBlock(new Rectangle(0, y, 100, 20), "ID Card tags:", Color.Transparent, Color.White, Alignment.TopLeft, null, editingHUD);
GUITextBox propertyBox = new GUITextBox(new Rectangle(100, y, 200, 20), GUI.Style, editingHUD);
GUITextBox propertyBox = new GUITextBox(new Rectangle(100, y, 200, 20), "", editingHUD);
propertyBox.Text = string.Join(", ", idCardTags);
propertyBox.OnEnterPressed = EnterIDCardTags;
propertyBox.OnTextChanged = TextBoxChanged;
@@ -302,7 +302,7 @@ namespace Barotrauma
y = y + 30;
new GUITextBlock(new Rectangle(0, y, 100, 20), "Assigned job:", Color.Transparent, Color.White, Alignment.TopLeft, null, editingHUD);
propertyBox = new GUITextBox(new Rectangle(100, y, 200, 20), GUI.Style, editingHUD);
propertyBox = new GUITextBox(new Rectangle(100, y, 200, 20), "", editingHUD);
propertyBox.Text = (assignedJob == null) ? "None" : assignedJob.Name;
propertyBox.OnEnterPressed = EnterAssignedJob;
propertyBox.OnTextChanged = TextBoxChanged;