Commit Graph

71 Commits

Author SHA1 Message Date
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
824c9e92da - fixed correct themecolor for popup menus 2003-10-20 18:15:06 +00:00
7f5d06d638 Another mega commit... loadsof restructure, and a pretty good one! :)
- changed the BIF_DrawString() function. it used to work different for
  AA fonts  as for default fonts. Now it's identical. Setting color for fonts
  can just be done with OpenGL, for both font types.
  Removed: BIF_DrawStringRGB()
- added theme color options for Buttons
- recoded DefButton, so it automatically chooses the right color.
- had to remove a 1000 uiBlockSetCol() calls for that reason...
- uiBlockSetCol() still works, to override automatic color

- removed entirely the silly old color system (BIFColorID). All color
  calls can now be done with a BIF_ThemeColor() call, including fonts and
  buttons and opengl stuff

- all buttons in button header have headercolor by default

- recoded drawing icons, it was a really bad & old loop doing manually
  colorshading and blending... which was per pixel a load of code!
  Now it uses a single OpenGL call to blend or colorize. Quite faster!
- (as test, for review) icons don't colorize anymore with button color,
  but have a different alpha to blend in (when not active)


- recoded the entire interface_draw.c file...:
- drawing buttons is separated in three parts:
  1. main drawing function for text and icons
  2. free definable callback for button itself
  3. free definable callback for slider
- removed a load of redundant code for this!
- coded a minimal theme, and adjusted Matt's buttons to match new
  callback system

- adding new drawing themes is piece of cake now
- for coders, default 'themes' to be aware of:
  UI_EMBOSS : the themable drawing style
  UI_EMBOSSP: the pulldown menu system (apart from color not themable)
  UI_EMBOSSN: draw nothing, only text and/or icon
  UI_EMBOSSM: minimal theme, still in use for Logic and Constraintsa
  this can be set with uiBlockSetEmboss(block) or in the uiNewBlock() call.

TODO: make UI API call for button alignment

(plus removed another series of warnings from code...)

Plus: fixed bug in Matts commit: he used a 'short' button for an 'int'
2003-10-20 15:40:20 +00:00
628b002583 - Added nicer, smoother tooltip drawing 2003-10-20 04:05:31 +00:00
58a0811ad9 - fixed bug in windows with extreme small height... it didnt accept
input
- was needed for usage of this windowtype (headerless) as 'timeline'
  dragger, which was supposed to be...
- as extra I fixed 'home', it sets start/end frame for sound window
- at mouselocation the current frame or time is printed
- rightmouse menu switches seconds/frames (should be in header as option...)
- displaybutton 'frs/sec/' updates soundwindow too

So, its not perfect... but try opening a tiny high headerless audio
window on top of buttonswin or somewhere full width. not bad...
2003-10-17 19:03:53 +00:00
8ce5ece950 - fixed reopen last file (in file pulldown menu)
- fixed delay in drawing active item in pop menus...
2003-10-17 16:24:10 +00:00
0321602b65 - The basic layer for Themes in place!
- currently only implemented for 3d window
- create as many themes you like, and name them
- default theme is not editable, and always will be defined at startup
  (initTheme)
- saves in .B.blend
- themes for spaces can become local too, so you can set individual
  3d windows at theme 'Maya' or so. (to be implemented)
- it uses alpha as well...!

API:
This doesnt use the old method with BFCOLORID blahblah. The API is copied
from OpenGL conventions (naming) as much as possible:

- void BIF_ThemeColor(ScrArea *sa, int colorid)
  sets a color... id's are in BIF_resources.h (TH_GRID, TH_WIRE, etc)

- void BIF_ThemeColorShade(ScrArea *sa, int colorid, int offset)
  sets a color with offset, no more weird COLORSHADE_LGREY stuff

- void BIF_GetThemeColor3fv(ScrArea *sa, int colorid, float *col)
  like opengl, this gives you in *col the three rgb values

- void BIF_GetThemeColor4ubv(ScrArea *sa, int colorid, char *col)
  or the one to get 4 bytes

ThemeColor calls for globals (UI etc) can also call NULL for *sa... this
is to be implemented still.

Next step: cleaning up interface.c for all weird colorcalls.
2003-10-17 14:02:08 +00:00
77b37c9927 - fix for drawing buttons in fileselectors, it used an old exception
and special 'EMBOSSF' drawing function. Now complies to standard.
2003-10-16 12:03:03 +00:00
c7618783fb - further work on view3d panels:
- you can close them (x icon) or press ESC
- option to open panel at mouse location (try Nkey)
- using 'collapse' (triangle icon) stows header in bottom
- opening again restores at old location
- dragging panels or zooming clips nicely with window

evaluate: an 'auto close' when mouse goes outside panel

Warning: vertex selecting still broken! :) It's 2 am now, bedtime...
2003-10-16 00:17:24 +00:00
10333bd1d3 - removed all #include "interface.h" from files. this is a local/internal
include only (use BIF_interface.h instead)
- split up interface.c in two files: NEW: interface_panel.c
- removed the temporal text files

WARN: FIX AUTOMAKE AND MSVC!
2003-10-15 19:23:54 +00:00
478f61563a - fixed drawing errors in constraint panel
- join 3d window could crash... unchecked pointer in interface.c
- setting align in buttonswin caused stripes to draw in view3d-panels
- fixed events for new 'background and view settings menu'
2003-10-15 17:41:40 +00:00
44344b3501 - More code for handling Panels in other windows.
Added the 'Nkey' object menu as Panel now. Live updates, whoohoo!

closing them, minimizing, etc will follow. first bring back vertex
selection :)
2003-10-15 16:01:08 +00:00
669a570a73 - Various cosmetic fixes to menu buts in headers, alignment etc.
- Make text fields' text black when deselected, white when selected (editing)
2003-10-15 15:23:58 +00:00
c2c7bb6648 - 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
2003-10-15 13:47:15 +00:00
3bf09a5447 - fixed warnings in drawmesh.c
- with mouse in Panel, padplus/minus defines scaling of Panel... dunno if
  this is the correct key. thats for later to worry!

Forgot to mention in previous commit:

- Panels now have a uiSetPanelStyle() API call. Is under construction...
  now for test purposes mostly.
2003-10-15 12:51:01 +00:00
6480956c58 - expanded internal windowmanager that it allows button panels in any
window (type)
- each SpaceData struct (not the window!) can get 'block handlers'
  assigned, basically event codes that invoke drawing button panels.
- this is saved in files, and Panels behave in any window like it does now
  in buttonswindow
- it also means that a 'space window' should leave with a matrix set for
  buttons level
- try it in view3d header menu, 'view'->'backdrop'. this opens the old
  viewbuttons
- it all works non blocking! instant updates of viewbuttons visible in
  3d window now.

Not done yet:
- checking and fixing frontbuffer drawing (select a wireframe draws over)
- temporally vertices cannot be selected, is my next project
- closing or hiding Panels...
- styling stuff... i committed for others to review as well.

Have fun. this is certainly a huge improvement over the old viewbuttons!
2003-10-15 12:26:26 +00:00
0c1bad34c7 - another improvement in button panels align: after 'home' it puts the panels
always in the left/top corner. it did a centre first...
- fixed color print error with AA fonts in textbuttons
2003-10-14 21:01:01 +00:00
5466b63463 Modifications to buttons drawing code:
- colour tweaks to buttons and menus
- improved method of drawing triangles on menus and numbuts
2003-10-14 16:38:48 +00:00
4629da0ffa - fixed threshold for merging closed Panels (was not sufficient narrow)
- in 'Horizontal Align' mode, Panels now close as a vertical bar
- switching align modes, also switches how closed Panels are drawn
- opengl nor ftgl support vertical string drawing... so for now it only
  draws the capitals of the Panel title in a horizontal collapsed header
2003-10-14 10:45:35 +00:00
ceb26d2a4e - experiment: changed drawing style of Panels to minimal and fully
transparant.
- converted the Texture buttons, they're nice too!
2003-10-13 14:57:43 +00:00
12236bcdfa - restored scriptlink buttons
i tried to find place for it in the other menus, like material, object,
  camera, etc. But thats hard... now it's just one nice Panel, without
  the idiot headerbuttons icons!
- changed drawing of 'tabbed' Panels. The old method takes too much space.
  hint from xype! Dragging tabbed Panels can be done with the right hand
  circle. designers are welcom to tweak this.
  main reason: dragging is not meant to be happening a lot... pressing tabs
  is more important.
