if(argv(0) == "directpanelhudmenu")
{
+ highlightedPanel = stof(argv(1));
// switch to a menu item
m_goto("HUDOptions");
+
+ // this is here to detect which id the HUDOptions dialog is, i could imagine you need a similar system for the per-panel dialogs...
entity panelvar;
panelvar = findstring(NULL, name, "HUDOptions");
- panelvar.change(panelvar, stof(argv(1)));
+ panelvar.change(panelvar);
return;
}
#ifdef INTERFACE
CLASS(XonoticHUDOptionsDialog) EXTENDS(XonoticRootDialog)
METHOD(XonoticHUDOptionsDialog, fill, void(entity))
- METHOD(XonoticHUDOptionsDialog, change, void(entity, float))
+ METHOD(XonoticHUDOptionsDialog, change, void(entity))
ATTRIB(XonoticHUDOptionsDialog, title, string, "HUD Setup")
ATTRIB(XonoticHUDOptionsDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
ATTRIB(XonoticHUDOptionsDialog, intendedWidth, float, 0.4)
}
*/
-void changeXonoticHUDOptionsDialog(entity me, float id)
+void changeXonoticHUDOptionsDialog(entity me)
{
loadAllCvars(me);
- highlightedPanel = id;
- print("Yay!", ftos(id), "\n");
-
}
#endif