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:
authorAntony Riakiotakis <kalast@gmail.com>2014-10-10 21:13:40 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-10-13 16:35:41 +0400
commit9fcc1a32df1377d22b950854fabc7af53a67b813 (patch)
treefb11bec4ed32bf7703fefad1551390f4c62ca280 /source/blender/makesdna
parent116439ed91dd313fdc30c93b5d76807b7473ad39 (diff)
Pie menus: Confirm threshold
This commit adds a confirm threshold property to pie menus. Basically, this will confirm the pie menu automatically when the distance from the center of the pie exceeds that threshold without a need to release the pie button. The confirm threshold will only work if it is larger than the pie threshold. The confirmation actually occur when the mouse stops moving, to allow multiple pie menus to be better linked together, (see below) This functionality also facilitates the ability for chained pie menus by dragging. Basically, a pie menu item can be a call_menu_pie operator and the new pie menu will still use the original pie menu release event for confirmation. This should allow for quick, gesture based navigation in pie menu hierarchies (going back in the hierarchy is still not supported though) There will be a demonstration pie in the official add-on soon
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h3
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h13
2 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 382fd8c1dbd..769e2573aa4 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -540,7 +540,8 @@ typedef struct UserDef {
* a drag/release pie menu */
short pie_initial_timeout; /* direction in the pie menu will always be calculated from the initial position
* within this time limit */
- int pie_animation_timeout;
+ short pie_animation_timeout;
+ short pie_menu_confirm;
short pie_menu_radius; /* pie menu radius */
short pie_menu_threshold; /* pie menu distance from center before a direction is set */
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index a17e416b5bd..4cf6bfe9a8f 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -171,11 +171,6 @@ typedef struct wmWindow {
void *ghostwin; /* don't want to include ghost.h stuff */
- int winid; /* winid also in screens, is for retrieving this window after read */
-
- short grabcursor; /* cursor grab mode */
- short pad;
-
struct bScreen *screen; /* active screen */
struct bScreen *newscreen; /* temporary when switching */
char screenname[64]; /* MAX_ID_NAME for matching window with active screen after file read */
@@ -187,8 +182,14 @@ typedef struct wmWindow {
short cursor; /* current mouse cursor type */
short lastcursor; /* previous cursor when setting modal one */
short modalcursor; /* the current modal cursor */
+ short grabcursor; /* cursor grab mode */
short addmousemove; /* internal: tag this for extra mousemove event, makes cursors/buttons active on UI switching */
- short pad2;
+
+ int winid; /* winid also in screens, is for retrieving this window after read */
+
+ short lock_pie_event; /* internal, lock pie creation from this event until released */
+ short last_pie_event; /* exception to the above rule for nested pies, store last pie event for operators
+ * that spawn a new pie right after destruction of last pie */
struct wmEvent *eventstate; /* storage for event system */