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:
authorMatt Ebb <matt@mke3.net>2004-08-24 07:27:05 +0400
committerMatt Ebb <matt@mke3.net>2004-08-24 07:27:05 +0400
commit54c9a1ae4054c1478d2df32521b0690848bedb9a (patch)
treeec1b3557d8301aca6547b8d858bec64c837a32df /source/blender/src/header_image.c
parent451134104483d9b2cae4c29408f21961d409728f (diff)
Added Zoom In and Zoom Out menu entries to the uv/image editor
Diffstat (limited to 'source/blender/src/header_image.c')
-rw-r--r--source/blender/src/header_image.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/source/blender/src/header_image.c b/source/blender/src/header_image.c
index bcf4fcaa334..676f49c3747 100644
--- a/source/blender/src/header_image.c
+++ b/source/blender/src/header_image.c
@@ -354,6 +354,36 @@ void do_image_buttons(unsigned short event)
}
}
+static void do_image_view_viewnavmenu(void *arg, int event)
+{
+ switch(event) {
+ case 1: /* Zoom In */
+ image_viewzoom(PADPLUSKEY);
+ break;
+ case 2: /* Zoom Out */
+ image_viewzoom(PADMINUS);
+ break;
+ }
+ allqueue(REDRAWIMAGE, 0);
+}
+
+static uiBlock *image_view_viewnavmenu(void *arg_unused)
+{
+/* static short tog=0; */
+ uiBlock *block;
+ short yco= 0, menuwidth=120;
+
+ block= uiNewBlock(&curarea->uiblocks, "image_view_viewnavmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
+ uiBlockSetButmFunc(block, do_image_view_viewnavmenu, NULL);
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Zoom In|NumPad +", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Zoom Out|NumPad -", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
+
+ uiBlockSetDirection(block, UI_RIGHT);
+ uiTextBoundsBlock(block, 50);
+ return block;
+}
+
static void do_image_viewmenu(void *arg, int event)
{
@@ -409,13 +439,15 @@ static uiBlock *image_viewmenu(void *arg_unused)
else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Draw Faces|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 6, "");
if(G.sima->flag & SI_DRAWSHADOW) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Draw Shadow Mesh", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Draw Shadow Mesh|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
+
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefIconTextBlockBut(block, image_view_viewnavmenu, NULL, ICON_RIGHTARROW_THIN, "View Navigation", 0, yco-=20, 120, 19, "");
if(G.sima->lock) {
uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Update Automatically|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
} else {
uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Update Automatically|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
- }
+ }
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");