[Bf-blender-cvs] [61e1ea3] master: Use text cursor for py-console
Campbell Barton
noreply at git.blender.org
Mon Jun 30 10:13:35 CEST 2014
Commit: 61e1ea382b84c1c1d3cd4c03da37fa4c282ea1d4
Author: Campbell Barton
Date: Mon Jun 30 18:12:29 2014 +1000
https://developer.blender.org/rB61e1ea382b84c1c1d3cd4c03da37fa4c282ea1d4
Use text cursor for py-console
===================================================================
M source/blender/editors/space_console/space_console.c
===================================================================
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index 43313c7..e4a61a8 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;
More information about the Bf-blender-cvs
mailing list