From: Mircea Kitsune Date: Thu, 27 Oct 2011 14:30:45 +0000 (+0300) Subject: Add attachment tools to the sandbox menu X-Git-Tag: xonotic-v0.6.0~35^2~18^2~116 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c9f9192826e5a4b9e1f0c9d556ab38635bd14f40;p=xonotic%2Fxonotic-data.pk3dir.git Add attachment tools to the sandbox menu --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 8fdfc6342..adeb6d31b 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -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" diff --git a/qcsrc/menu/xonotic/dialog_sandboxtools.c b/qcsrc/menu/xonotic/dialog_sandboxtools.c index 3b483bab5..6a30b70f0 100644 --- a/qcsrc/menu/xonotic/dialog_sandboxtools.c +++ b/qcsrc/menu/xonotic/dialog_sandboxtools.c @@ -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:")));