Commit Graph

119 Commits

Author SHA1 Message Date
830028560e Tooltips:
- lowered tooltip-update delay loop to 0.02 sec (was 0.05), which showed
  up 'trails' while going over pulldowns with tooltips
- changed tooltip calculation for size, it was drawing the labels far too
  large (height). Made sure text prints in middle too.
- by default tooltips print 12 pixels below button now
2004-06-19 14:37:25 +00:00
4091851043 Replace all glFinish() with glFlush().
This is supposed to fix gradual slowdown of Blender interface on ATI cards.
2004-06-16 11:34:45 +00:00
506b78bfbb * Big, mundane clean up and edit of (error/ok/etc)
messages and pupmenu()s. Edited spelling and grammar,
 stylistic consistency, etc.

I added the guidelines and rationale that I used to the
 CMS here:
http://www.blender3d.org/cms/Language_and_terminology.338.0.html

Next step is to get icons in there, to make it easier to see
 at a glance what sort of message (and how much attention
 should be paid to it, or if it can be dismissed with a flick
 of the mouse, eg. boring remove doubles notifications)

mockup: http://mke3.net:9000/blender/ui/controls/error_ok_icons.png
2004-06-05 05:55:15 +00:00
a1f5e64239 Tweaked the display and positioning of tooltips so they aren't obscured by the mouse pointer.
This is addressing bug #952
2004-05-17 14:36:13 +00:00
83907fc5f7 Num-slider buts and CTRL didn't work when range was > 1.0 2004-05-07 19:56:26 +00:00
66578d2900 Fix for CTRL+drag on sliders and number buttons.
The code wasn't correct at all (for ages!). Rule now again is:

Button range 0.0-2.0 : ctrl goes with steps of 0.1, shift+ctrl steps of 0.01
Button range 2.0-20.0: ctrl goes with steps of 1.0, shift+ctrl steps of 0.1
Button range larger: ctrl goes with steps of 10.0
2004-04-22 17:46:07 +00:00
b37e9eafeb - NLA Window:
Added support for Panels, and converted old NKEY menu here.
Also enabled zooming in further, as for Action Window.
(note: this editor can use some work, this action stuff is underdeveloped
and mysterious!)

- UI code
Brought back fix that sets for each Panel a GL matrix for UI code thats
coming after it. This makes system more flexible, and prevents conflicts
with other uiBlocks in a window (like ipo, action).
This will give a tinsy bit more load for moving mouse around... please
report back if this causes troubles.
2004-04-22 12:36:27 +00:00
282d063569 commented out code to enable multiple uiBlocks in window with different
matrices (like action window should have). This one gave error in
IpoWindow with Panel.
2004-04-21 18:04:02 +00:00
d694335cc2 Another phase in panelizing all window types. Did lots of small code
fixes, including:

