]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Sandbox Tools menu. Works just like the Join Team menu, and is binded to F7 by defaul...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 25 Oct 2011 10:24:16 +0000 (13:24 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 25 Oct 2011 10:24:16 +0000 (13:24 +0300)
defaultXonotic.cfg
keybinds.txt
qcsrc/menu/classes.c
qcsrc/menu/skin-customizables.inc
qcsrc/menu/xonotic/dialog_sandboxtools.c [new file with mode: 0644]
qcsrc/menu/xonotic/mainwindow.c

index c08de9a3646464821347f7bccd6b7602571e4bb0..7ae4c6678859b17494411a88ed5a7bc7b89d5251 100644 (file)
@@ -546,6 +546,9 @@ set g_sandbox_info 1 "print non-critical information to the server"
 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"
 
index 2c89f704b8c1599d38971dc071973929d5ab3f6a..d7ec276f57f9d541057d42ebaccc63776a177069 100644 (file)
@@ -53,6 +53,7 @@
 "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"
index 5b7331e3752be37be4231150c89627e38c5baa5e..c0a9780471e3689ca0f1490c51459d9ce05c84ed 100644 (file)
@@ -29,6 +29,7 @@
 #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"
index ca8f4cf8e959ee7d2a5755e74e82def02d543c0b..e8cfba3689a7bcca7ed0fe1fa1eaffa4549dd904 100644 (file)
@@ -55,6 +55,7 @@ SKINBEGIN
        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');
diff --git a/qcsrc/menu/xonotic/dialog_sandboxtools.c b/qcsrc/menu/xonotic/dialog_sandboxtools.c
new file mode 100644 (file)
index 0000000..86e32ad
--- /dev/null
@@ -0,0 +1,25 @@
+#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 :-) */
index 55d496047138cf23ec68b55251db14e8658d17d9..20627c7a579d25adee8be4192d7e00c8264640e5 100644 (file)
@@ -49,6 +49,10 @@ void MainWindow_configureMainWindow(entity me)
        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);