- Added DrawOptionText function for the options menu.

This commit is contained in:
drfrag 2019-07-10 20:01:14 +02:00
parent a6429a1ae1
commit 08cd080597

View file

@ -304,6 +304,13 @@ class Menu : Object native ui version("2.4")
return OptionFont().StringWidth(s);
}
static void DrawOptionText(int x, int y, int color, String text, bool grayed = false)
{
String label = Stringtable.Localize(text);
int overlay = grayed? Color(96,48,0,0) : 0;
screen.DrawText (OptionFont(), color, x, y, text, DTA_CleanNoMove_1, true, DTA_ColorOverlay, overlay);
}
}
class MenuDescriptor : Object native ui version("2.4")