mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
Added $ check for language support for StaticTextSwitchable
This commit is contained in:
parent
eafa394af4
commit
cd4076dc1b
1 changed files with 2 additions and 0 deletions
|
@ -32,6 +32,7 @@
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
#include "v_text.h"
|
#include "v_text.h"
|
||||||
|
#include "gstrings.h"
|
||||||
|
|
||||||
|
|
||||||
void M_DrawConText (int color, int x, int y, const char *str);
|
void M_DrawConText (int color, int x, int y, const char *str);
|
||||||
|
@ -503,6 +504,7 @@ public:
|
||||||
int Draw(FOptionMenuDescriptor *desc, int y, int indent, bool selected)
|
int Draw(FOptionMenuDescriptor *desc, int y, int indent, bool selected)
|
||||||
{
|
{
|
||||||
const char *txt = mCurrent? (const char*)mAltText : mLabel;
|
const char *txt = mCurrent? (const char*)mAltText : mLabel;
|
||||||
|
if (*txt == '$') txt = GStrings(txt + 1);
|
||||||
int w = SmallFont->StringWidth(txt) * CleanXfac_1;
|
int w = SmallFont->StringWidth(txt) * CleanXfac_1;
|
||||||
int x = (screen->GetWidth() - w) / 2;
|
int x = (screen->GetWidth() - w) / 2;
|
||||||
screen->DrawText (SmallFont, mColor, x, y, txt, DTA_CleanNoMove_1, true, TAG_DONE);
|
screen->DrawText (SmallFont, mColor, x, y, txt, DTA_CleanNoMove_1, true, TAG_DONE);
|
||||||
|
|
Loading…
Reference in a new issue