/////////////////////////////////////////////// // Custom Menu Header File /////////////////////// // This file belongs to dpmod/darkplaces // AK contains menu specific stuff that is made especially for dpmod // AK this file is used e.g. for defining some special event functions /////////////////////////////////////////////// /*Templates Sliders with text and description: ---------------------------------- Template Params: cccc - Name of the text (on the left of the menu) nnn - Name of the object group ppp - Parent of the object group ccvv - Name of the cvar yypp - y position ////// // cccc //// // Menu Button { type ITEM_TEXTBUTTON name ppp_nnn_text parent ppp text "cccc" pos "0 yypp 0" origin "0 yypp 0" //font_size "10 10 0" alignment 16 // TEXT_ALIGN_LEFTPOS flag 256 // FLAG_AUTOSETCLICK key nex_redirect_key // redirects input to the child } // Slider { type ITEM_SLIDER name ppp_nnn_slider parent ppp_nnn_text //pos "10 yypp 0" pos "10 0 0" size "100 8 0" //size "100 10 0" flag 260 // FLAG_AUTOSETCLICK | FLAG_NOSELECT cvarname "ccvv" cvartype 1 // CVAR_INT min_value 240 max_value 1536 step 25.92 init nex_cvar_slider } // Text { type ITEM_TEXT name ppp_nnn_slidertext parent ppp_nnn_text link ppp_nnn_slider //pos "120 yypp 0" pos "120 0 0" //font_size "10 10 0" maxlen 4 init nex_slidertext } Text switch with text : cccc - name of it (and caption of the text) ppp - parent nnn - name of the object group yypp - y position of the object group ccvv - name of the cvar ssss - switches 'No' 'Yes' ////// // cccc //// // Text { type ITEM_TEXTBUTTON name ppp_nnn_text parent ppp text "cccc" pos "0 yypp 0" origin "0 yypp 0" //font_size "10 10 0" alignment 16 // TEXT_ALIGN_RIGHTPOS flag 256 // FLAG_AUTOSETCLICK key nex_redirect_key } // Switch { type ITEM_TEXTSWITCH name ppp_nnn_switch parent ppp_nnn_text //pos "10 yypp 0" pos "10 0 0" //font_size "10 10 0" flag 260 // FLAG_AUTOSETCLICK | FLAG_NOSELECT text "ssss" cvarname "ccvv" cvartype 1 // CVAR_INT reinit nex_cvar_slider // can use it also here } */ // global stuff .string cvarname; .float cvartype; //.string cvarvalues; const float CVAR_FLOAT = 0; const float CVAR_INT = 1; //const float CVAR_STRING = 2; const float CVAR_STEP = 4; .entity _link; //.float maxlen; // <- ITEM_EDITBOX void(void) nex_cvar_slider; // set reinit to this void(void) _nex_cvar_slider_refresh; void(void) _nex_cvar_slider; float(float keynr, float ascii) nex_redirect_key; void(void) nex_slidertext; void(void) _nex_slidertext_refresh; // option menu stuff void(void) nex_options_alwaysrun_switchchange; void(void) nex_options_alwaysrun_refresh; void(void) nex_options_invmouse_switchchange; void(void) nex_options_invmouse_refresh; // quit message stuff const float DPMOD_QUIT_MSG_COUNT = 4; string nex_quitmsg_0 = "'Tired of fragging''already ?'", nex_quitmsg_1 = "'Quit now and forfeit''your bodycount ?'", nex_quitmsg_2 = "'Are you sure you''want to quit ?'", nex_quitmsg_3 = "'Off to do something''constructive ?'"; float nex_quitrequest; void(void) nex_quit_choose; void(void) nex_quit; void(void) nex_quit_yes; void(void) nex_quit_no; float(float keynr, float ascii) nex_quit_key;