- Panel in action window (disabled it, since there's no need for it)
- fix: when action was added to mesh with vertex keys, the action couldn't
  be deleted, nor did action window draw key names
- mouse on RVK (key) in Action window: Nkey menu pops as well.
  This is not a good candidate to put in Panel, no selection possible here.
- when you change name of RVK in action window, it shows in IpoWindow too
2004-04-20 18:27:10 +00:00
c8cadcd557 Bug 729
When more than 30 scenes are in a scene, the sequencer "Add" option didnt
show a databrowse window.
This was a nasty one, because databrowse facilities are more-of tied to
having a header. The fix is that I added option to IDnames_to_pupstring()
to not limit the menu (by passing NULL for menu short pointer).

Also noticed a bug with pupmenu_col(), which did return on a val==0 event
(mouse release) which shouldn't be, this makes sequences of menus not
possible.
2004-04-10 15:13:28 +00:00
a9b1cd6a0e Bug 1016
When you use arrow keys to activate items in a menu (like IKEY for Ipos)
the selected items were not correctly choosen when mousepointer was over
an item, only when mousepointer over title.

Fixed by catching 'RETKEY' event in buttons event subloop.
2004-04-08 13:18:46 +00:00
d2f95ea72e bug fix 1009
Arrow keys to select items were flipped for button type MENU.
2004-04-06 20:31:11 +00:00
d82ab2bfc3 - small patch to make sure buttons are fully used for strings (when it
doesnt fit), plus the 'user count' button now increases in size when
  amount is larger than 10.
  was report #1049
2004-03-25 13:30:20 +00:00
9ed4436058 Updated the Sun ifdef's basically I standardized them so they
were all the same and make sure all platforms see them.

Kent
2004-03-06 19:32:33 +00:00
74680a07c0 Removed a fudge factor of .5
think it was an old opengl hack for something.

See for more info:
http://www.blender.org/modules.php?op=modload&name=phpBB2&file=viewtopic&t=3107

Also the person that should get credit for this is: chrish and meestaplu

Kent
2004-03-02 18:50:54 +00:00
Chris Want
8410cdd71c Todd Koeckeritz' patch to fix inconsistent placement in multicolumn
menu's.
2004-02-21 16:50:09 +00:00
682751cd4f * Widened the tooltips when using non-AA fonts, so there's a margin between the top of the tooltip and the ascender. 2004-01-28 12:20:19 +00:00
2037ef9d25 - code i committed for correct arrowkeys on selecting items in pulldowns
broke the ui_mouse_motion_towards_block() function. This made sure
  mouse motion (diagonal) towards a new opened sub-level keeps the sub-
  level open.
  Fixed!
2004-01-24 17:26:58 +00:00
e93e5d37da - when pulldown menus get flipped, the arrow keys were not behaving OK.
also added that left/right arrow is handled, to prevent weird redraw.
2004-01-23 20:54:26 +00:00
24c43b835d - pressing Enter key on numbutton increases/decreases again.
- added displist.h for proper prototype in previous commit
2004-01-16 21:16:09 +00:00
4a8f52f619 Converted the Userpreference buttons to zr's new ButBit calls.
Also added USER_*  to each define located in DNA_userdef.h.
2004-01-13 14:50:45 +00:00
eb6ef538e9 - committed new uiDef{Icon,IconText,}ButBit? functions
- change object draw flag buttons to use new functions (just an example)

 While I probably wouldn't recommend patching other buttons to use the new
functions a week before release, it is a good (simple but tedious) project
to complete. Note that some code actually defined the constants for the
bit index, when such code is fixed the _BIT constant should be removed from
the headers.

Example:
DNA_constraint_types.h:
#define CONSTRAINT_DISABLE		0x00000004
#define CONSTRAINT_DISABLE_BIT	2

buttons_object.c:
uiDefIconButS(block, ICONTOG|BIT|CONSTRAINT_EXPAND_BIT, ...);

The button definition should change to:
uiDefIconButBitS(block, ICONTOG, CONSTRAINT_EXPAND, ...);

(whats that, the more correct way uses less typing, GOOD GOD!)
and the CONSTRAINT_DISABLE_BIT define should be removed.
2004-01-08 19:53:19 +00:00
d959b8127b Applied Daniel Fairhead's patch for a correct working DELKEY in textinput buttons.
(thanks!)

Added a 'void' somewhere to silence a compiler warning.

(Windows only)
Moved the flip fullscreen button in the topheader a little to the right, since the
questionmark button mysteriously disappeared.
2004-01-07 23:33:40 +00:00
65aeef11e1 Alex Mole's patch for END and HOME
http://www.blender.org/pipermail/bf-committers/2003-December/004691.html

Makes HOME and END keys work in text space and text
edit boxes.

I've tested it for some time now and I haven't had any problem or spotted any irregularities of some sort.

One think though. It doesn't update the panning of the text window if the cursor gets out of the screen. I guess someone (more familiar with the code) could look into this.

Really nifty when coding scripts.
2003-12-28 21:28:35 +00:00
b3911687ee - only cosmetic stuff; result of going over the output of mipspro cc
compile round. Wrong prototypes, unused variables, zealot const usage,
  and in action.c fixed insane & unreadable function call syntax.
2003-12-24 11:44:57 +00:00
89fa8449a6 * Further general tweaking to UI controls drawing
* Improved TOG3 buttons to communicate functionality better
2003-12-08 10:48:28 +00:00
7ab1c64c7a Default buttons drawing update
* Big code cleanup and re-organisation, cleaner drawing
* Button alignment now enabled for default theme
* Sliders tweaked and improved
* Tooltip shadow cleaned up

Todo: Alignment looks pretty, but at this stage, what it *means* is not clear or consistent. Need to work out some UI guidelines for when to and when not to use the alignment code.
2003-12-07 06:05:08 +00:00
5691b4d1db - fix for layer buttons, now button rows type TOGR accept input based at
actual bit value, and not order of creation.
  it is the only location in Blender where this is used... so!
2003-11-30 19:18:08 +00:00
de77f47ac7 - added to Constraint panel the 'Active Bone' or 'Active Object', like
previously was drawn in constraint buttons header.
- cleaned up buttons in panels for manual... just nicer aligning.
2003-11-23 12:22:59 +00:00
dfc72b3f90 - Fix: the MKEY 'movetolayer' option doesnt close anymore on numeric
input. Somewhere in end  NaN period this was changed... weird.

  Now you can set layers with numeric buttons, including using ALT for
  numbers larger than 10, and using SHIFT for extend-select buttons.

  for the UI diehards who like to know; when you create a menu block, you
  can provide two flags to control behaviour on keyboard input:
  UI_BLOCK_RET_1  == return on any keypress (not mouse)
  UI_BLOCK_ENTER_OK  == return on Enter key

  this was not correct in the doc/interface_API.txt , which will be fixed.
2003-11-21 13:14:50 +00:00
4a5ae4a55f Fix for undo... it didn't do the UV coords (tface) nor the vertexpaint
colors. This because of the pretty weird (ab)use of load & make editmesh...

For each added undo step, the load_editmesh was fed with an empty mesh
to assign data to, without knowledge of what was in the original mesh.
That way UV and color data got lost.

Solved it in 2 steps:

1. removing the ->tface pointer from EditVlak, and make TFace a builtin
  struct inside EditVlak. This didnt cost much extra mem, since it already
  stored UV and color. This enabled some pretty cleanup in editmesh.c as
  well, storing tface pointers was cumbersome.
2. for each undo step, it then generates always a tface and mcol block to
  link to the undo Mesh.
  Even when it wasn't in the actual Mesh, at exit editmode the original
  Mesh is used as reference anyway, and undo-meshes are freed correctly.

The enormous commit is because I had to change the BLI_editVert.h file, and
found it was included in about every file unnecessary. I removed it there.
ALso found out that subsurf has code ready (unfinished) to make UV coords for
the displaylist in EditMode as well, nice to know for later...
2003-11-19 22:00:14 +00:00
ab9e6f69a0 - fixed bug caused by changing order of drawing buttons in material panel 2
the 'OB' and 'ME' buttons were not visible in all situations anymore...
2003-11-19 12:43:21 +00:00
d8f8605098 - Bug fix: at osx, default AA font couldnt be written in .b.blend
(unless you manually install font)
- Bug fix: string for AA font was only 64 chars... made 256.

- Changed API for buttons aligning... it now detects automatic what rows
  are, or collums, and aligns buttons. This makes call easier:
  uiBlockBeginAlign(block);
  ... defBut....
  uiBlockEndAlign(block);
  Only works when you provide buttons in row order!
- made sure only 'rounded' theme uses this align stuff
- still work in progress.. I commit now because I leave to denmark for 2 days!

http://www.blender.org/bf/rt.jpg  <- now also groups with rows+collums
2003-11-14 15:49:26 +00:00
a291ea6683 - 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'.
2003-11-14 00:44:48 +00:00
c51180b860 fixed two errors in events for knife tool:
- ESC for pupmenu was not handled
- pressing ENTER at pupmenu caused mousetrail call to exit
2003-11-12 22:20:27 +00:00
3e972a57e9 - added themecolor text for textwindow
- fixed bug introduced by rwenzlaff commit in interface.c
  why replace the defButI call with defButS ? you should have seen the
  compile warning... :)
