diff options
author | Joshua Leung <aligorith@gmail.com> | 2008-12-01 03:20:19 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2008-12-01 03:20:19 +0300 |
commit | 70fd53b469e9cfa06dcabe99afffd565ff943bbd (patch) | |
tree | 82a076db03235a0ec8b5764463e6c2c4e0dd7df6 /source/blender/editors/space_time | |
parent | 3f0d3e0a50da6920ade941d85d54a7b21e6f1154 (diff) |
View2D - Another WIP commit
* Start of basic scrollbar drawing. This will be improved. Only Outliner shows these for now, as although the Timeline should show them, the old files didn't have them turned on.
* Tidied up the view-panning operator
- Fixed naming convention
- Added user-adjustable properties (deltax, deltay in screenspace)
* Added ctrl-scrollwheel (horizontal) and shift-scrollwheel (vertical) scroll operators. These use the view-panning code too.
Unfortunately, I haven't been able to figure out why the WHEELMOUSEDOWN events don't seem to be triggering the operators!
Diffstat (limited to 'source/blender/editors/space_time')
-rw-r--r-- | source/blender/editors/space_time/space_time.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c index e500477ba23..5a8666d991b 100644 --- a/source/blender/editors/space_time/space_time.c +++ b/source/blender/editors/space_time/space_time.c @@ -119,15 +119,15 @@ static void time_main_area_draw(const bContext *C, ARegion *ar) winx= ar->winrct.xmax-ar->winrct.xmin; winy= ar->winrct.ymax-ar->winrct.ymin; - + UI_view2d_update_size(v2d, winx, winy); /* clear and setup matrix */ UI_GetThemeColor3fv(TH_BACK, col); glClearColor(col[0], col[1], col[2], 0.0); glClear(GL_COLOR_BUFFER_BIT); - - UI_view2d_ortho(C, v2d); + + UI_view2d_view_ortho(C, v2d); /* start and end frame */ time_draw_sfra_efra(C, stime, ar); @@ -143,6 +143,13 @@ static void time_main_area_draw(const bContext *C, ARegion *ar) /* markers */ draw_markers_time(C, 0); + + /* reset view matrix */ + UI_view2d_view_restore(C); + + /* scrollers */ + // FIXME: this is just a quick test + UI_view2d_draw_scrollers(C, &ar->v2d, NULL, (0)); } static void time_main_area_listener(ARegion *ar, wmNotifier *wmn) |