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:
authorJulian Eisel <julian@blender.org>2020-09-03 18:39:57 +0300
committerJulian Eisel <julian@blender.org>2020-09-03 18:46:23 +0300
commitd2c52d4de2ca20dd2ba0254dd6207a70e9bd0597 (patch)
tree336b9f581487911e5bb2c100002868a5e86c5ed1 /source/blender/editors/include
parentd8a80e5949e454d8e326f54abf0ef9a0bc3aeb83 (diff)
Cleanup: Add/use function to disable buttons with a disabled hint
We do this in a couple of places, so it's worth having the logic wrapped into a function. Also, the only way to set the disabled hint for a button from outside of `interface/` was through `UI_block_lock_set()`/`UI_block_lock_clear()`, for which the usage isn't obvious when you just try to disable a single button.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/UI_interface.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 01e3dd22648..ab5e2fcee6a 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -732,6 +732,8 @@ bool UI_but_flag_is_set(uiBut *but, int flag);
void UI_but_drawflag_enable(uiBut *but, int flag);
void UI_but_drawflag_disable(uiBut *but, int flag);
+void UI_but_disable(uiBut *but, const char *disabled_hint);
+
void UI_but_type_set_menu_from_pulldown(uiBut *but);
/* special button case, only draw it when used actively, for outliner etc */