2003-11-12 21:34:12 +00:00
fcc8aefd48 - fixed safety area for 'floating' popup menus, such as move-to-layer
but also works for toolbox, quit menu, etc.
2003-11-12 21:23:37 +00:00
aeb8a0f1ae Modified pupmenu_col() to allow separators. 2003-11-05 23:54:22 +00:00
d4a4f0e493 - increased tooltip back-grab safety one pixel
- fixed good merging of constraint and effect panel in odd situations
2003-10-29 19:23:51 +00:00
4bec8ba7d5 Fixing loose ends:
- nkey menu for buttonswindow (hex values) couldnt be restored yet, is
  for next release
- replaced Nkey in IpoWindow with Panel, this now displays the buttons
  that were formerly in 'anim buttons' as well; to view the boundbox
  values of all visible curves, and adjust it.
- the new panel also has the 'set speed' option, fixed stuff in it and
  added better errorwarning... still not a very well coded tool!
2003-10-28 14:20:03 +00:00
5ca0051419 - fixed very very old but in TOG button (it didnt check the values
correctly for deciding whether its pressed or not
- added 'add new' buttons to material & texture menus
  is done by std_lib buttons in headerbuttons.c, now only for this.
  doing it for ipowindow, sound, etc. has some weird consequences, save
  that for later
- verified usage of 'setting2' color for databuttons only
2003-10-27 16:13:45 +00:00
6da544eeeb - new menu type; with icon support!
(the one you make with uIDefBut(..., MENU, ...)
  add a %i<nr> to the string, and the item gets <nr> as icon.
- added this to the 'mode' selectors in 3dwin and ipowin
- cleaned up code for modeselector pup... that was a bad ass one! :)
2003-10-25 23:57:58 +00:00
bbd9018ec5 - fixed colors of ipokeys in 3d window
- fixed constraint popup menu (used icons)
- moved 'full' and 'View3d props' and 'background' items in menu to bottom
  Hope Matt wont kill me for it, but these were about the only useful
  ones there... :)
