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:
authorTon Roosendaal <ton@blender.org>2003-11-14 03:44:48 +0300
committerTon Roosendaal <ton@blender.org>2003-11-14 03:44:48 +0300
commita291ea6683b02ac81c21e555652eeaa7653e7f95 (patch)
treed609cd266d469bd27b4a5b980371c32142ec3a7a /source/blender/src/header_buttonswin.c
parentbaf23c76486e136c0ae533c741e7e9ee45e64d81 (diff)
- Added button align code:
uiBlockBeginAlign(block, 'v'); 'v'= vertical. 'h'=horizontal ..... (button def calls) uiBlockEndAlign(block); this will allow new themes to have buttons nicely drawn together. - added new rounded draw theme, to test & illustrate the above. - only did parts of button code with align... rest for later - fixed 'minimal' theme to make it usable (with some decoration) - put back 'oldskool' theme... but it just looks plain ugly! remove? Lazy people: http://www.blender.org/bf/rt.jpg check the top header, or Nkey menu, to see the meaning of 'align'.
Diffstat (limited to 'source/blender/src/header_buttonswin.c')
-rw-r--r--source/blender/src/header_buttonswin.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/src/header_buttonswin.c b/source/blender/src/header_buttonswin.c
index 68e218e33cb..2d3cc7057c2 100644
--- a/source/blender/src/header_buttonswin.c
+++ b/source/blender/src/header_buttonswin.c
@@ -418,7 +418,7 @@ void buts_buttons(void)
// uiButClearFlag(but, UI_ICON_RIGHT); // this type has both flags set, and draws icon right.. uhh
// xco+= 90-XIC+10;
//}
-
+ uiBlockBeginAlign(block, 'h');
uiDefIconButS(block, ROW, B_REDR, ICON_GAME, xco+=XIC, 0, XIC, YIC, &(G.buts->mainb), 0.0, (float)CONTEXT_LOGIC, 0, 0, "Logic (F4) ");
uiDefIconButS(block, ROW, B_REDR, ICON_SCRIPT, xco+=XIC, 0, XIC, YIC, &(G.buts->mainb), 0.0, (float)CONTEXT_SCRIPT, 0, 0, "Script ");
uiDefIconButS(block, ROW, B_REDR, ICON_MATERIAL_DEHLT,xco+=XIC, 0, XIC, YIC, &(G.buts->mainb), 0.0, (float)CONTEXT_SHADING, 0, 0, "Shading (F5) ");
@@ -433,6 +433,7 @@ void buts_buttons(void)
uiBlockSetEmboss(block, UI_EMBOSS); // normal
switch(G.buts->mainb) {
case CONTEXT_SCENE:
+ uiBlockBeginAlign(block, 'h');
uiDefIconButC(block, ROW, B_REDR, ICON_SCENE, xco+=XIC, t_base, XIC, YIC, &(G.buts->tab[CONTEXT_SCENE]), 1.0, (float)TAB_SCENE_RENDER, 0, 0, "Render buttons ");
uiDefIconButC(block, ROW, B_REDR, ICON_ANIM, xco+=XIC, t_base, XIC, YIC, &(G.buts->tab[CONTEXT_SCENE]), 1.0, (float)TAB_SCENE_ANIM, 0, 0, "Anim/playback buttons");
uiDefIconButC(block, ROW, B_REDR, ICON_SOUND, xco+=XIC, t_base, XIC, YIC, &(G.buts->tab[CONTEXT_SCENE]), 1.0, (float)TAB_SCENE_SOUND, 0, 0, "Sound block buttons");
@@ -442,6 +443,7 @@ void buts_buttons(void)
break;
case CONTEXT_SHADING:
+ uiBlockBeginAlign(block, 'h');
uiDefIconButC(block, ROW, B_BUTSPREVIEW, ICON_LAMP, xco+=XIC, t_base, XIC, YIC, &(G.buts->tab[CONTEXT_SHADING]), 1.0, (float)TAB_SHADING_LAMP, 0, 0, "Lamp buttons");
uiDefIconButC(block, ROW, B_BUTSPREVIEW, ICON_MATERIAL, xco+=XIC, t_base, XIC, YIC, &(G.buts->tab[CONTEXT_SHADING]), 1.0, (float)TAB_SHADING_MAT, 0, 0, "Material buttons");
uiDefIconButC(block, ROW, B_BUTSPREVIEW, ICON_TEXTURE, xco+=XIC, t_base, XIC, YIC, &(G.buts->tab[CONTEXT_SHADING]), 1.0, (float)TAB_SHADING_TEX, 0, 0, "Texture buttons");
@@ -460,6 +462,8 @@ void buts_buttons(void)
break;
}
+ uiBlockEndAlign(block);
+
xco+=XIC;
uiDefButS(block, NUM, B_NEWFRAME, "", (short)(xco+20),0,60,YIC, &(G.scene->r.cfra), 1.0, 18000.0, 0, 0, "Displays Current Frame of animation. Click to change.");
xco+= 80;