diff options
author | Ton Roosendaal <ton@blender.org> | 2004-08-31 17:43:18 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-08-31 17:43:18 +0400 |
commit | 0a305446a58c181d2e8f9c1d0af4c7d935117b4c (patch) | |
tree | 2a1de251e2360def5f7fef03458a1d08aa3d12c5 /source/blender/src/interface.c | |
parent | 19a24abcb2584c9c76c14ec32610df11a72bd0c3 (diff) |
Three functionalities in one commit, but there's overlap so I can't
separate it...
1) Curve/Surface editmode undo
Uses same syntax as mesh undo, so simple to integrate. Edit-curve data is
also quite simpler, so no need for any hack at all.
It re-uses the undo system from next point, which is nice short & clean
local code
2) Framework for global undo
The undo calls themselves are commented out. In a next commit I want to
enable it for a couple of main features, for further feedback.
The speed goes surprisingly well, especially with this new version that
'pushes' undo after a command, ensuring interactivity isnt frustrated
3) framework for texture based icons in Blender
Not activated code, but tested here. Part of 2.3 UI project.
btw: Johnny Matthews will assist in (and complete) the undo project
Diffstat (limited to 'source/blender/src/interface.c')
-rw-r--r-- | source/blender/src/interface.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c index 184e796b9be..7e39dff0f17 100644 --- a/source/blender/src/interface.c +++ b/source/blender/src/interface.c @@ -1796,6 +1796,7 @@ static int ui_do_but_NUMSLI(uiBut *but) } else { uiActAsTextBut(but); + uibut_do_func(but); // this is done in ui_do_but_SLI() not in uiActAsTextBut() } while(get_mbut() & L_MOUSE) BIF_wait_for_statechange(); @@ -3090,6 +3091,8 @@ static int ui_do_block(uiBlock *block, uiEvent *uevent) if(inside || uevent->event!=LEFTMOUSE) { butevent= ui_do_button(block, but, uevent); + // if(but->type!=BLOCK) BIF_write_undo(but->str); + if(butevent) addqueue(block->winq, UI_BUT_EVENT, (short)butevent); /* i doubt about the next line! */ @@ -3198,15 +3201,13 @@ static uiSaveUnder *ui_draw_but_tip(uiBut *but) glColor4ub(0, 0, 0, 20); - glBegin(GL_POLYGON); - gl_round_box(x1+3, y1-1, x2+1, y2-2, 2.0); - gl_round_box(x1+3, y1-2, x2+2, y2-2, 3.0); + gl_round_box(GL_POLYGON, x1+3, y1-1, x2+1, y2-2, 2.0); + gl_round_box(GL_POLYGON, x1+3, y1-2, x2+2, y2-2, 3.0); glColor4ub(0, 0, 0, 8); - gl_round_box(x1+3, y1-3, x2+3, y2-3, 4.0); - gl_round_box(x1+3, y1-4, x2+4, y2-3, 5.0); - glEnd(); + gl_round_box(GL_POLYGON, x1+3, y1-3, x2+3, y2-3, 4.0); + gl_round_box(GL_POLYGON, x1+3, y1-4, x2+4, y2-3, 5.0); glDisable(GL_BLEND); |