MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / Create

Method Create

Descent3/newui_core.cpp:830–855  ·  view source on GitHub ↗

creates a menu

Source from the content-addressed store, hash-verified

828
829// creates a menu
830void newuiMenu::Create() {
831 m_nsheets = 0;
832
833 if (!m_bkg) {
834 m_bkg = Newui_resources.Load(NEWUI_MEDWIN_FILE);
835 }
836
837 m_sheetx = NEWUI_MEDWIN_SHEET_X;
838 m_sheety = NEWUI_MEDWIN_SHEET_Y;
839 m_optionsx = NEWUI_MEDWIN_OPTIONS_X;
840 m_optionsy = NEWUI_MEDWIN_OPTIONS_Y;
841 m_optionsw = NEWUI_MEDWIN_OPTIONS_W;
842 m_optionsh = NEWUI_MEDWIN_OPTIONS_H;
843 m_titlex = NEWUI_MEDWIN_TITLE_X;
844 m_titley = NEWUI_MEDWIN_TITLE_Y;
845 m_align = NEWUI_ALIGN_VERT;
846
847 m_uiframe_cb = GetUICallback();
848 m_activate_sheet_cb = NULL;
849 m_option_focus_cb = NULL;
850
851 UIWindow::Create((Max_window_w - m_bkg->width()) / 2, (Max_window_h - m_bkg->height()) / 2, m_bkg->width(),
852 m_bkg->height());
853 m_newoptionid = -1;
854 m_cursheetidx = -1;
855}
856
857// sets current option to display.
858void newuiMenu::SetCurrentOption(int16_t id) { m_newoptionid = id; }

Callers 6

AddOptionMethod · 0.45
AddButtonMethod · 0.45
RealizeMethod · 0.45
AddListBoxMethod · 0.45
AddComboBoxMethod · 0.45
OnAttachToWindowMethod · 0.45

Calls 6

GadgetLargeTextFunction · 0.85
MonitorSmallTextFunction · 0.85
SetHotkeyMethod · 0.80
LoadMethod · 0.45
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected