Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2008-12-15 19:54:47 +0300
committerTon Roosendaal <ton@blender.org>2008-12-15 19:54:47 +0300
commita16df53619a2ab3b41c0cbcf6f9e01a9bf370c9c (patch)
treea96b757fd2a791c242b6ace94b22e465bac9b1d2 /source/blender/editors/space_text
parentc13bb258b1149d8bbfb97b896a58cd748e7cd861 (diff)
2.5
Mouse cursors now work again - centralized screen-level cursor changes, no more operator running for it. - spacetypes have callback to check/set individual cursor types. Use notifier SCREEN_CHANGED to make sure it works on mode changes etc. - new calls WM_cursor_modal() and WM_cursor_restore() to make temporarily cursor types during modes. - used above for view2d cursors.
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r--source/blender/editors/space_text/space_text.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index 54ec53b2434..5b52e43d0f2 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -153,12 +153,20 @@ static void text_main_area_draw(const bContext *C, ARegion *ar)
/* scrollers? */
}
-void text_operatortypes(void)
+static void text_operatortypes(void)
{
}
-void text_keymap(struct wmWindowManager *wm)
+static void text_cursor(wmWindow *win, ARegion *ar)
+{
+ if(ar->regiontype==RGN_TYPE_WINDOW)
+ WM_cursor_set(win, BC_TEXTEDITCURSOR);
+ else
+ WM_cursor_set(win, CURSOR_STD);
+}
+
+static void text_keymap(struct wmWindowManager *wm)
{
}
@@ -209,6 +217,7 @@ void ED_spacetype_text(void)
st->init= text_init;
st->duplicate= text_duplicate;
st->operatortypes= text_operatortypes;
+ st->cursor= text_cursor;
st->keymap= text_keymap;
/* regions: main window */