2003-10-12 22:26:09 +00:00
f729cbdf52 - added radiobuttons
- cleaned unused calls and defines
2003-10-12 19:46:17 +00:00
5f6d8e59c4 - Converted lamp buttons and world buttons, they're pretty!
- menu auto open now is user preset, including 2 thresholds you can set
- hilites of pulldown menus were not cleared, fixed
- changed F4 key to logic. F5 will show lamp buttons, when lamp active
- in 'shader context' buttons, clicking camera will show world
- Converted lamp buttons and world buttons, they're pretty!
- menu auto open now is user preset, including 2 thresholds you can set
- hilites of pulldown menus were not cleared, fixed
- changed F4 key to logic. F5 will show lamp buttons, when lamp active
- in 'shader context' buttons, clicking camera will show world
2003-10-12 13:58:56 +00:00
a9c694d6c5 - rewrote the panel align heuristics.
leftmost/top panel now always at same location, so switching button
  'main contextes' works consistantly
- fixed some more events to make sure Panels update when editing
- preview render panel now is 320 wide, just for getting the space filled!
- error in preview render matrix, which caused unpredictable drawing errors

Bedtime!

-Ton-
2003-10-12 00:42:09 +00:00
0ce9abf41d - converted full materialbuttons...
EEEK! It doesn't look well yet! Hopefully it inspires others to come
  with great solutions.
- the material buttons have 6 panels, three of them merged
- some drawing errors in preview render
- made settings for new Material that makes sense for Flares
2003-10-11 22:00:30 +00:00
95ce9b93be - fixes in material buttons (still tentative design!)
- cutoff of text in menus and buttons now even better!
- size of pull-up menu buttons is corrected
- pressing at 'menu button' had a delay, fixed

General: the 'outo open' wont become default, it will be removed or
become a user option. I am experimenting with it to get it all OK.
The 'auto open' for secondary levels in pulldowns will remain there

Check the latest state of pull-up menu buttons. for example the mode
selector: you can use such buttons in three ways,

- click on it, it opens and you can select
- click-and-hold-mouse, move, release at item you want to select
- move mouse over button, wait, it opens

The 'auto open' and its time threshold both can be user settings.
2003-10-11 18:15:07 +00:00
a153a7616b - two more panels for material buttons. work in progress.... 2003-10-11 14:12:14 +00:00
b8be7337f0 - small fix, number buttons strings were cut off like sliders... 2003-10-11 11:28:24 +00:00
f437176ac2 - improved drawing of slider button
- strings for slider button are cut off correctly
2003-10-11 10:57:38 +00:00
7913a4a009 - added method to have a preview render in panel
- increased size of preview from 100 to 125 pix :)
- put back header buttons for databrowse, but they need to move to
  buttonswindow itself
2003-10-11 00:21:05 +00:00
c957bba8ab - fixed bug in aligning different sized panels vertically 2003-10-10 21:14:49 +00:00
ee70acd287 - small little unitialized variable error... 2003-10-10 17:47:54 +00:00
0d03929b9b Another huge commit!!!
First, check on the new files, which are listed below.
The new butspace.h is a local include, only to be used for the buttons
drawn in the buttonswindow.

- editbuts, animbuts, gamebuts, displaybuts, paintbuts,  work now
- i quite completely reorganized it, it's now nicely telling you what
  context it is in
- sorting error in panel align fixed (tabs were flipping)
- align works correctly automatic when you click around in Blender
- editsca.c renamed to buttons_logic.h
- button names are truncated from the right for allmost all buttons
  (except text buttons and number buttons)
- while dragging panels, you cannot move them outside window anymore

And of course fixed loads of little bugs I encountered while testing
it all. This is a version I really need good test & feedback for.

