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>2003-10-15 17:47:15 +0400
committerMatt Ebb <matt@mke3.net>2003-10-15 17:47:15 +0400
commitc2c7bb6648e3727fa24ac58d540c5bd146d02c4f (patch)
tree46d2aacfb28269c99a782bf2d35801927f831235 /source/blender
parent3bf09a5447b755bbb5e2a71ca108f2f16625ce7a (diff)
- Modified drawing of ICONROW controls to be clearer,
more consistent and logical. (ICONROWs haven't scrolled left/right in years! More detailed tweaking of headerbuttons positions can come when more menus are finished - added text labels to the drawtype menu in 3d view header
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/src/header_action.c13
-rw-r--r--source/blender/src/header_buttonswin.c13
-rw-r--r--source/blender/src/header_filesel.c12
-rw-r--r--source/blender/src/header_image.c11
-rw-r--r--source/blender/src/header_imasel.c11
-rw-r--r--source/blender/src/header_info.c4
-rw-r--r--source/blender/src/header_ipo.c14
-rw-r--r--source/blender/src/header_nla.c12
-rw-r--r--source/blender/src/header_oops.c11
-rw-r--r--source/blender/src/header_seq.c11
-rw-r--r--source/blender/src/header_sound.c11
-rw-r--r--source/blender/src/header_text.c11
-rw-r--r--source/blender/src/header_view3d.c45
-rw-r--r--source/blender/src/interface.c345
14 files changed, 365 insertions, 159 deletions
diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c
index b540695ea20..e1a3d67d2de 100644
--- a/source/blender/src/header_action.c
+++ b/source/blender/src/header_action.c
@@ -178,12 +178,17 @@ void action_buttons(void)
uiBlockSetCol(block, BUTPINK);
curarea->butspacetype= SPACE_ACTION;
- uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), 6,0,XIC,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+
+ xco = 8;
+
+ uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), xco,0,XIC+10,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+ xco+= XIC+22;
+
/* FULL WINDOW */
- xco= 25;
- if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
- else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
+
+ if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
+ else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
uiDefIconBut(block, BUT, B_ACTHOME, ICON_HOME, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Zooms window to home view showing all items (HOMEKEY)");
diff --git a/source/blender/src/header_buttonswin.c b/source/blender/src/header_buttonswin.c
index b10940d2c1f..81bb8e95eaa 100644
--- a/source/blender/src/header_buttonswin.c
+++ b/source/blender/src/header_buttonswin.c
@@ -397,13 +397,16 @@ void buts_buttons(void)
uiBlockSetCol(block, BUTGREY);
curarea->butspacetype= SPACE_BUTS;
+
+ xco = 8;
+
+ uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), xco,0,XIC+10,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
- uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), 6,0,XIC,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
-
+ xco+= XIC+22;
+
/* FULL WINDOW */
- xco= 15;
- if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
- else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
+ if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
+ else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
/* HOME */
uiDefIconBut(block, BUT, B_BUTSHOME, ICON_HOME, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Zooms window to home view showing all items (HOMEKEY)");
diff --git a/source/blender/src/header_filesel.c b/source/blender/src/header_filesel.c
index 13598d46a8b..abef906a1e4 100644
--- a/source/blender/src/header_filesel.c
+++ b/source/blender/src/header_filesel.c
@@ -109,12 +109,16 @@ void file_buttons(void)
uiBlockSetCol(block, BUTGREY);
curarea->butspacetype= SPACE_FILE;
- uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), 6,0,XIC,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+
+ xco = 8;
+
+ uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), xco,0,XIC+10,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+ xco+= XIC+22;
+
/* FULL WINDOW */
- xco= 25;
- if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
- else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
+ if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
+ else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
/* SORT TYPE */
xco+=XIC;
diff --git a/source/blender/src/header_image.c b/source/blender/src/header_image.c
index f0b4e64d2df..416e026897d 100644
--- a/source/blender/src/header_image.c
+++ b/source/blender/src/header_image.c
@@ -369,12 +369,15 @@ void image_buttons(void)
curarea->butspacetype= SPACE_IMAGE;
- uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), 6,0,XIC,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+ xco = 8;
+
+ uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), xco,0,XIC+10,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+ xco+= XIC+22;
+
/* FULL WINDOW */
- xco= 25;
- if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
- else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
+ if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
+ else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
/* HOME*/
uiDefIconBut(block, BUT, B_SIMAGEHOME, ICON_HOME, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Zooms window to home view showing all items (HOMEKEY)");
diff --git a/source/blender/src/header_imasel.c b/source/blender/src/header_imasel.c
index 2799b2f88f0..2eab6a25e6d 100644
--- a/source/blender/src/header_imasel.c
+++ b/source/blender/src/header_imasel.c
@@ -112,12 +112,15 @@ void imasel_buttons(void)
curarea->butspacetype= SPACE_IMASEL;
- uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), 6,0,XIC,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+ xco = 8;
+ uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), xco,0,XIC+10,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+
+ xco+= XIC+22;
+
/* FULL WINDOW */
- xco= 25;
- if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "");
- else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "");
+ if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "");
+ else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "");
xco+=XIC;
if (simasel->title){
diff --git a/source/blender/src/header_info.c b/source/blender/src/header_info.c
index f87db3649e9..b8414a6215b 100644
--- a/source/blender/src/header_info.c
+++ b/source/blender/src/header_info.c
@@ -1676,7 +1676,7 @@ static void info_text(int x, int y)
void info_buttons(void)
{
uiBlock *block;
- short xco= 32;
+ short xco= 42;
char naam[20];
int xmax;
@@ -1741,7 +1741,7 @@ void info_buttons(void)
if (curarea->full == 0) {
curarea->butspacetype= SPACE_INFO;
- uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), 6,0,XIC,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+ uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), 8,0,XIC+10,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
/* STD SCREEN BUTTONS */
// xco+= XIC;
diff --git a/source/blender/src/header_ipo.c b/source/blender/src/header_ipo.c
index f9663ac82cf..cb0b471af72 100644
--- a/source/blender/src/header_ipo.c
+++ b/source/blender/src/header_ipo.c
@@ -213,14 +213,18 @@ void ipo_buttons(void)
curarea->butspacetype= SPACE_IPO;
- uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), 6,0,XIC,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+ xco = 8;
+ uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), xco,0,XIC+10,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+
+ xco+= XIC+22;
+
test_editipo(); /* test if current editipo is OK, make_editipo sets v2d->cur */
- /* FULL WINDOW en HOME */
- xco= 25;
- if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
- else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
+ /* FULL WINDOW en HOME */
+
+ if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
+ else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
uiDefIconBut(block, BUT, B_IPOHOME, ICON_HOME, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Zooms window to home view showing all items (HOMEKEY)");
uiDefIconButS(block, ICONTOG, B_IPOSHOWKEY, ICON_KEY_DEHLT, xco+=XIC,0,XIC,YIC, &G.sipo->showkey, 0, 0, 0, 0, "Toggles between Curve and Key display (KKEY)");
diff --git a/source/blender/src/header_nla.c b/source/blender/src/header_nla.c
index c218bd7beed..0d76536f4df 100644
--- a/source/blender/src/header_nla.c
+++ b/source/blender/src/header_nla.c
@@ -111,12 +111,16 @@ void nla_buttons(void)
uiBlockSetCol(block, BUTCHOKE);
curarea->butspacetype= SPACE_NLA;
- uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), 6,0,XIC,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+
+ xco = 8;
+
+ uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), xco,0,XIC+10,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+ xco+= XIC+22;
+
/* FULL WINDOW */
- xco= 25;
- if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
- else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
+ if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
+ else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
/* HOME */
uiDefIconBut(block, BUT, B_NLAHOME, ICON_HOME, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Zooms window to home view showing all items (HOMEKEY)");
diff --git a/source/blender/src/header_oops.c b/source/blender/src/header_oops.c
index 79f2e238c87..80b9f7d5ce8 100644
--- a/source/blender/src/header_oops.c
+++ b/source/blender/src/header_oops.c
@@ -117,12 +117,15 @@ void oops_buttons(void)
curarea->butspacetype= SPACE_OOPS;
- uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), 6,0,XIC,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+ xco = 8;
+
+ uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), xco,0,XIC+10,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+
+ xco+= XIC+22;
/* FULL WINDOW */
- xco= 25;
- if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
- else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, (short)(xco+=XIC),0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
+ if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
+ else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
/* HOME */
uiDefIconBut(block, BUT, B_OOPSHOME, ICON_HOME, (short)(xco+=XIC),0,XIC,YIC, 0, 0, 0, 0, 0, "Zooms window to home view showing all items (HOMEKEY)");
diff --git a/source/blender/src/header_seq.c b/source/blender/src/header_seq.c
index 720a8b35dde..c7fe2443361 100644
--- a/source/blender/src/header_seq.c
+++ b/source/blender/src/header_seq.c
@@ -108,12 +108,15 @@ void seq_buttons()
curarea->butspacetype= SPACE_SEQ;
- uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), 6,0,XIC,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+ xco = 8;
+
+ uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), xco,0,XIC+10,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+ xco+= XIC+22;
+
/* FULL WINDOW */
- xco= 25;
- if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
- else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
+ if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
+ else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
/* HOME */
uiDefIconBut(block, BUT, B_SEQHOME, ICON_HOME, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Zooms window to home view showing all items (HOMEKEY)");
diff --git a/source/blender/src/header_sound.c b/source/blender/src/header_sound.c
index b72cf226a89..0d25f4e7d0d 100644
--- a/source/blender/src/header_sound.c
+++ b/source/blender/src/header_sound.c
@@ -178,13 +178,16 @@ void sound_buttons(void)
uiBlockSetCol(block, BUTYELLOW);
curarea->butspacetype= SPACE_SOUND;
+
+ xco = 8;
+
+ uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(),xco,0,XIC+10,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
- uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), 6,0,XIC,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+ xco+= XIC+22;
/* FULL WINDOW */
- xco= 25;
- if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
- else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
+ if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN,xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
+ else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
uiDefIconBut(block, BUT, B_SOUNDHOME, ICON_HOME, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Zooms window to home view showing all items (HOMEKEY)");
xco= std_libbuttons(block, xco+40, 0, 0, NULL, B_SOUNDBROWSE, (ID *)G.ssound->sound, 0, &(G.ssound->sndnr), 1, 0, 0, 0, 0);
diff --git a/source/blender/src/header_text.c b/source/blender/src/header_text.c
index 0c77bde5777..33833534d55 100644
--- a/source/blender/src/header_text.c
+++ b/source/blender/src/header_text.c
@@ -198,12 +198,15 @@ void text_buttons(void)
curarea->butspacetype= SPACE_TEXT;
- uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), 6,0,XIC,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+ xco = 8;
+
+ uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), xco,0,XIC+10,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+ xco+= XIC+22;
+
/* FULL WINDOW */
- xco= 25;
- if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
- else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
+ if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Returns to multiple views window (CTRL+Up arrow)");
+ else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco,0,XIC,YIC, 0, 0, 0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
if(st->showlinenrs)
uiDefIconBut(block, BUT, B_TEXTLINENUM, ICON_SHORTDISPLAY, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Hides line numbers");
diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c
index 15b70da650c..227c18ff492 100644
--- a/source/blender/src/header_view3d.c
+++ b/source/blender/src/header_view3d.c
@@ -2382,6 +2382,19 @@ static char *view3d_modeselect_pup(void)
return (string);
}
+
+char *drawtype_pup(void)
+{
+ static char string[512];
+
+ strcpy(string, "Draw type:%t");
+ strcat(string, "|Bounding Box %x1");
+ strcat(string, "|Wireframe %x2");
+ strcat(string, "|Solid %x3");
+ strcat(string, "|Shaded %x4");
+ strcat(string, "|Textured %x5");
+ return (string);
+}
void do_view3d_buttons(short event)
{
int bit;
@@ -2705,9 +2718,11 @@ void view3d_buttons(void)
curarea->butspacetype= SPACE_VIEW3D;
- uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), 6,0,XIC,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
+ xco = 8;
+
+ uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), xco,0,XIC+10,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
- xco+= XIC+18;
+ xco+= XIC+22;
/* pull down menus */
uiBlockSetEmboss(block, UI_EMBOSSP);
@@ -2721,27 +2736,27 @@ void view3d_buttons(void)
else G.vd->viewbut= 0;
xmax= GetButStringLength("View");
- uiDefBlockBut(block, view3d_viewmenu, NULL, "View", xco, 0, xmax, 20, "");
+ uiDefBlockBut(block, view3d_viewmenu, NULL, "View", xco, -2, xmax, 24, "");
xco+= xmax;
xmax= GetButStringLength("Select");
if (G.obedit) {
if (OBACT && OBACT->type == OB_MESH) {
- uiDefBlockBut(block, view3d_select_meshmenu, NULL, "Select", xco, 0, xmax, 20, "");
+ uiDefBlockBut(block, view3d_select_meshmenu, NULL, "Select", xco, 0, xmax, 24, "");
} else if (OBACT && (OBACT->type == OB_CURVE || OBACT->type == OB_SURF)) {
- uiDefBlockBut(block, view3d_select_curvemenu, NULL, "Select", xco, 0, xmax, 20, "");
+ uiDefBlockBut(block, view3d_select_curvemenu, NULL, "Select", xco, 0, xmax, 24, "");
} else if (OBACT && OBACT->type == OB_FONT) {
- uiDefBlockBut(block, view3d_select_meshmenu, NULL, "Select", xco, 0, xmax, 20, "");
+ uiDefBlockBut(block, view3d_select_meshmenu, NULL, "Select", xco, 0, xmax, 24, "");
} else if (OBACT && OBACT->type == OB_MBALL) {
- uiDefBlockBut(block, view3d_select_metaballmenu, NULL, "Select", xco, 0, xmax, 20, "");
+ uiDefBlockBut(block, view3d_select_metaballmenu, NULL, "Select", xco, 0, xmax, 24, "");
} else if (OBACT && OBACT->type == OB_LATTICE) {
- uiDefBlockBut(block, view3d_select_latticemenu, NULL, "Select", xco, 0, xmax, 20, "");
+ uiDefBlockBut(block, view3d_select_latticemenu, NULL, "Select", xco, 0, xmax, 24, "");
} else if (OBACT && OBACT->type == OB_ARMATURE) {
- uiDefBlockBut(block, view3d_select_armaturemenu, NULL, "Select", xco, 0, xmax, 20, "");
+ uiDefBlockBut(block, view3d_select_armaturemenu, NULL, "Select", xco, 0, xmax, 24, "");
}
} else if (G.f & G_FACESELECT) {
if (OBACT && OBACT->type == OB_MESH) {
- uiDefBlockBut(block, view3d_select_faceselmenu, NULL, "Select", xco, 0, xmax, 20, "");
+ uiDefBlockBut(block, view3d_select_faceselmenu, NULL, "Select", xco, -2, xmax, 24, "");
}
} else if (G.obpose) {
if (OBACT && OBACT->type == OB_ARMATURE) {
@@ -2831,22 +2846,24 @@ void view3d_buttons(void)
G.vd->flag |= V3D_POSEMODE;
}
- xco+= 16;
+ xco+= 10;
uiDefIconTextButS(block, MENU, B_MODESELECT, (G.vd->modeselect),view3d_modeselect_pup() ,
xco,0,120,20, &(G.vd->modeselect), 0, 0, 0, 0, "Mode:");
- xco+= 130;
+ xco+= 128;
/* DRAWTYPE */
- uiDefIconButS(block, ICONROW, B_REDR, ICON_BBOX, xco,0,XIC,YIC, &(G.vd->drawtype), 1.0, 5.0, 0, 0, "Drawtype: boundbox/wire/solid/shaded (ZKEY, SHIFT+Z)");
+ uiDefIconTextButC(block, ICONTEXTROW,B_REDR, ICON_BBOX, drawtype_pup(), xco,0,XIC+10,YIC, &(G.vd->drawtype), 1.0, 5.0, 0, 0, "Viewport Shading: boundbox/wire/solid/shaded (ZKEY, SHIFT+Z)");
+
+ // uiDefIconButS(block, ICONROW, B_REDR, ICON_BBOX, xco,0,XIC+10,YIC, &(G.vd->drawtype), 1.0, 5.0, 0, 0, "Drawtype: boundbox/wire/solid/shaded (ZKEY, SHIFT+Z)");
// uiDefIconTextButS(block, MENU, REDRAWVIEW3D, (ICON_BBOX+G.vd->drawtype-1), "Viewport Shading%t|Bounding Box %x1|Wireframe %x2|Solid %x3|Shaded %x4|Textured %x5",
// xco,0,124,20, &(G.vd->drawtype), 0, 0, 0, 0, "Viewport Shading");
// uiDefButS(block, MENU, REDRAWVIEW3D, "Viewport Shading%t|Bounding Box %x1|Wireframe %x2|Solid %x3|Shaded %x4|Textured %x5",
// xco,0,110,20, &(G.vd->drawtype), 0, 0, 0, 0, "Viewport Shading");
- xco+= XIC+10;
+ xco+= XIC+18;
/* LAYERS */
if(G.vd->localview==0) {
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c
index 3c8729fd2d7..2977d702156 100644
--- a/source/blender/src/interface.c
+++ b/source/blender/src/interface.c
@@ -429,31 +429,26 @@ static void ui_draw_icon(uiBut *but, BIFIconID icon)
{
float xs=0, ys=0;
- /* check for aligned icons (in case of IconTextBut) */
- if (but->type == ICONTEXTROW) {
- xs= (but->x1+but->x2- BIF_get_icon_width(icon))/2.0;
- ys= (but->y1+but->y2- BIF_get_icon_height(icon))/2.0;
- }
- else {
- if(but->flag & UI_ICON_LEFT) {
- if (but->type==BUTM) {
- xs= but->x1+1.0;
- }
- else {
- xs= but->x1+6.0;
- }
- ys= (but->y1+but->y2- BIF_get_icon_height(icon))/2.0;
+ if(but->flag & UI_ICON_LEFT) {
+ if (but->type==BUTM) {
+ xs= but->x1+1.0;
}
- if(but->flag & UI_ICON_RIGHT) {
- xs= but->x2-17.0;
- ys= (but->y1+but->y2- BIF_get_icon_height(icon))/2.0;
+ else if ((but->type==ICONROW) || (but->type==ICONTEXTROW)) {
+ xs= but->x1+4.0;
}
- if (!((but->flag & UI_ICON_RIGHT) || (but->flag & UI_ICON_LEFT))) {
- xs= (but->x1+but->x2- BIF_get_icon_width(icon))/2.0;
- ys= (but->y1+but->y2- BIF_get_icon_height(icon))/2.0;
+ else {
+ xs= but->x1+6.0;
}
+ ys= (but->y1+but->y2- BIF_get_icon_height(icon))/2.0;
+ }
+ if(but->flag & UI_ICON_RIGHT) {
+ xs= but->x2-17.0;
+ ys= (but->y1+but->y2- BIF_get_icon_height(icon))/2.0;
+ }
+ if (!((but->flag & UI_ICON_RIGHT) || (but->flag & UI_ICON_LEFT))) {
+ xs= (but->x1+but->x2- BIF_get_icon_width(icon))/2.0;
+ ys= (but->y1+but->y2- BIF_get_icon_height(icon))/2.0;
}
- /* END check for aligned icons (in case of IconTextBut) */
glRasterPos2f(xs, ys);
@@ -922,8 +917,8 @@ static void ui_emboss_MENU(BIFColorID bc, float asp, float x1, float y1, float x
if(flag & UI_SELECT) {
- if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_MEDIUM);
- else BIF_set_color(bc, COLORSHADE_LGREY);
+ if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_LGREY);
+ else BIF_set_color(bc, COLORSHADE_GREY);
}
else {
if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_LIGHT);
@@ -934,8 +929,8 @@ static void ui_emboss_MENU(BIFColorID bc, float asp, float x1, float y1, float x
glVertex2f(x2,y1);
if(flag & UI_SELECT) {
- if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_LGREY);
- else BIF_set_color(bc, COLORSHADE_GREY);
+ if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_GREY);
+ else BIF_set_color(bc, COLORSHADE_DARK);
}
else {
if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_WHITE);
@@ -951,8 +946,8 @@ static void ui_emboss_MENU(BIFColorID bc, float asp, float x1, float y1, float x
glBegin(GL_QUADS);
if(flag & UI_SELECT) {
- if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_LGREY);
- else BIF_set_color(bc, COLORSHADE_GREY);
+ if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_GREY);
+ else BIF_set_color(bc, COLORSHADE_DARK);
}
else {
if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_WHITE);
@@ -1107,6 +1102,209 @@ static void ui_emboss_MENU(BIFColorID bc, float asp, float x1, float y1, float x
}
+static void ui_emboss_ICONROW(BIFColorID bc, float asp, float x1, float y1, float x2, float y2, int flag)
+{
+
+ float asp1;
+
+ asp1= asp;
+
+ /*x1+= asp1;*/
+ x2-= asp1;
+ /*y1+= asp1;*/
+ y2-= asp1;
+
+ /* SHADED BUTTON */
+ glShadeModel(GL_SMOOTH);
+ glBegin(GL_QUADS);
+
+
+ if(flag & UI_SELECT) {
+ if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_MEDIUM);
+ else BIF_set_color(bc, COLORSHADE_LGREY);
+ }
+ else {
+ if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_LIGHT);
+ else BIF_set_color(bc, COLORSHADE_HILITE);
+ }
+
+ glVertex2f(x1,y1);
+ glVertex2f(x2,y1);
+
+ if(flag & UI_SELECT) {
+ if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_LGREY);
+ else BIF_set_color(bc, COLORSHADE_GREY);
+ }
+ else {
+ if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_WHITE);
+ BIF_set_color(bc, COLORSHADE_LIGHT);
+ }
+
+ glVertex2f(x2,(y2-(y2-y1)/3));
+ glVertex2f(x1,(y2-(y2-y1)/3));
+ glEnd();
+
+
+ glShadeModel(GL_FLAT);
+ glBegin(GL_QUADS);
+
+ if(flag & UI_SELECT) {
+ if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_LGREY);
+ else BIF_set_color(bc, COLORSHADE_GREY);
+ }
+ else {
+ if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_WHITE);
+ BIF_set_color(bc, COLORSHADE_LIGHT);
+ }
+
+ glVertex2f(x1,(y2-(y2-y1)/3));
+ glVertex2f(x2,(y2-(y2-y1)/3));
+ glVertex2f(x2,y2);
+ glVertex2f(x1,y2);
+
+ glEnd();
+ /* END SHADED BUTTON */
+
+ /* OUTER SUNKEN EFFECT */
+ /* left */
+ glShadeModel(GL_SMOOTH);
+ glBegin(GL_LINES);
+ BIF_set_color(BUTGREY, COLORSHADE_WHITE);
+ glVertex2f(x1-1,y1);
+ BIF_set_color(BUTGREY, COLORSHADE_LIGHT);
+ glVertex2f(x1-1,y2);
+ glEnd();
+
+ /* right */
+ glShadeModel(GL_SMOOTH);
+ glBegin(GL_LINES);
+ BIF_set_color(BUTGREY, COLORSHADE_WHITE);
+ glVertex2f(x2+1,y1);
+ BIF_set_color(BUTGREY, COLORSHADE_LIGHT);
+ glVertex2f(x2+1,y2);
+ glEnd();
+
+ /* bottom */
+ BIF_set_color(BUTGREY, COLORSHADE_WHITE);
+ fdrawline(x1, y1-1, x2, y1-1);
+ /* END OUTER SUNKEN EFFECT */
+
+ /* INNER OUTLINE */
+ glShadeModel(GL_FLAT);
+
+ /* top */
+ if(flag & UI_SELECT) {
+ if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_GREY);
+ else BIF_set_color(bc, COLORSHADE_GREY);
+ }
+ else {
+ if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_WHITE);
+ BIF_set_color(bc, COLORSHADE_WHITE);
+ }
+
+ fdrawline(x1, (y2-1), x2, y2-1);
+
+ /* bottom */
+
+ if(flag & UI_SELECT) {
+ if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_LGREY);
+ else BIF_set_color(bc, COLORSHADE_LGREY);
+ }
+ else {
+ if(flag & UI_ACTIVE) BIF_set_color(bc, COLORSHADE_LMEDIUM);
+ BIF_set_color(bc, COLORSHADE_LMEDIUM);
+ }
+ fdrawline(x1, (y1+1), x2, y1+1);
+
+ /* left */
+ if(!(flag & UI_SELECT)) {
+
+ glShadeModel(GL_SMOOTH);
+ glBegin(GL_LINES);
+ BIF_set_color(bc, COLORSHADE_WHITE);
+ glVertex2f(x1+1,y1+2);
+ BIF_set_color(bc, COLORSHADE_LGREY);
+ glVertex2f(x1+1,y2);
+ glEnd();
+
+ }
+
+ /* right */
+ if(!(flag & UI_SELECT)) {
+
+ glShadeModel(GL_SMOOTH);
+ glBegin(GL_LINES);
+ BIF_set_color(bc, COLORSHADE_LGREY);
+ glVertex2f(x2-1,y1+2);
+ BIF_set_color(bc, COLORSHADE_WHITE);
+ glVertex2f(x2-1,y2);
+ glEnd();
+
+ }
+ /* END INNER OUTLINE */
+
+ /* OUTER OUTLINE */
+ glShadeModel(GL_FLAT);
+
+ /* underneath semi-fake-AA */
+ BIF_set_color(BUTGREY, COLORSHADE_GREY);
+ fdrawline(x1, y2, x2, y2);
+ BIF_set_color(BUTGREY, COLORSHADE_MEDIUM);
+ fdrawline(x1, y1, x2, y1);
+
+ /* top */
+ BIF_set_color(BUTGREY, COLORSHADE_DARK);
+ fdrawline(x1+1, y2, x2, y2);
+
+ /* left */
+ fdrawline(x1, y1+1, x1, y2);
+
+ /* right */
+ fdrawline(x2, y1+1, x2, y2);
+
+ /* bottom */
+ BIF_set_color(BUTGREY, COLORSHADE_DARK);
+ fdrawline(x1+1, y1, x2, y1);
+ /* END OUTER OUTLINE */
+
+ /* DARKENED AREA */
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_BLEND);
+
+ glColor4ub(0, 0, 0, 30);
+ glRectf(x2-9, y1, x2, y2);
+
+ glDisable(GL_BLEND);
+ /* END DARKENED AREA */
+
+ /* MENU DOUBLE-ARROW */
+
+ /* set antialias line */
+ BIF_set_color(bc, COLORSHADE_DARK);
+
+ glEnable( GL_POLYGON_SMOOTH );
+ glEnable( GL_BLEND );
+ glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
+
+ glShadeModel(GL_FLAT);
+ glBegin(GL_TRIANGLES);
+ glVertex2f((short)x2-2,(short)(y2-(y2-y1)/2)+1);
+ glVertex2f((short)x2-6,(short)(y2-(y2-y1)/2)+1);
+ glVertex2f((short)x2-4,(short)(y2-(y2-y1)/2)+4);
+ glEnd();
+
+ glBegin(GL_TRIANGLES);
+ glVertex2f((short)x2-2,(short)(y2-(y2-y1)/2) -1);
+ glVertex2f((short)x2-6,(short)(y2-(y2-y1)/2) -1);
+ glVertex2f((short)x2-4,(short)(y2-(y2-y1)/2) -4);
+ glEnd();
+
+ glDisable( GL_BLEND );
+ glDisable( GL_POLYGON_SMOOTH );
+ /* MENU DOUBLE-ARROW */
+
+}
+
static void ui_emboss_TABL(BIFColorID bc, float asp, float x1, float y1, float x2, float y2, int flag)
{
@@ -1516,6 +1714,16 @@ static void ui_draw_but_BUT(uiBut *but)
{
float x=0.0;
+ /* check for button text label */
+ if (but->type == ICONTEXTROW) {
+ but->embossfunc = ui_emboss_ICONROW;
+ but->flag |= UI_ICON_LEFT;
+ ui_draw_icon(but, (BIFIconID) (but->icon+but->iconadd));
+ } else if (but->type == ICONROW) {
+ but->flag |= UI_ICON_LEFT;
+ but->embossfunc = ui_emboss_ICONROW;
+ }
+
but->embossfunc(but->col, but->aspect, but->x1, but->y1, but->x2, but->y2, but->flag);
if(but->embossfunc==ui_emboss_TABL) {
@@ -1752,6 +1960,10 @@ static void ui_draw_but_BUTM(uiBut *but)
char *cpoin;
int sel;
+ if (but->type == MENU) {
+ but->embossfunc = ui_emboss_MENU;
+ }
+
but->embossfunc(but->col, but->aspect, but->x1, but->y1, but->x2, but->y2, but->flag);
/* check for button text label */
@@ -1886,89 +2098,28 @@ static void ui_draw_but(uiBut *but)
case ICONTOG:
case KEYEVT:
case IDPOIN:
+ case ICONROW:
+ case ICONTEXTROW:
ui_draw_but_BUT(but);
break;
+
case NUM:
ui_draw_but_NUM(but);
break;
+
case TEX:
ui_draw_but_TEX(but);
break;
-
+
case BUTM:
case BLOCK:
ui_draw_but_BUTM(but);
break;
-
- case ICONROW:
- ui_draw_but_BUT(but);
-
- /* draw arriws, icon is standard RGB */
- a= (but->y1+but->y2)/2;
-
- glColor3ub(0,0,0);
- sdrawline((short)(but->x1-1), (short)(a-2), (short)(but->x1-1), (short)(a+2));
- sdrawline((short)(but->x1-2), (short)(a-1), (short)(but->x1-2), (short)(a+1));
- sdrawline((short)(but->x1-3), a, (short)(but->x1-3), a);
- glColor3ub(255,255,255);
- sdrawline((short)(but->x1-3), (short)(a-1), (short)(but->x1-1), (short)(a-3));
-
- glColor3ub(0,0,0);
- sdrawline((short)(but->x2+1), (short)(a-2), (short)(but->x2+1), (short)(a+2));
- sdrawline((short)(but->x2+2), (short)(a-1), (short)(but->x2+2), (short)(a+1));
- sdrawline((short)(but->x2+3), a, (short)(but->x2+3), a);
- glColor3ub(255,255,255);
- sdrawline((short)(but->x2+3), (short)(a-1), (short)(but->x2+1), (short)(a-3));
-
- break;
-
- case ICONTEXTROW:
- ui_draw_but_BUT(but);
-
- /* teken pijltjes, icon is standaard RGB */
- a= (but->y1+but->y2)/2;
-
- glColor3ub(0,0,0);
- sdrawline((short)(but->x1-1), (short)(a-2), (short)(but->x1-1), (short)(a+2));
- sdrawline((short)(but->x1-2), (short)(a-1), (short)(but->x1-2), (short)(a+1));
- sdrawline((short)(but->x1-3), a, (short)(but->x1-3), a);
- glColor3ub(255,255,255);
- sdrawline((short)(but->x1-3), (short)(a-1), (short)(but->x1-1), (short)(a-3));
-
- glColor3ub(0,0,0);
- sdrawline((short)(but->x2+1), (short)(a-2), (short)(but->x2+1), (short)(a+2));
- sdrawline((short)(but->x2+2), (short)(a-1), (short)(but->x2+2), (short)(a+1));
- sdrawline((short)(but->x2+3), a, (short)(but->x2+3), a);
- glColor3ub(255,255,255);
- sdrawline((short)(but->x2+3), (short)(a-1), (short)(but->x2+1), (short)(a-3));
-
- break;
-
- case MENU:
+ case MENU:
ui_draw_but_MENU(but);
-
- /* when sufficient space: darw symbols
- if(but->strwidth+10 < but->x2-but->x1) {
-
-
-
-
-
- int h;
-
- h= but->y2- but->y1;
- x1= but->x2-0.66*h; x2= x1+.33*h;
- y1= but->y1+.42*h; y2= y1+.16*h;
-
- glColor3ub(0,0,0);
- glRecti(x1, y1, x2, y2);
- glColor3ub(255,255,255);
- glRecti(x1-1, y1+1, x2-1, y2+1);
-
- }*/
break;
-
+
case NUMSLI:
case HSVSLI:
@@ -2244,10 +2395,10 @@ void uiRoundBoxEmboss(float minx, float miny, float maxx, float maxy, float rad)
glDisable( GL_BLEND );
glDisable( GL_LINE_SMOOTH );
-
}
+
/* plain antialiased unfilled rectangle */
void uiRoundRect(float minx, float miny, float maxx, float maxy, float rad)
{
@@ -3688,7 +3839,7 @@ static int ui_do_but_ICONTEXTROW(uiBut *but)
ypos +=3;
}
else {
- uiDefIconTextBut(block, BUTM|but->pointype, but->retval, (short)(md->items[a].retval-but->min), md->items[a].str, 0, ypos,(short)width, 19, but->poin, (float) md->items[a].retval, 0.0, 0, 0, "");
+ uiDefIconTextBut(block, BUTM|but->pointype, but->retval, (short)((but->icon)+(md->items[a].retval-but->min)), md->items[a].str, 0, ypos,(short)width, 19, but->poin, (float) md->items[a].retval, 0.0, 0, 0, "");
ypos += 20;
}
}