[Bf-blender-cvs] [5162632a209] asset-browser-grid-view: Merge branch 'master' into asset-browser-grid-view
Julian Eisel
noreply at git.blender.org
Fri May 27 11:33:35 CEST 2022
Commit: 5162632a209176350cc951a1783b3b010c910acd
Author: Julian Eisel
Date: Fri May 27 11:33:05 2022 +0200
Branches: asset-browser-grid-view
https://developer.blender.org/rB5162632a209176350cc951a1783b3b010c910acd
Merge branch 'master' into asset-browser-grid-view
===================================================================
===================================================================
diff --cc source/blender/editors/interface/interface_widgets.c
index 1c9cf27fd09,3777ff31b26..110f8146c7f
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@@ -105,25 -105,24 +105,25 @@@ typedef enum
UI_WTYPE_PROGRESSBAR,
UI_WTYPE_NODESOCKET,
UI_WTYPE_TREEROW,
+ UI_WTYPE_GRID_TILE,
} uiWidgetTypeEnum;
- /* Button state argument shares bits with 'uiBut.flag'.
- * reuse flags that aren't needed for drawing to avoid collision. */
- enum {
- /* Show that holding the button opens a menu. */
- UI_STATE_HOLD_ACTION = UI_BUT_UPDATE_DELAY,
- UI_STATE_TEXT_INPUT = UI_BUT_UNDO,
- UI_STATE_ACTIVE_LEFT = UI_BUT_VALUE_CLEAR,
- UI_STATE_ACTIVE_RIGHT = UI_BUT_TEXTEDIT_UPDATE,
- UI_STATE_TEXT_BEFORE_WIDGET = UI_BUT_IMMEDIATE,
-
- UI_STATE_FLAGS_ALL = (UI_STATE_HOLD_ACTION | UI_STATE_TEXT_INPUT | UI_STATE_ACTIVE_LEFT |
- UI_STATE_ACTIVE_RIGHT | UI_STATE_TEXT_BEFORE_WIDGET),
- };
- /* Prevent accidental use. */
- #define UI_BUT_UPDATE_DELAY ((void)0)
- #define UI_BUT_UNDO ((void)0)
+ /**
+ * The button's state information adapted for drawing. Use #STATE_INFO_NULL for empty state.
+ */
+ typedef struct {
+ /** Copy of #uiBut.flag (possibly with overrides for drawing). */
+ int but_flag;
+ /** Copy of #uiBut.drawflag (possibly with overrides for drawing). */
+ int but_drawflag;
+
+ /** Show that holding the button opens a menu. */
+ bool has_hold_action : 1;
+ /** The button is in text input mode. */
+ bool is_text_input : 1;
+ } uiWidgetStateInfo;
+
+ static const uiWidgetStateInfo STATE_INFO_NULL = {0};
/** \} */
More information about the Bf-blender-cvs
mailing list