Ok I have a small problem that baffles me completly. When I add things to a menu sometimes i go to use the menu and it doesnt show up at all. Like i’ll click on an ingame menu button and the menus just go away.
#include "ui/menudef.h"
// Defines //
#define WINDOW_X 16
#define WINDOW_Y 16
#define WINDOW_WIDTH 608
#define WINDOW_HEIGHT 448
#define GROUP_NAME "grpksdserversettings"
// Macros //
#include "ui/menumacros.h"
// System Menu //
menuDef {
name "server_settings"
visible 0
fullscreen 0
rect WINDOW_X WINDOW_Y WINDOW_WIDTH WINDOW_HEIGHT
style WINDOW_STYLE_FILLED
onESC {
close server_settings ;
open server_main_menu
}
// Window //
WINDOW( "KSD SERVER SETTINGS", 90 )
// Subwindows //
#define SUBWINDOW_WIDTH .5*(WINDOW_WIDTH-18)
// Move //
SUBWINDOW( 6, 32, (SUBWINDOW_WIDTH), 160, "General" )
BUTTON( 8, 56, (SUBWINDOW_WIDTH)-4, 14, "Gravity 200", .24, 11, exec "rcon YEARIGHT g_gravity 200" )
// Buttons //
BUTTON( 8, WINDOW_HEIGHT-24, .5*(WINDOW_WIDTH-18), 18, "BACK", .3, 14,
close server_settings ; open server_main_menu )
}
That code works
However this code does not let the menu appear at all
#include "ui/menudef.h"
// Defines //
#define WINDOW_X 16
#define WINDOW_Y 16
#define WINDOW_WIDTH 608
#define WINDOW_HEIGHT 448
#define GROUP_NAME "grpksdserversettings"
// Macros //
#include "ui/menumacros.h"
// System Menu //
menuDef {
name "server_settings"
visible 0
fullscreen 0
rect WINDOW_X WINDOW_Y WINDOW_WIDTH WINDOW_HEIGHT
style WINDOW_STYLE_FILLED
onESC {
close server_settings ;
open server_main_menu
}
// Window //
WINDOW( "KSD SERVER SETTINGS", 90 )
// Subwindows //
#define SUBWINDOW_WIDTH .5*(WINDOW_WIDTH-18)
// Move //
SUBWINDOW( 6, 32, (SUBWINDOW_WIDTH), 160, "General" )
SLIDER( 8, 56, (SUBWINDOW_WIDTH)-4, 10, "Gravity:", .2, 8, exec "rcon YEARIGHT g_gravity" 800 0 99999, "Change
gravity by moving slider!" )
}
And no its not the back button because i’ve tried that. any ideas why this code would close the menu instead of open it?