1 ///////////////////////////////////////////////
2 // Custom Menu Source File
3 ///////////////////////
4 // This file belongs to dpmod/darkplaces
5 // AK contains menu specific stuff that is made especially for dpmod
6 // AK this file is used e.g. for defining some special event functions
7 ////////////////////////////////////////////////
13 void() nex_setposition =
16 self.pos_y = (self.font_size_y + 5) * self.orderpos;
19 self.origin = self.pos;
22 void(entity item) nex_makeonlyvisible =
26 if( item.flag & FLAG_HIDDEN )
27 item.flag = item.flag - FLAG_HIDDEN;
28 for( node = item._next ; node ; node = node._next )
29 node.flag = item.flag | FLAG_HIDDEN;
30 for( node = item._prev ; node ; node = node._prev )
31 node.flag = item.flag | FLAG_HIDDEN;
34 void(void) nex_linkrelhack =
36 self._child._parent = self;
39 void(void) nex_maketextzone =
41 self.text = strzone(self.text);
44 void(void) nex_slidertext =
49 print("No link specified\n");
51 self.init = null_function;
55 ent = menu_getitem(self.link);
56 if(ent == null_entity)
58 objerror("No link found for ", self.link,"\n");
63 self.flag = self.flag | FLAG_DRAWREFRESHONLY;
65 self.refresh = _nex_slidertext_refresh;
68 void(void) _nex_slidertext_refresh =
70 self.text = ftos(self._link.value);
72 self.text = substring(self.text,0, self.maxlen);
73 // reset the size, so its set
77 float(float keynr, float ascii) nex_redirect_key =
79 if((ascii>=20 && ascii <= 126) || keynr == K_BACKSPACE || keynr == K_ENTER || keynr == K_LEFTARROW || keynr == K_RIGHTARROW || (keynr >= K_MOUSE1 && keynr <= K_MOUSE10))
81 raise_key(self._child, keynr, ascii);
87 void(void) nex_cvar_slider =
89 self.value = cvar(self.cvarname);
90 self.slidermove = self.switchchange = _nex_cvar_slider;
91 self.refresh = _nex_cvar_slider_refresh;
94 void(void) _nex_cvar_slider_refresh =
96 if(self.cvartype == CVAR_INT || self.cvartype == CVAR_FLOAT || self.cvartype == CVAR_STEP)
97 self.value = cvar(self.cvarname);
100 void(void) _nex_cvar_slider =
102 if(self.cvarname == "")
104 if(self.cvartype == CVAR_INT) // || self.cvartype == CVAR_STRING)
105 self.value = rint(self.value);
106 if(self.cvartype == CVAR_STEP)
107 self.value = rint(self.value / self.step) * self.step;
108 if(self.cvartype == CVAR_INT || self.cvartype == CVAR_FLOAT || self.cvartype == CVAR_STEP)
109 cvar_set(self.cvarname, ftos(self.value));
110 /*if(cvartype == CVAR_STRING)
113 s = getaltstring(self.value, self.cvarvalues);
114 cvar_set(self.cvarname, s);
123 void(void) nex_makeselfonlyvisible =
125 nex_makeonlyvisible( self );
130 void(void) nex_quit_choose =
133 // because of the missing support for real array, we have to do it the stupid way
134 // (we also have to use strzone for the text, cause it the temporary strings wont work
136 if(nex_quitrequest == 0)
138 e = menu_getitem("quit_msg_0");
139 e.text = getaltstring(0,nex_quitmsg_0);
141 if(nex_quitrequest == 1)
143 e = menu_getitem("quit_msg_0");
144 e.text = getaltstring(0,nex_quitmsg_1);
146 if(nex_quitrequest == 2)
148 e = menu_getitem("quit_msg_0");
149 e.text = getaltstring(0,nex_quitmsg_2);
151 if(nex_quitrequest == 3)
153 e = menu_getitem("quit_msg_0");
154 e.text = getaltstring(0,nex_quitmsg_3);
156 e.text = strzone(e.text);
158 if(nex_quitrequest == 0)
160 e = menu_getitem("quit_msg_1");
161 e.text = getaltstring(1,nex_quitmsg_0);
163 if(nex_quitrequest == 1)
165 e = menu_getitem("quit_msg_1");
166 e.text = getaltstring(1,nex_quitmsg_1);
168 if(nex_quitrequest == 2)
170 e = menu_getitem("quit_msg_1");
171 e.text = getaltstring(1,nex_quitmsg_2);
173 if(nex_quitrequest == 3)
175 e = menu_getitem("quit_msg_1");
176 e.text = getaltstring(1,nex_quitmsg_3);
178 e.text = strzone(e.text);
180 nex_quitrequest = nex_quitrequest + 1;
181 if(nex_quitrequest == DPMOD_QUIT_MSG_COUNT)
185 void(void) nex_quit =
188 // choose a quit message
192 ent = menu_getitem("main");
193 ent.flag = ent.flag | FLAG_CHILDDRAWONLY;
194 ent = menu_getitem("quit");
195 ent.flag = FLAG_NOSELECT;
196 menu_jumptowindow(ent, false);*/
200 ent = menu_getitem("quitbox_ref");
201 ent._child = menu_activewindow;
202 ent = menu_getitem("quitbox");
203 menu_jumptowindow(ent, true);
206 void(void) nex_quit_yes =
211 void(void) nex_quit_no =
215 ent = menu_getitem("quit_msg_0");
218 ent = menu_getitem("quit_msg_1");
221 ent = menu_getitem("quit");
222 ent.flag = FLAG_HIDDEN;
223 ent = menu_getitem("main");
224 ent.flag = ent.flag - FLAG_CHILDDRAWONLY;
229 float(float keynr, float ascii) nex_quit_key =
231 if(keynr == K_LEFTARROW)
233 if(keynr == K_RIGHTARROW)
237 if(keynr == K_MOUSE1)
239 if(ascii == 'Y' || ascii == 'y')
241 if(ascii == 'N' || ascii == 'n' || keynr == K_ESCAPE)
248 void(void) nex_display_options =
252 ent = menu_getitem( "options" );
254 nex_makeonlyvisible( ent );
255 menu_jumptowindow( ent, false );
261 void(void) nex_display_video =
263 nex_makeonlyvisible( menu_getitem( "video" ) );
264 menu_jumptowindow( menu_getitem( "video" ), false );
267 void(void) nex_video_bpp_reinit =
269 if(cvar("vid_bitsperpixel") == 32)
275 void(void) nex_video_fullscreen_reinit =
277 self.value = cvar("vid_fullscreen");
280 string nex_video_resolutions;
282 void(void) nex_video_resolution_switch_reinit =
287 c = getaltstringcount(nex_video_resolutions);
288 for(i = 0; i < c; i=i+1)
292 s = getaltstring(i,nex_video_resolutions);
293 s = strcat("'",s,"'");
295 if(t_x == cvar("vid_width") && t_y == cvar("vid_height"))
307 void(void) nex_video_resolution_switch =
310 var float counter = 0;
313 nex_video_resolutions = "";
317 while((t = getresolution(counter)) != '0 0 0')
321 if(t_x == cvar("vid_width") && t_y == cvar("vid_height"))
323 self.value = counter;
325 counter = counter + 1;
326 self.text = strcat(self.text,"'",ftos(t_x),"x");
327 self.text = strcat(self.text,ftos(t_y),"'");
328 nex_video_resolutions = strcat(nex_video_resolutions,vtos(t));
334 self.text = strzone(self.text);
335 nex_video_resolutions = strzone(nex_video_resolutions);
337 self.reinit = nex_video_resolution_switch;
340 void(void) nex_video_apply =
349 res_x = cvar("vid_width");
350 res_y = cvar("vid_height");
353 tmp = menu_getitem("video_resolution_switch");
354 set = stov(getaltstring(tmp.value, nex_video_resolutions));
357 cvar_set("vid_width",ftos(set_x));
358 cvar_set("vid_height",ftos(set_y));
362 tmp = menu_getitem("video_bpp_switch");
363 if((tmp.value+1)*16 != cvar("vid_bitsperpixel"))
365 cvar_set("vid_bitsperpixel",ftos((tmp.value+1)*16));
368 // fullscreen changed
369 tmp = menu_getitem("video_fullscreen_switch");
370 if(tmp.value != cvar("vid_fullscreen"))
372 cvar_set("vid_fullscreen",ftos(tmp.value));
378 cmd("vid_restart\n");
398 // picture = picture filename
400 void(entity node) _nex_xp_remove =
402 strunzone( node.picture );
403 strunzone( node.text );
404 strunzone( node.name );
408 void(void) _nex_xp_update =
412 item = menu_getitem( "multiplayer_map_name" );
413 item.text = maps_current.name;
415 item = menu_getitem( "multiplayer_map_picture" );
416 item.picture = maps_current.picture;
418 item = menu_getitem( "multiplayer_map_info" );
419 item.text = maps_current.text;
422 void(void) nex_xp_enummaps =
428 // remove the old list
433 while( node._next ) {
435 _nex_xp_remove( node._prev );
437 _nex_xp_remove( node );
439 maps_list = maps_current = null_entity;
441 searchhandle = search_begin( "maps/*.bsp", true, true );
442 if( searchhandle == -1 ) {
443 print( "menu: No maps found!\n" );
445 } else if( searchhandle == -2)
448 maps_list = maps_current = spawn();
449 count = search_getsize( searchhandle );
450 for( counter = 0 ; counter < count ; counter = counter + 1 ) {
454 fname = search_getfilename( searchhandle, counter );
455 fname = substring( fname, 0, strlen( fname ) - 4 );
456 fname = strzone( fname );
458 //try to find the information text
459 file = fopen( strcat( fname, ".txt" ), FILE_READ );
461 maps_current.text = strzone( "--NO INFORMATION AVAILABLE--" );
464 maps_current.text = strzone( "" );
466 old = maps_current.text;
467 temp = fgets( file );
468 maps_current.text = strzone( strcat( old, temp, "\n" ) );
474 //try to find the picture
475 file = search_begin( strcat( fname, ".jpg" ), true, true );
477 maps_current.picture = strzone( "gfx/m_nomap" );
479 maps_current.picture = strzone( strcat( fname, ".jpg" ) );
483 maps_current.name = strzone( substring( fname, 5, strlen( fname ) - 5 ) ); // remove the 'maps/'
486 // create next item and link it with the list
487 maps_current._next = spawn();
488 maps_current._next._prev = maps_current;
489 maps_current = maps_current._next;
491 // remove the last item
492 maps_current = maps_current._prev;
493 remove( maps_current._next );
494 maps_current._next = null_entity;
496 search_end( searchhandle );
498 maps_current = maps_list;
502 void(void) nex_xp_prev =
504 if( maps_current._prev )
505 maps_current = maps_current._prev;
509 void(void) nex_xp_next =
511 if( maps_current._next )
512 maps_current = maps_current._next;
517 void(void) nex_display_multiplayer =
519 nex_makeonlyvisible( menu_getitem( "multiplayer" ) );
520 menu_jumptowindow( menu_getitem( "multiplayer" ), false );
523 void(void) nex_xp_maxfrags =
529 strunzone(self.text);
531 self.text = strzone(self.text);
534 void(void) nex_xp_maxbots =
540 strunzone(self.text);
542 self.text = strzone(self.text);
545 void(void) nex_xp_maxtime =
551 strunzone(self.text);
552 self.text = ftos(maxtime);
553 self.text = strzone(self.text);
556 void(void) nex_sp_start =
560 cvar_set("fraglimit", ftos(maxfrags));
561 cvar_set("timelimit", ftos(maxtime));
562 cvar_set("deathmatch", ftos(1));
563 cvar_set("maxplayers", ftos(maxbots + 1));
565 cmd(maps_current.name);
566 cmd(";wait;togglemenu;wait;");
568 // BLACK: TODO - change this somewhen into something cleaner - see bot/bot.qc
569 //if(maxbots && maxbots <= (99 - 40 + 1))
572 t = strcat("impulse ", ftos(40 + maxbots - 1));
580 void(void) nex_mp_hostname =
582 hostname = self.text;
585 void(void) nex_mp_maxclients =
589 maxclients = rint(i);
591 strunzone(self.text);
592 self.text = strzone(ftos(maxclients));
595 void(void) nex_mp_publicserv =
597 publicserver = self.value;
600 void(void) nex_mp_start =
602 cvar_set("fraglimit", ftos(maxfrags));
603 cvar_set("timelimit", ftos(maxtime));
604 cvar_set("deathmatch", ftos(1));
605 cvar_set("maxplayers", ftos(maxclients));
606 cvar_set("sv_public", ftos(publicserver));
607 cvar_set("hostname", hostname);
609 cmd(maps_current.name);
610 cmd(";wait;togglemenu\n");
613 void(void) nex_goto_createserver =
615 menu_jumptowindow( menu_getitem( "multiplayer_frame"), false );
618 void(void) nex_draw_text =
620 local vector drawpos;
621 local float cpos, end;
625 drawpos_y = drawpos_y + self.font_size_y;
630 end = strlen( self.text );
633 l = substring( self.text, i, 1 );
643 l = substring( self.text, cpos, end - cpos );
645 menu_drawstring( drawpos, l, self.font_size, self.color, self.alpha, self.drawflag );
646 drawpos_y = drawpos_y + self.font_size_y;
649 } while( end != strlen( self.text ) );
653 var float slist_selected = 0;
654 var float slist_start = 0;
655 float slist_estimatedsize;
657 void(void) nex_display_serverlist =
659 if(menu_activewindow.name == "serverlist")
661 menu_jumptowindow(menu_getitem("serverlist"),true);
665 // use a ITEM_TEXT as base item for this
666 // we need another item to clip the slist
667 // (another reason for a new menu qc!)
668 void(void) slist_draw =
674 //print("slist drawing...", ftos(listsize), "\n");
676 pos = '0 0 0'; // the upper item sets the origin
677 listsize = gethostcachevalue(SLIST_HOSTCACHECOUNT);
680 menu_drawstring(pos, "No Servers", self.font_size, self.color, self.alpha, self.drawflag);
684 for(c = 0; c < slist_estimatedsize + 1; c = c + 1)
688 if(listsize <= slist_start + c)
691 //print("drawing ", ftos(c),"\n");
693 if(slist_selected - slist_start == c)
697 s_y = self.font_size_y * 2;
699 menu_fillarea(pos, s, self.color_selected, self.alpha_selected * (sin(time * 9) + 1) / 2, self.drawflag_selected);
702 line = gethostcachestring(SLIST_LINE1, slist_start + c);
704 menu_drawstring(pos, line, self.font_size, self.color, self.alpha, self.drawflag);
706 pos_y = pos_y + self.font_size_y;
708 line = gethostcachestring(SLIST_LINE2, slist_start + c);
710 menu_drawstring(pos, line, self.font_size, self.color, self.alpha, self.drawflag);
712 pos_y = pos_y + self.font_size_y;
716 void(void) slist_init =
718 self.size = self._parent.size;
719 slist_estimatedsize = self.size_y / self.font_size_y / 2;
722 void(void) slist_refresh =
726 hostcachesize = gethostcachevalue(SLIST_HOSTCACHECOUNT);
727 if(slist_start >= hostcachesize)
728 slist_start = ceil(hostcachesize - slist_estimatedsize);
731 if(slist_selected >= hostcachesize)
732 slist_selected = hostcachesize;
735 void(void) slist_join =
738 cname = gethostcachestring(SLIST_CNAME, slist_selected);
744 cmd(" ;togglemenu\n");
748 float(float keynr, float ascii ) slist_key =
752 if(keynr == K_UPARROW)
754 if(slist_selected > 0)
755 slist_selected = slist_selected - 1;
756 if(slist_start > slist_selected)
757 slist_start = slist_selected;
759 } else if(keynr == K_DOWNARROW)
761 listsize = gethostcachevalue(SLIST_HOSTCACHECOUNT);
762 if(slist_selected < listsize - 1)
763 slist_selected = slist_selected + 1;
764 if(slist_start + slist_estimatedsize - 0.5 < slist_selected)
765 slist_start = ceil(slist_selected - slist_estimatedsize + 0.5);
767 } else if(keynr == K_ENTER)
771 } else if(keynr == K_SPACE)
775 } else if(keynr == K_MOUSE1)
779 listsize = gethostcachevalue(SLIST_HOSTCACHECOUNT);
780 pos = floor(menu_cursor_y / self.font_size_y / 2);
782 if(pos + slist_start == slist_selected)
784 else if(pos + slist_start < listsize)
785 slist_selected = pos;
791 void(void) slist_info1 =
796 query = gethostcachevalue(SLIST_MASTERQUERYCOUNT);
797 reply = gethostcachevalue(SLIST_MASTERREPLYCOUNT);
799 strunzone(self.text);
801 temp = strcat(ftos(reply), "/");
802 temp = strcat(temp, ftos(query), " Master Servers");
804 self.text = strzone(temp);
807 void(void) slist_info2 =
812 query = gethostcachevalue(SLIST_SERVERQUERYCOUNT);
813 reply = gethostcachevalue(SLIST_SERVERREPLYCOUNT);
815 strunzone(self.text);
817 temp = strcat(ftos(reply), "/");
818 temp = strcat(temp, ftos(query), " Game Servers");
820 self.text = strzone(temp);
827 void(void) nex_options_alwaysrun_switchchange =
831 cvar_set("cl_forwardspeed","400");
832 cvar_set("cl_backspeed","400");
836 cvar_set("cl_forwardspeed","200");
837 cvar_set("cl_backspeed","200");
841 void(void) nex_options_alwaysrun_refresh =
843 if(cvar("cl_forwardspeed") > 200)
849 void(void) nex_options_invmouse_switchchange =
852 old = 0 - cvar("m_pitch");
853 cvar_set("m_pitch",ftos(old));
856 void(void) nex_options_invmouse_refresh =
858 if(cvar("m_pitch") > 0)
867 ent = menu_getitem("options_sound");
868 nex_makeonlyvisible( ent );
869 menu_jumptowindow(ent, false);
872 void(void) nex_snd_cd_init =
874 if(cvar("cdaudioinitialized"))
876 self.flag = FLAG_AUTOSETCLICK;
877 self.color = ITEM_TEXT_NORMAL_COLOR;
881 self.flag = FLAG_NOSELECT | FLAG_DRAWONLY | FLAG_CHILDDRAWONLY;
882 self.color = '0.5 0.5 0.5';
886 void(void) nex_snd_snd_init =
888 if(cvar("snd_initialized"))
890 self.flag = FLAG_AUTOSETCLICK;
891 self.color = ITEM_TEXT_NORMAL_COLOR;
895 self.flag = FLAG_NOSELECT | FLAG_DRAWONLY | FLAG_CHILDDRAWONLY;
896 self.color = '0.5 0.5 0.5';
903 ent = menu_getitem("options_cc");
904 nex_makeonlyvisible( ent );
905 menu_jumptowindow(ent, false);
908 void(void) nex_cc_reset =
928 void(void) nex_cc_check_hwgamma =
930 if(cvar("vid_hardwaregammasupported"))
932 self.flag = FLAG_AUTOSETCLICK;
933 self.color = ITEM_TEXT_NORMAL_COLOR;
937 self.flag = FLAG_NOSELECT;
938 self.color = '0.5 0.5 0.5';
942 void(void) nex_cc_check_gamma = // used in key -- BADBAD HACKHACK
944 if(cvar("v_hwgamma") && cvar("vid_hardwaregammasupported") && !cvar("v_color_enable"))
946 self.flag = FLAG_AUTOSETCLICK;
947 self.color = ITEM_TEXT_NORMAL_COLOR;
951 self.flag = FLAG_NOSELECT;
952 self.color = '0.5 0.5 0.5';
956 void(void) nex_cc_check_grey = // used in key -- BADBAD HACKHACK
958 if(cvar("v_hwgamma") && cvar("vid_hardwaregammasupported") && cvar("v_color_enable"))
960 self.flag = FLAG_AUTOSETCLICK;
961 self.color = ITEM_TEXT_NORMAL_COLOR;
965 self.flag = FLAG_NOSELECT;
966 self.color = '0.5 0.5 0.5';
970 void(void) nex_cc_check_ncolor_enable =
972 if(!cvar("v_color_enable"))
974 self.flag = FLAG_AUTOSETCLICK;
975 self.color = ITEM_TEXT_NORMAL_COLOR;
979 self.flag = FLAG_NOSELECT;
980 self.color = '0.5 0.5 0.5';
984 void(void) nex_cc_check_color_enable =
986 if(cvar("v_color_enable"))
988 self.flag = FLAG_AUTOSETCLICK;
989 self.color = ITEM_TEXT_NORMAL_COLOR;
993 self.flag = FLAG_NOSELECT;
994 self.color = '0.5 0.5 0.5';
998 void(void) nex_cc_color_enable =
1000 cvar_set("v_color_enable","1");
1003 void(void) nex_cc_ncolor_enable =
1005 cvar_set("v_color_enable","0");
1008 void(void) nex_cc_grey_refresh =
1010 self.value = cvar(strcat(self.cvarname,"_r"));
1011 self.value = self.value + cvar(strcat(self.cvarname,"_g"));
1012 self.value = self.value + cvar(strcat(self.cvarname,"_b"));
1013 self.value = self.value / 3;
1017 void(void) nex_cc_grey_move =
1020 tmp = ftos(self.value);
1021 cvar_set(strcat(self.cvarname,"_r"), tmp);
1022 cvar_set(strcat(self.cvarname,"_g"), tmp);
1023 cvar_set(strcat(self.cvarname,"_b"), tmp);
1026 void(void) nex_cc_grey =
1028 self.refresh = nex_cc_grey_refresh;
1029 self.slidermove = nex_cc_grey_move;
1032 // key control stuff
1033 void(void) nex_cntrl =
1036 ent = menu_getitem("options_control");
1037 nex_makeonlyvisible( ent );
1038 menu_jumptowindow(ent, false);
1041 const float NUMKEYS = 2; // visible key count (first and secondary key)
1044 void(float keynr, float ascii) nex_con_keyhook =
1048 //dprint("nex_con_keyhook called !\n");
1050 if(keynr != K_ESCAPE)
1053 tmp = bind_getkeylist(bindcommand);
1054 // remove the binds if we need more space
1055 bind_limitbinds(NUMKEYS - 1, bindcommand);
1057 bind_bindkey(bind_getstringforkey(keynr), bindcommand);
1060 ent = menu_getitem("options_control_statemsg1");
1063 ent = menu_getitem("options_control_statemsg2");
1066 menu_keyhook = null_function;
1069 void(void) nex_con_action_key =
1073 bindcommand = self.link;
1075 //dprint("action called");
1077 menu_keyhook = nex_con_keyhook;
1079 ent = menu_getitem("options_control_statemsg1");
1082 ent = menu_getitem("options_control_statemsg2");
1086 float(float keynr, float ascii) nex_con_key =
1090 // the user wants to unbind this action
1091 //dprint("Removing binds for '", self.link,"'\n");
1092 bind_limitbinds(0, self.link);
1099 void(void) nex_con_update_keys =
1108 keystr = strzone(bind_getkeylist(self.link));
1112 for(ent = self._child; ent != null_entity; ent = ent._next)
1116 keynr = stof(getaltstring(num, keystr));
1118 strunzone(ent.text);
1121 ent.text = strzone("-");
1123 ent.text = strzone(bind_getstringforkey(keynr));
1131 var float numkey = 0;
1132 void(void) CONTROL_KEY =
1134 entity key1, key2, desc;
1135 entity temp_desc, temp_key;
1137 temp_desc = menu_getitem("control_desc_template");
1138 temp_key = menu_getitem("control_key_template");
1141 copyentity(temp_desc, desc);
1144 copyentity(temp_key, key1);
1147 copyentity(temp_key, key2);
1149 desc.name = self.text;
1150 key1.name = strzone(strcat(self.text, " key1"));
1151 key2.name = strzone(strcat(self.text, " key2"));
1153 desc.pos_y = key1.pos_y = key2.pos_y = temp_desc.pos_y * numkey;
1154 key2.pos_x = 2 * key2.pos_x;
1156 desc.text = self.text;
1157 desc.link = self.link;
1159 key1.text = strzone("-");
1160 key2.text = strzone("-");
1165 desc.parent = "options_control";
1166 desc._parent = menu_getitem("options_control");
1168 key1.parent = key2.parent = desc.name;
1169 key1._parent = key2._parent = desc;
1175 numkey = numkey + 1;
1178 ////////////////////////////////////////////////////
1181 void(void) initbrightness =
1183 self.value = cvar("scr_conbrightness");
1186 void(void) setbrightness =
1188 cvar_set("scr_conbrightness",ftos(self.value));
1191 void(void) nex_main_exit =
1194 e = menu_getitem("MAIN_MENU");
1195 e.flag = FLAG_NOSELECT + FLAG_CHILDDRAWONLY;
1196 e = menu_getitem("MAIN_EXIT_MENU");
1197 e.flag = FLAG_NOSELECT;
1198 menu_jumptowindow(e, false);
1201 void(void) nex_main_exit_no =
1204 e = menu_getitem("MAIN_EXIT_MENU");
1205 e.flag = FLAG_NOSELECT + FLAG_HIDDEN;
1206 e = menu_getitem("MAIN_MENU");
1207 e.flag = FLAG_NOSELECT;
1211 void(void) nex_main_exit_yes =
1216 float(float keynr, float ascii) nex_main_exit_key =
1218 if(keynr == K_ESCAPE)
1226 void(void) dorestart =
1228 cmd("menu_restart\n");
1231 void(void) nex_text_cur_x =
1233 self.text = ftos(rint(cursor_x));
1236 void(void) nex_text_cur_y =
1238 self.text = ftos(rint(cursor_y));