Client: use Titles_GetTextBody() for the various strings inside the VGUI menus that are specific to TFC
This commit is contained in:
parent
2f10315a9a
commit
0d1a2fa7f7
2 changed files with 26 additions and 26 deletions
|
@ -90,52 +90,52 @@ TFClassButton::OnMouseEntered(void)
|
||||||
|
|
||||||
switch (classSelection) {
|
switch (classSelection) {
|
||||||
case 1:
|
case 1:
|
||||||
lblClassTitle.SetTitle("Scout");
|
lblClassTitle.SetTitle(Titles_GetTextBody("Title_scout"));
|
||||||
imgClassPreview.SetImage(strcat("gfx/vgui/640_scout", teamName));
|
imgClassPreview.SetImage(strcat("gfx/vgui/640_scout", teamName));
|
||||||
lblClassDescription.SetTitle(g_classDescrScout);
|
lblClassDescription.SetTitle(g_classDescrScout);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
lblClassTitle.SetTitle("Sniper");
|
lblClassTitle.SetTitle(Titles_GetTextBody("Title_sniper"));
|
||||||
imgClassPreview.SetImage(strcat("gfx/vgui/640_sniper", teamName));
|
imgClassPreview.SetImage(strcat("gfx/vgui/640_sniper", teamName));
|
||||||
lblClassDescription.SetTitle(g_classDescrSniper);
|
lblClassDescription.SetTitle(g_classDescrSniper);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
lblClassTitle.SetTitle("Soldier");
|
lblClassTitle.SetTitle(Titles_GetTextBody("Title_soldier"));
|
||||||
imgClassPreview.SetImage(strcat("gfx/vgui/640_soldier", teamName));
|
imgClassPreview.SetImage(strcat("gfx/vgui/640_soldier", teamName));
|
||||||
lblClassDescription.SetTitle(g_classDescrSoldier);
|
lblClassDescription.SetTitle(g_classDescrSoldier);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
lblClassTitle.SetTitle("Demoman");
|
lblClassTitle.SetTitle(Titles_GetTextBody("Title_demoman"));
|
||||||
imgClassPreview.SetImage(strcat("gfx/vgui/640_demoman", teamName));
|
imgClassPreview.SetImage(strcat("gfx/vgui/640_demoman", teamName));
|
||||||
lblClassDescription.SetTitle(g_classDescrDemoman);
|
lblClassDescription.SetTitle(g_classDescrDemoman);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
lblClassTitle.SetTitle("Medic");
|
lblClassTitle.SetTitle(Titles_GetTextBody("Title_medic"));
|
||||||
imgClassPreview.SetImage(strcat("gfx/vgui/640_medic", teamName));
|
imgClassPreview.SetImage(strcat("gfx/vgui/640_medic", teamName));
|
||||||
lblClassDescription.SetTitle(g_classDescrMedic);
|
lblClassDescription.SetTitle(g_classDescrMedic);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
lblClassTitle.SetTitle("Heavy Weapons Guy");
|
lblClassTitle.SetTitle(Titles_GetTextBody("Title_hwguy"));
|
||||||
imgClassPreview.SetImage(strcat("gfx/vgui/640_hwguy", teamName));
|
imgClassPreview.SetImage(strcat("gfx/vgui/640_hwguy", teamName));
|
||||||
lblClassDescription.SetTitle(g_classDescrHWGuy);
|
lblClassDescription.SetTitle(g_classDescrHWGuy);
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
lblClassTitle.SetTitle("Pyro");
|
lblClassTitle.SetTitle(Titles_GetTextBody("Title_pyro"));
|
||||||
imgClassPreview.SetImage(strcat("gfx/vgui/640_pyro", teamName));
|
imgClassPreview.SetImage(strcat("gfx/vgui/640_pyro", teamName));
|
||||||
lblClassDescription.SetTitle(g_classDescrPyro);
|
lblClassDescription.SetTitle(g_classDescrPyro);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
lblClassTitle.SetTitle("Spy");
|
lblClassTitle.SetTitle(Titles_GetTextBody("Title_spy"));
|
||||||
imgClassPreview.SetImage(strcat("gfx/vgui/640_spy", teamName));
|
imgClassPreview.SetImage(strcat("gfx/vgui/640_spy", teamName));
|
||||||
lblClassDescription.SetTitle(g_classDescrSpy);
|
lblClassDescription.SetTitle(g_classDescrSpy);
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
lblClassTitle.SetTitle("Engineer");
|
lblClassTitle.SetTitle(Titles_GetTextBody("Title_engineer"));
|
||||||
imgClassPreview.SetImage(strcat("gfx/vgui/640_engineer", teamName));
|
imgClassPreview.SetImage(strcat("gfx/vgui/640_engineer", teamName));
|
||||||
lblClassDescription.SetTitle(g_classDescrEngineer);
|
lblClassDescription.SetTitle(g_classDescrEngineer);
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
lblClassTitle.SetTitle("Random");
|
lblClassTitle.SetTitle(Titles_GetTextBody("RandomPC"));
|
||||||
imgClassPreview.SetImage(strcat("gfx/vgui/640_randompc", teamName));
|
imgClassPreview.SetImage(strcat("gfx/vgui/640_randompc", teamName));
|
||||||
lblClassDescription.SetTitle(g_classDescrRandomPC);
|
lblClassDescription.SetTitle(g_classDescrRandomPC);
|
||||||
break;
|
break;
|
||||||
|
@ -143,16 +143,16 @@ TFClassButton::OnMouseEntered(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
string g_classnames [] = {
|
string g_classnames [] = {
|
||||||
"SCOUT",
|
"Scout",
|
||||||
"SNIPER",
|
"Sniper",
|
||||||
"SOLDIER",
|
"Soldier",
|
||||||
"DEMOMAN",
|
"Demoman",
|
||||||
"MEDIC",
|
"Medic",
|
||||||
"HWGUY",
|
"HWGuy",
|
||||||
"PYRO",
|
"Pyro",
|
||||||
"SPY",
|
"Spy",
|
||||||
"ENGINEER",
|
"Engineer",
|
||||||
"RANDOM"
|
"Random"
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -174,7 +174,7 @@ VGUI_ChooseClass(void)
|
||||||
winClassSelection.SetStyleMask(VGUIWindowBorderless | VGUIWindowFullscreen);
|
winClassSelection.SetStyleMask(VGUIWindowBorderless | VGUIWindowFullscreen);
|
||||||
|
|
||||||
lblSelectClass = spawn(VGUILabel);
|
lblSelectClass = spawn(VGUILabel);
|
||||||
lblSelectClass.SetTitle("SELECT YOUR CLASS");
|
lblSelectClass.SetTitle(Titles_GetTextBody("Title_SelectYourClass"));
|
||||||
lblSelectClass.SetTextSize(19);
|
lblSelectClass.SetTextSize(19);
|
||||||
lblSelectClass.SetPos([40, 38]);
|
lblSelectClass.SetPos([40, 38]);
|
||||||
lblSelectClass.SetSize([400, 24]);
|
lblSelectClass.SetSize([400, 24]);
|
||||||
|
@ -210,7 +210,7 @@ VGUI_ChooseClass(void)
|
||||||
btns = memalloc(sizeof(TFClassButton) * g_classnames.length);
|
btns = memalloc(sizeof(TFClassButton) * g_classnames.length);
|
||||||
for (int i = 0; i < g_classnames.length; i++) {
|
for (int i = 0; i < g_classnames.length; i++) {
|
||||||
btns[i] = spawn(TFClassButton);
|
btns[i] = spawn(TFClassButton);
|
||||||
btns[i].SetTitle(g_classnames[i]);
|
btns[i].SetTitle(Titles_GetTextBody(g_classnames[i]));
|
||||||
btns[i].SetSize([124, 24]);
|
btns[i].SetSize([124, 24]);
|
||||||
btns[i].SetPos(btnpos);
|
btns[i].SetPos(btnpos);
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ VGUI_ChooseTeam_MapInfo(void)
|
||||||
mapinfo = strcat(mapinfo, temp, "\n");
|
mapinfo = strcat(mapinfo, temp, "\n");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mapinfo = "No map info available.";
|
mapinfo = Titles_GetTextBody("Map_Description_not_available");
|
||||||
}
|
}
|
||||||
|
|
||||||
return mapinfo;
|
return mapinfo;
|
||||||
|
@ -81,7 +81,7 @@ VGUI_ChooseTeam(void)
|
||||||
winChooseTeam.SetStyleMask(VGUIWindowBorderless | VGUIWindowFullscreen);
|
winChooseTeam.SetStyleMask(VGUIWindowBorderless | VGUIWindowFullscreen);
|
||||||
|
|
||||||
lblSelectTeam = spawn(VGUILabel);
|
lblSelectTeam = spawn(VGUILabel);
|
||||||
lblSelectTeam.SetTitle("SELECT YOUR TEAM");
|
lblSelectTeam.SetTitle(Titles_GetTextBody("Title_SelectYourTeam"));
|
||||||
lblSelectTeam.SetTextSize(19);
|
lblSelectTeam.SetTextSize(19);
|
||||||
lblSelectTeam.SetPos([40, 38]);
|
lblSelectTeam.SetPos([40, 38]);
|
||||||
lblSelectTeam.SetSize('400 24');
|
lblSelectTeam.SetSize('400 24');
|
||||||
|
@ -131,7 +131,7 @@ VGUI_ChooseTeam(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
btnAutoAssign = spawn(VGUIButton);
|
btnAutoAssign = spawn(VGUIButton);
|
||||||
btnAutoAssign.SetTitle("AUTO ASSIGN");
|
btnAutoAssign.SetTitle(Titles_GetTextBody("Team_AutoAssign"));
|
||||||
btnAutoAssign.SetPos(btnpos);
|
btnAutoAssign.SetPos(btnpos);
|
||||||
btnAutoAssign.SetSize('124 24');
|
btnAutoAssign.SetSize('124 24');
|
||||||
btnAutoAssign.SetKeyEquivalent("5");
|
btnAutoAssign.SetKeyEquivalent("5");
|
||||||
|
@ -139,7 +139,7 @@ VGUI_ChooseTeam(void)
|
||||||
btnpos[1] += 32;
|
btnpos[1] += 32;
|
||||||
|
|
||||||
btnGoSpectator = spawn(VGUIButton);
|
btnGoSpectator = spawn(VGUIButton);
|
||||||
btnGoSpectator.SetTitle("SPECTATE");
|
btnGoSpectator.SetTitle(Titles_GetTextBody("Menu_Spectate"));
|
||||||
btnGoSpectator.SetPos(btnpos);
|
btnGoSpectator.SetPos(btnpos);
|
||||||
btnGoSpectator.SetSize('124 24');
|
btnGoSpectator.SetSize('124 24');
|
||||||
btnGoSpectator.SetKeyEquivalent("6");
|
btnGoSpectator.SetKeyEquivalent("6");
|
||||||
|
|
Loading…
Reference in a new issue