2 CLASS(NexuizCommandButton) EXTENDS(NexuizButton)
3 METHOD(NexuizCommandButton, configureNexuizCommandButton, void(entity, string, vector, string, float))
4 ATTRIB(NexuizCommandButton, onClickCommand, string, "")
5 ATTRIB(NexuizCommandButton, closes, float, 0)
6 ENDCLASS(NexuizCommandButton)
7 entity makeNexuizCommandButton(string theText, vector theColor, string theCommand, float closesMenu);
11 entity makeNexuizCommandButton(string theText, vector theColor, string theCommand, float closesMenu)
14 me = spawnNexuizCommandButton();
15 me.configureNexuizCommandButton(me, theText, theColor, theCommand, closesMenu);
19 void NexuizCommandButton_Click(entity me, entity other)
21 cmd("\n", me.onClickCommand, "\n");
28 void configureNexuizCommandButtonNexuizCommandButton(entity me, string theText, vector theColor, string theCommand, float closesMenu)
30 me.configureNexuizButton(me, theText, theColor);
31 me.onClickCommand = theCommand;
32 me.closes = closesMenu;
33 me.onClick = NexuizCommandButton_Click;
34 me.onClickEntity = me;