Some more hard-coded text removal

This commit is contained in:
Joonas Rikkonen
2017-12-27 14:40:33 +02:00
parent 2894b74edc
commit 4f0b190371
12 changed files with 135 additions and 82 deletions
@@ -97,7 +97,7 @@ namespace Barotrauma
img.Color = order.Color;
img.CanBeFocused = false;
orderListBox.children[characterIndex].ToolTip = "Order: " + order.Name;
orderListBox.children[characterIndex].ToolTip = TextManager.Get("Order") + ": " + order.Name;
}
public bool SelectCharacterOrder(GUIComponent component, object selection)
@@ -48,22 +48,22 @@ namespace Barotrauma
innerFrame.Padding = new Vector4(10.0f, 10.0f, 10.0f, 10.0f);
var crewButton = new GUIButton(new Rectangle(0, -30, 100, 20), "Crew", "", innerFrame);
var crewButton = new GUIButton(new Rectangle(0, -30, 100, 20), TextManager.Get("Crew"), "", innerFrame);
crewButton.UserData = InfoFrameTab.Crew;
crewButton.OnClicked = SelectInfoFrameTab;
var missionButton = new GUIButton(new Rectangle(100, -30, 100, 20), "Mission", "", innerFrame);
var missionButton = new GUIButton(new Rectangle(100, -30, 100, 20), TextManager.Get("Mission"), "", innerFrame);
missionButton.UserData = InfoFrameTab.Mission;
missionButton.OnClicked = SelectInfoFrameTab;
if (GameMain.Server != null)
{
var manageButton = new GUIButton(new Rectangle(200, -30, 130, 20), "Manage players", "", innerFrame);
var manageButton = new GUIButton(new Rectangle(200, -30, 130, 20), TextManager.Get("ManagePlayers"), "", innerFrame);
manageButton.UserData = InfoFrameTab.ManagePlayers;
manageButton.OnClicked = SelectInfoFrameTab;
}
var closeButton = new GUIButton(new Rectangle(0, 0, 80, 20), "Close", Alignment.BottomCenter, "", innerFrame);
var closeButton = new GUIButton(new Rectangle(0, 0, 80, 20), TextManager.Get("Close"), Alignment.BottomCenter, "", innerFrame);
closeButton.OnClicked = ToggleInfoFrame;
}
@@ -94,16 +94,14 @@ namespace Barotrauma
{
if (Mission == null)
{
new GUITextBlock(new Rectangle(0, 0, 0, 50), "No mission", "", infoFrame, true);
new GUITextBlock(new Rectangle(0, 0, 0, 50), TextManager.Get("NoMission"), "", infoFrame, true);
return;
}
new GUITextBlock(new Rectangle(0, 0, 0, 40), Mission.Name, "", infoFrame, GUI.LargeFont);
new GUITextBlock(new Rectangle(0, 50, 0, 20), "Reward: " + Mission.Reward, "", infoFrame, true);
new GUITextBlock(new Rectangle(0, 50, 0, 20), TextManager.Get("MissionReward").Replace("[reward]", Mission.Reward.ToString()), "", infoFrame, true);
new GUITextBlock(new Rectangle(0, 70, 0, 50), Mission.Description, "", infoFrame, true);
}
public void AddToGUIUpdateList()
@@ -38,8 +38,11 @@ namespace Barotrauma
if (singleplayer)
{
string summaryText = TextManager.Get(gameOver ? "gameover" :
(progress ? "progress" : "return"));
string summaryText = TextManager.Get(gameOver ? "RoundSummaryGameOver" :
(progress ? "RoundSummaryProgress" : "RoundSummaryReturn"));
summaryText.Replace("[sub]", Submarine.MainSub.Name);
summaryText.Replace("[location]", GameMain.GameSession.StartLocation.Name);
var infoText = new GUITextBlock(new Rectangle(0, y, 0, 50), summaryText, "", innerFrame, true);
y += infoText.Rect.Height;
@@ -53,7 +56,7 @@ namespace Barotrauma
y += 30 + endText.Text.Split('\n').Length * 20;
}
new GUITextBlock(new Rectangle(0, y, 0, 20), "Crew status:", "", innerFrame, GUI.LargeFont);
new GUITextBlock(new Rectangle(0, y, 0, 20), TextManager.Get("RoundSummaryCrewStatus"), "", innerFrame, GUI.LargeFont);
y += 30;
GUIListBox listBox = new GUIListBox(new Rectangle(0,y,0,90), null, Alignment.TopLeft, "", innerFrame, true);
@@ -75,7 +78,7 @@ namespace Barotrauma
characterInfo.CreateCharacterFrame(characterFrame,
characterInfo.Job != null ? (characterInfo.Name + '\n' + "(" + characterInfo.Job.Name + ")") : characterInfo.Name, null);
string statusText = "OK";
string statusText = TextManager.Get("StatusOK");
Color statusColor = Color.DarkGreen;
Character character = characterInfo.Character;
@@ -88,12 +91,12 @@ namespace Barotrauma
{
if (character.IsUnconscious)
{
statusText = "Unconscious";
statusText = TextManager.Get("Unconscious");
statusColor = Color.DarkOrange;
}
else if (character.Health / character.MaxHealth < 0.8f)
{
statusText = "Injured";
statusText = TextManager.Get("Injured");
statusColor = Color.DarkOrange;
}
}
@@ -110,7 +113,7 @@ namespace Barotrauma
if (GameMain.GameSession.Mission != null)
{
new GUITextBlock(new Rectangle(0, y, 0, 20), "Mission: " + GameMain.GameSession.Mission.Name, "", innerFrame, GUI.LargeFont);
new GUITextBlock(new Rectangle(0, y, 0, 20), TextManager.Get("Mission") + ": " + GameMain.GameSession.Mission.Name, "", innerFrame, GUI.LargeFont);
y += 30;
new GUITextBlock(new Rectangle(0, y, innerFrame.Rect.Width - 170, 0),
@@ -124,7 +127,7 @@ namespace Barotrauma
if (GameMain.GameSession.Mission.Completed && singleplayer)
{
new GUITextBlock(new Rectangle(0, 0, 0, 30), "Reward: " + GameMain.GameSession.Mission.Reward, "", Alignment.BottomLeft, Alignment.BottomLeft, innerFrame);
new GUITextBlock(new Rectangle(0, 0, 0, 30), TextManager.Get("Reward") + ": " + GameMain.GameSession.Mission.Reward, "", Alignment.BottomLeft, Alignment.BottomLeft, innerFrame);
}
}
else