diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-06-30 12:12:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-06-30 12:12:29 +0400 |
commit | 61e1ea382b84c1c1d3cd4c03da37fa4c282ea1d4 (patch) | |
tree | 14042ac3286842a60b363b06b6ec95e154b7cf10 /source/blender/editors/space_console | |
parent | 730a1556a655456248892cfa1f9ea5288791bda0 (diff) |
Use text cursor for py-console
Diffstat (limited to 'source/blender/editors/space_console')
-rw-r--r-- | source/blender/editors/space_console/space_console.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c index 43313c7dd06..e4a61a8f06e 100644 --- a/source/blender/editors/space_console/space_console.c +++ b/source/blender/editors/space_console/space_console.c @@ -158,6 +158,18 @@ static void console_main_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_dropbox_handler(&ar->handlers, lb); } +/* same as 'text_cursor' */ +static void console_cursor(wmWindow *win, ScrArea *sa, ARegion *ar) +{ + SpaceText *st = sa->spacedata.first; + int wmcursor = BC_TEXTEDITCURSOR; + + if (st->text && BLI_rcti_isect_pt(&st->txtbar, win->eventstate->x - ar->winrct.xmin, st->txtbar.ymin)) { + wmcursor = CURSOR_STD; + } + + WM_cursor_set(win, wmcursor); +} /* ************* dropboxes ************* */ @@ -396,6 +408,7 @@ void ED_spacetype_console(void) art->init = console_main_area_init; art->draw = console_main_area_draw; + art->cursor = console_cursor; art->listener = console_main_area_listener; |