Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2006-02-27 19:30:53 +0300
committerCampbell Barton <ideasman42@gmail.com>2006-02-27 19:30:53 +0300
commit833e0be7bfd33c275ed8df652c8e98dd425b3ae9 (patch)
treec64b603042baf640ba325badbe1efaf12ebf87a6 /source/blender/src/buttons_script.c
parentf68b0ddb2a22034aab35adf4fd862a1da66938e8 (diff)
Added a few more button align's
Diffstat (limited to 'source/blender/src/buttons_script.c')
-rw-r--r--source/blender/src/buttons_script.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/src/buttons_script.c b/source/blender/src/buttons_script.c
index e29f0af16cb..f56b56d0965 100644
--- a/source/blender/src/buttons_script.c
+++ b/source/blender/src/buttons_script.c
@@ -277,13 +277,16 @@ void draw_scriptlink(uiBlock *block, ScriptLink *script, int sx, int sy, int sce
strcat(str, "OnLoad%x 2|");
strcat(str, "OnSave%x 8");
}
-
+
+ uiBlockBeginAlign(block);
uiDefButS(block, MENU, 1, str, (short)sx, (short)sy, 140, 19, &script->flag[script->actscript-1], 0, 0, 0, 0, "Script links for this event");
uiDefIDPoinBut(block, test_scriptpoin_but, ID_SCRIPT, 1, "", (short)(sx+140),(short)sy, 140, 19, &script->scripts[script->actscript-1], "Name of Script to link");
+ uiBlockEndAlign(block);
}
sprintf(str,"%d Scr:", script->totscript);
+
uiDefButS(block, NUM, REDRAWBUTSSCRIPT, str, (short)(sx+140), (short)sy-20,60,19, &script->actscript, 1, script->totscript, 0, 0, "Total / Active Script link (LeftMouse + Drag to change)");
if (scene) {
@@ -291,18 +294,17 @@ void draw_scriptlink(uiBlock *block, ScriptLink *script, int sx, int sy, int sce
uiDefBut(block, BUT, B_SSCRIPT_ADD, "New", (short)(sx+240), (short)sy-20, 40, 19, 0, 0, 0, 0, 0, "Add a new Script link");
if (script->totscript)
uiDefBut(block, BUT, B_SSCRIPT_DEL, "Del", (short)(sx+200), (short)sy-20, 40, 19, 0, 0, 0, 0, 0, "Delete the current Script link");
-
uiDefBut(block, LABEL, 0, "Scene Script link", sx,sy-20,140,20, 0, 0, 0, 0, 0, "");
- }
+ }
else {
if (script->totscript<32767)
uiDefBut(block, BUT, B_SCRIPT_ADD, "New", (short)(sx+240), (short)sy-20, 40, 19, 0, 0, 0, 0, 0, "Add a new Script link");
if (script->totscript)
uiDefBut(block, BUT, B_SCRIPT_DEL, "Del", (short)(sx+200), (short)sy-20, 40, 19, 0, 0, 0, 0, 0, "Delete the current Script link");
-
uiDefBut(block, LABEL, 0, "Selected Script link", sx,sy-20,140,20, 0, 0, 0, 0, 0, "");
- }
+ }
+
}
/* ************************************* */
@@ -323,8 +325,9 @@ static void script_panel_scriptlink(void)
"Enable execution of all assigned Script links");
/* for proper alignment: */
uiDefBut(block, LABEL, 0, "", 160, 200,150,20, NULL, 0.0, 0.0, 0, 0, "");
-
+
if (G.f & G_DOSCRIPTLINKS) {
+ uiBlockBeginAlign(block);
ob= OBACT;
if(ob)
uiDefIconButS(block, ROW, B_REDR, ICON_OBJECT, xco,175,25,20, &G.buts->scriptblock, 2.0, (float)ID_OB, 0, 0, "Displays Object script links");
@@ -340,7 +343,7 @@ static void script_panel_scriptlink(void)
if(ob && ob->type==OB_LAMP)
uiDefIconButS(block, ROW, B_REDR, ICON_LAMP, xco+=25,175,25,20, &G.buts->scriptblock, 2.0, (float)ID_LA, 0, 0, "Displays Lamp script links");
-
+ uiBlockEndAlign(block);
if (ob && G.buts->scriptblock==ID_OB) {
script= &ob->scriptlink;