gzdoom/wadsrc/static/zscript/menu/menu.txt

107 lines
1.9 KiB
Text
Raw Normal View History

enum EMenuKey
{
MKEY_Up,
MKEY_Down,
MKEY_Left,
MKEY_Right,
MKEY_PageUp,
MKEY_PageDown,
MKEY_Enter,
MKEY_Back,
MKEY_Clear,
NUM_MKEYS,
// These are not buttons but events sent from other menus
MKEY_Input,
MKEY_Abort,
MKEY_MBYes,
MKEY_MBNo,
}
class Menu : Object native
{
//native static int MenuTime();
native virtual bool MenuEvent (int mkey, bool fromcontroller);
void MenuSound(Sound snd)
{
S_Sound (snd, CHAN_VOICE | CHAN_UI, snd_menuvolume, ATTN_NONE);
}
}
class MenuDescriptor : Object native
{
native Name mMenuName;
native String mNetgameMessage;
native Class<Menu> mClass;
}
class MenuItemBase : object native
{
native int mXpos, mYpos;
native Name mAction;
native bool mEnabled;
// making this virtual now would require exporting all classes at once.
native /*virtual*/ bool MenuEvent (int mkey, bool fromcontroller);
}
struct FOptionMenuSettings
{
int mTitleColor;
int mFontColor;
int mFontColorValue;
int mFontColorMore;
int mFontColorHeader;
int mFontColorHighlight;
int mFontColorSelection;
int mLinespacing;
}
class OptionMenuDescriptor : MenuDescriptor native
{
native Array<OptionMenuItem> mItems;
native String mTitle;
native int mSelectedItem;
native int mDrawTop;
native int mScrollTop;
native int mScrollPos;
native int mIndent;
native int mPosition;
native bool mDontDim;
//native void CalcIndent();
//native OptionMenuItem GetItem(Name iname);
void Reset()
{
// Reset the default settings (ignore all other values in the struct)
mPosition = 0;
mScrollTop = 0;
mIndent = 0;
mDontDim = 0;
}
}
class OptionMenuItem : MenuItemBase native
{
native String mLabel;
native bool mCentered;
//native void drawLabel(int indent, int y, EColorRange color, bool grayed = false);
}
class OptionMenu : Menu native
{
native bool CanScrollUp;
native bool CanScrollDown;
native int VisBottom;
native OptionMenuItem mFocusControl;
native OptionMenuDescriptor mDesc;
}