raze/wadsrc/static/zscript/ui/menu/menucustomize.zs
Christoph Oelckers 0968a9d97e - renamed the Customizer to 'Delegate' because this works very much like a delegate in Objective-C.
- route menu sound calls through the delegate to better deal with differences between games.
2020-10-07 01:00:43 +02:00

17 lines
537 B
Text

// This class allows global customization of certain menu aspects, e.g. replacing the menu caption.
class MenuDelegateBase
{
virtual int DrawCaption(String title, Font fnt, int y, bool drawit)
{
screen.DrawText(fnt, OptionMenuSettings.mTitleColor, (screen.GetWidth() - fnt.StringWidth(title) * CleanXfac_1) / 2, 10 * CleanYfac_1, title, DTA_CleanNoMove_1, true);
return (y + fnt.GetHeight()) * CleanYfac_1; // return is spacing in screen pixels.
}
virtual bool DrawSelector(ListMenuDescriptor desc)
{
return false;
}
}