- little fix in interface.c for menus...
2003-10-25 22:29:24 +00:00
513ae61f2b First commit of a new toolbox system.
Aim was to find a simple & easy system, script alike, to add and configure
a toolbox system, so that others can experiment, but also of course Python.

Summary:
- spacebar calls it up. SHIFT+A still does old toolbox
- hold left or rightmouse for 0.4 second, and it pops up as well
  this is experimental! Can be tweaked with Userdef var "ThresA"
- it is a little bit complete for Object mode only. Needs still work
  at information desing/structure level
- the code works like an engine, interpreting structs like this:

static TBitem addmenu_curve[]= {
{	0, "Bezier Curve", 	0, NULL},
{	0, "Bezier Circle", 1, NULL},
{	0, "NURBS Curve", 	2, NULL},
{	0, "NURBS Circle", 	3, NULL},
{	0, "Path", 			4, NULL},
{  -1, "", 			0, do_info_add_curvemenu}};

- first value is ICON code,
- then name
- return value
- pointer to optional child

last row has -1 to indicate its the last...
plus a callback to event function.

I also built an old toolbox style callback for this:

static TBitem tb_object_select[]= {
{	0, "Border Select|B", 	'b', NULL},
{	0, "(De)select All|A", 	'a', NULL},
{	0, "Linked...|Shift L", 	'L', NULL},
{	0, "Grouped...|Shift G", 	'G', NULL},
{  -1, "", 			0, tb_do_hotkey}};

here the return values are put back as hotkeys in mainqueue.

A mainloop can do all context switching, and build menus on the fly.
Meaning, it also allows other designs such as radials...
2003-10-25 00:08:12 +00:00
904c039e3c - added ifdef INTERNATIONAL for changes in interface.c
- changed switching to smaller/larger fonts, it now does only 1 pnt size.
  with standard font (11), medium is 10, small 9
2003-10-23 22:28:49 +00:00
734637215b there was a function prototype missing from interface.c that caused an error with MSVC. 2003-10-23 22:20:19 +00:00
9efe4b7f9a - AntiAlias fonts (FTF) now are used in three sizes, like the normal
fonts, and switched based at the window zoom.

  Might be something to tweak when to switch exactly, but it works
  cool!
2003-10-23 18:25:08 +00:00
389b06c91e More fixes in object drawing:
- transparent faces in editmode don't write in zbuffer anymore (prevents
  drawing errors) but still read (so behind the subsurf faces for example)
- improved drawing 'handles' for subsurf editing
- going in editmode to Solid view, will draw extra wire always, including
  transparent faces when set
- works in all combos... http://www.blender.org/docs/ton/subsurf.html

- fixed error; padplus/padminus didnt work in buttonswindow anymore
- improved buttonswin: when dragging window edge, the buttons dont
  rescale, but stay same size
2003-10-22 09:06:30 +00:00
e3f3491ac3 Made pupmenu() separators consistent with pulldowns
TODO: same for popup menu buttons
2003-10-21 07:28:44 +00:00
4405113308 - Lots of tweaks to interface colours, shading, etc.
- Fixed alignment/width of menus

Still needs more work.
2003-10-21 07:02:04 +00:00