Next step: restoring material/lamp/texture/world
2003-10-10 17:29:01 +00:00
416b110f90 - brought back hilites in buttons when mouse-over
- automatic pulldown opening can now be controlled ( user setting?)
  it has two thresholds:
  - when no menu was opened before, it waits A milliseconds
  - when (in the same block a menu was opened, it waits B millisec.
  Currently A= 0.4 sec, B= 0.1 (or so)
- 3d window header; brought back old drawtype menu (test, compare!)
- another test: the old menubutton doesnt work anymore with hold-mouse
  only, you can also use it as the other popups (old method still works)
- proposal; all buttons that pop up a block, get special drawtype (arrows)
2003-10-07 22:55:16 +00:00
f234b44d47 - another huge commit! read this!
- removed src/buttons.c and include/BIF_buttons.h
- added src/buttons.txt, which is the old buttons.c for review and adding
  code to new panels structure

- changed internal events to match new buttonspace structure
- added tabs for new shading group of buttons
- removed loads of little warnings, -Wall now compiles src/ almost without
  error (hint: setenv NAN_QUIET to see it all better)

Now I'm ready to do actual buttons -> panels conversion. I will do the raw
versions first, others then can cleanup
2003-10-07 18:24:02 +00:00
39b1ceb669 - changed header from buttonwindow into new type
- changed meaning of F4-F10 keys (as compatible as possible, but we need
  something!) check UI design doc for proposal
- made new call for switching direction of buttons in Y, for when pulldown
  moves direction
- cleaned up all redundant manual switching code from headerbuttons.c
2003-10-07 12:49:39 +00:00
ab935a5a7d - at designer request: move closed button of panel to the left. 2003-10-06 22:17:57 +00:00
2045428809 - fixed bugs with Panel.. when you merge them while they had tabs,
some calculations went wrong.
2003-10-06 21:53:03 +00:00
a14059c5f3 - fixed error (OSX only i think) that didnt make window/area active when
startup
- made nexted pulldowns easier to enter with diagonal mousemovement.
  coded a heuristic like:
  - while mouse moves in good x direction
  - while mouse motion x is bigger than y motion
  - while distance to center block diminishes
  - only for 1 second
  Works nice, but i left debug prints commented in for those who'd like
  to tweak it.
2003-10-06 14:16:31 +00:00
d5dbaf726a - pulldowns and 'BLOCK' buttons now open automatic, when mouseover
without moving for 0.25 second. Also works for sublevels in pulldowns.
- removed hacks from mainloop, which caused setting the main window and
  active subwindow for each event (including mousemove).
  WARN: test for all OS's that no events get lost, and active window focus
  is OK. For OSX it works nicely
- reduced load for uibuttons with 50%....
2003-10-06 10:33:01 +00:00
5ebb3aa7ff - fixed more menu colors
- left in patch for sgi, seems to work there....
  would like some reports from nvidia windows users though
2003-10-05 21:00:01 +00:00
336afad8d6 - added little original feature to panels: TABS! :)
while dragging you can merge panels, or while dragging on a tab you
  can unmerge them.
2003-10-05 13:19:08 +00:00
842bb449c5 huge commit, sorry!
this is part 1 of the UI makeover. It has:
- menu system from Matt integrated
- buttons drawing from Matt
- generic button panel system implemented
- converted displaybuttons (not the rest yet)
- cleaned up a lot in drawing spaces itself, to make it aligned and pixel exact.
- cleaned loads of little compiler warnings, protos...

still a lot of work needed, will all be in next week i hope!

(warn: 2 new c files! butspace.c and buttons_scene.c)
2003-10-04 20:35:50 +00:00
e2a702a7b4 - Fixed bug #440, an error resulting from work at optimizing 'glflush'
calls.

  Added a comment in the code why it happens... its about safely
  escaping from buttons/blocks loops before loading a new file!
2003-08-07 14:08:41 +00:00
932e9e8316 - new standard .b.blend file which has changes:
- the plane has a material
  - material has texture
  - scene has a world
  - default set 'draw faces' and 'draw edges'

that last one for the noobies, to prevent them complaining!

- added a note in interface.c about the new api doc

- forgot to commit blender.c, for setting the G.f from the file
  (this will save faceselect and vertexpaint mode too)
2003-07-22 19:49:47 +00:00
a851bf1b9c - fixed error message at OSX in interface.c, added a load of comments there
to understand the central loop better.
2003-07-18 18:32:57 +00:00
Chris Want
fbdc3ca860 Was doing #include "FTF_api.h" instead of #include "FTF_Api.h" 2003-07-16 04:53:15 +00:00
288f37903b Was including BMF_api.h instead of BMF_Api.h
Kent
2003-07-15 14:43:18 +00:00
0ed095bbb1 Removed the old INTERNATIONAL Drawstring constructions.
These are now handled through BIF_DrawString(...) in src/language.c,
where it chooses between the old BMF and the new FTF DrawString.
2003-07-14 13:48:44 +00:00