]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add attachment tools to the sandbox menu
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 27 Oct 2011 14:30:45 +0000 (17:30 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 27 Oct 2011 14:30:45 +0000 (17:30 +0300)
defaultXonotic.cfg
qcsrc/menu/xonotic/dialog_sandboxtools.c

index 8fdfc6342a10eba5df68f77fef9903b2d53b5a78..adeb6d31b9838fa20a6cd1e74bca38dc1982a37a 100644 (file)
@@ -550,7 +550,8 @@ set g_sandbox_object_scale_max 2 "maximum scale that objects can be set to"
 set g_sandbox_object_material_velocity_min 100 "velocity objects must have while colliding for material effects to be applied"
 set g_sandbox_object_material_velocity_factor 0.002 "velocity range which decides the intensity of material effects"
 
-seta menu_sandbox_spawn_model "" // used to store the model in the input field
+seta menu_sandbox_spawn_model ""
+seta menu_sandbox_attach_bone ""
 seta menu_sandbox_edit_skin 0
 seta menu_sandbox_edit_alpha 1
 seta menu_sandbox_edit_color_main "1 1 1"
index 3b483bab51806985f93ad9898566ba5efcaf4ec7..6a30b70f05f427f6e726c35fdf4bcbcde0ec8514 100644 (file)
@@ -26,6 +26,16 @@ void XonoticSandboxToolsDialog_fill(entity me)
        me.TDempty(me, 0.1);
                me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Copy"), '0 0 0', "sandbox duplicate_object_copy", 0));
                me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Paste"), '0 0 0', "sandbox duplicate_object_paste", 0));
+       me.TR(me);
+               me.TD(me, 1, 0.25, e = makeXonoticTextLabel(0, _("Bone:")));
+               me.TD(me, 1, 1.5, box = makeXonoticInputBox(1, "menu_sandbox_attach_bone"));
+                       box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved
+                       box.maxLength = -127; // negative means encoded length in bytes
+                       box.saveImmediately = 1;
+               me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Select"), '0 0 0', "sandbox attach_object get", 0));
+               me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Attach"), '0 0 0', "sandbox attach_object set $menu_sandbox_edit_skin", 0));
+       me.TDempty(me, 0.1);
+               me.TD(me, 1, 0.5, makeXonoticCommandButton(_("Remove"), '0 0 0', "sandbox attach_object remove", 0));
        me.TR(me);
        me.TR(me);
        me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Visual object properties:")));