core/MenuManager.cpp
changeset 2042 4a2faafca477
parent 1952 b7aa2b626807
child 2056 f1fcde46ac7c
     1.1 --- a/core/MenuManager.cpp	Fri May 09 08:22:39 2008 +0000
     1.2 +++ b/core/MenuManager.cpp	Sat May 10 09:23:55 2008 +0000
     1.3 @@ -41,6 +41,7 @@
     1.4  #include "ShareSys.h"
     1.5  #include "HandleSys.h"
     1.6  #include "sourcemm_api.h"
     1.7 +#include "Translator.h"
     1.8  
     1.9  MenuManager g_Menus;
    1.10  VoteMenuHandler s_VoteHandler;
    1.11 @@ -585,14 +586,20 @@
    1.12  				{
    1.13  					if (exitBackButton)
    1.14  					{
    1.15 -						CorePlayerTranslate(client, text, sizeof(text), "Back", NULL);
    1.16 +						if (!CoreTranslate(text, sizeof(text), "%T", 2, NULL, "Back", &client))
    1.17 +						{
    1.18 +							UTIL_Format(text, sizeof(text), "Back");
    1.19 +						}
    1.20  						dr.style = ITEMDRAW_CONTROL;
    1.21  						position = panel->DrawItem(dr);
    1.22  						slots[position].type = ItemSel_ExitBack;
    1.23  					}
    1.24  					else
    1.25  					{
    1.26 -						CorePlayerTranslate(client, text, sizeof(text), "Previous", NULL);
    1.27 +						if (!CoreTranslate(text, sizeof(text), "%T", 2, NULL, "Previous", &client))
    1.28 +						{
    1.29 +							UTIL_Format(text, sizeof(text), "Previous");
    1.30 +						}
    1.31  						dr.style = (displayPrev ? 0 : ITEMDRAW_DISABLED)|ITEMDRAW_CONTROL;
    1.32  						position = panel->DrawItem(dr);
    1.33  						slots[position].type = ItemSel_Back;
    1.34 @@ -610,7 +617,10 @@
    1.35  				/* NEXT */
    1.36  				if (displayNext || canDrawDisabled)
    1.37  				{
    1.38 -					CorePlayerTranslate(client, text, sizeof(text), "Next", NULL);
    1.39 +					if (!CoreTranslate(text, sizeof(text), "%T", 2, NULL, "Next", &client))
    1.40 +					{
    1.41 +						UTIL_Format(text, sizeof(text), "Next");
    1.42 +					}
    1.43  					dr.style = (displayNext ? 0 : ITEMDRAW_DISABLED)|ITEMDRAW_CONTROL;
    1.44  					position = panel->DrawItem(dr);
    1.45  					slots[position].type = ItemSel_Next;
    1.46 @@ -638,7 +648,10 @@
    1.47  		/* EXIT */
    1.48  		if (exitButton)
    1.49  		{
    1.50 -			CorePlayerTranslate(client, text, sizeof(text), "Exit", NULL);
    1.51 +			if (!CoreTranslate(text, sizeof(text), "%T", 2, NULL, "Exit", &client))
    1.52 +			{
    1.53 +				UTIL_Format(text, sizeof(text), "Exit");
    1.54 +			}
    1.55  			dr.style = ITEMDRAW_CONTROL;
    1.56  			position = panel->DrawItem(dr);
    1.57  			slots[position].type = ItemSel_Exit;