set g_sandbox_editor_distance_spawn 200 "distance at which objects spawn in front of the player"
set g_sandbox_editor_distance_edit 350 "distance at which players can edit or remove objects they are looking at"
+alias menu_showsandboxtools "menu_cmd directmenu SandboxTools"
+bind f7 menu_showsandboxtools
+
set g_playerclip_collisions 1 "0 = disable collision testing against playerclips, might be useful on some defrag maps"
set g_botclip_collisions 1 "0 = disable collision testing against botclips, might be useful on some defrag maps"
"messagemode2" "team chat"
"team_auto" "auto-join team"
"menu_showteamselect" "team menu"
+"menu_showsandboxtools" "sandbox menu"
"spec" "enter spectator mode"
"dropweapon" "drop weapon"
"+use" "drop key / drop flag"
#include "xonotic/bigcommandbutton.c"
#include "xonotic/dialog_firstrun.c"
#include "xonotic/dialog_teamselect.c"
+#include "xonotic/dialog_sandboxtools.c"
#include "xonotic/dialog_settings.c"
#include "xonotic/dialog_settings_video.c"
#include "xonotic/dialog_settings_effects.c"
SKINVECTOR(COLOR_DIALOG_MULTIPLAYER, '0.7 0.7 1');
SKINVECTOR(COLOR_DIALOG_SETTINGS, '0.7 0.7 1');
SKINVECTOR(COLOR_DIALOG_TEAMSELECT, '1 1 1');
+ SKINVECTOR(COLOR_DIALOG_SANDBOXTOOLS, '1 1 1');
SKINVECTOR(COLOR_DIALOG_QUIT, '1 0 0');
SKINVECTOR(COLOR_DIALOG_ADVANCED, '0.7 0.7 1');
SKINVECTOR(COLOR_DIALOG_MUTATORS, '0.7 0.7 1');
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticSandboxToolsDialog) EXTENDS(XonoticRootDialog)
+ METHOD(XonoticSandboxToolsDialog, fill, void(entity)) // to be overridden by user to fill the dialog with controls
+ ATTRIB(XonoticSandboxToolsDialog, title, string, _("Sandbox Tools")) // ;)
+ ATTRIB(XonoticSandboxToolsDialog, color, vector, SKINCOLOR_DIALOG_SANDBOXTOOLS)
+ ATTRIB(XonoticSandboxToolsDialog, intendedWidth, float, 0.4)
+ ATTRIB(XonoticSandboxToolsDialog, rows, float, 5)
+ ATTRIB(XonoticSandboxToolsDialog, columns, float, 4)
+ ATTRIB(XonoticSandboxToolsDialog, name, string, "SandboxTools")
+ENDCLASS(XonoticSandboxToolsDialog)
+#endif
+
+#ifdef IMPLEMENTATION
+void XonoticSandboxToolsDialog_fill(entity me)
+{
+ entity e;
+
+ me.gotoRC(me, me.rows - 1, 0);
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
+ e.onClick = Dialog_Close;
+ e.onClickEntity = me;
+}
+#endif
+
+/* Click. The c-word is here so you can grep for it :-) */
i = spawnXonoticTeamSelectDialog();
i.configureDialog(i);
me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+
+ i = spawnXonoticSandboxToolsDialog();
+ i.configureDialog(i);
+ me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
i = spawnXonoticHUDExitDialog();
i.configureDialog(i);