23 if (item ==
nullptr) {
29 if (kmi->propvalue == item->
value) {
66 const char *xyz_label =
nullptr;
71 xyz_label =
IFACE_(
"Axis");
76 xyz_label =
IFACE_(
"Plane");
83 xyz_label =
IFACE_(
"Proportional Size");
93 for (
int j = 0; j <
ARRAY_SIZE(icon_mod) && icon_mod[j]; j++) {
94 layout->
label(
"", icon_mod[j]);
100 layout->
label(
"", icon);
106 layout->
label(
"", icon);
112 layout->
label(
"", icon);
115 layout->
label(xyz_label, ICON_NONE);
123 const char *ab_label =
nullptr;
128 ab_label =
IFACE_(
"Proportional Size");
138 for (
int j = 0; j <
ARRAY_SIZE(icon_mod) && icon_mod[j]; j++) {
139 layout->
label(
"", icon_mod[j]);
141 if (offset != 0.0f) {
145 layout->
label(
"", icon);
151 layout->
label(
"", icon);
154 layout->
label(ab_label, ICON_NONE);
178 for (
int j = 0; j <
ARRAY_SIZE(icon_mod) && icon_mod[j]; j++) {
179 layout->
label(
"", icon_mod[j]);
181 if (offset != 0.0f) {
188 layout->
label(
"", icon);
189 if (icon >= ICON_MOUSE_LMB && icon <= ICON_MOUSE_MMB_SCROLL) {
195 if (offset != 0.0f) {
204 else if (text_fallback) {
206 layout->
label(event_text, ICON_NONE);
#define BLT_I18NCONTEXT_ID_WINDOWMANAGER
#define CTX_IFACE_(context, msgid)
int UI_icon_from_keymap_item(const wmKeyMapItem *kmi, int r_icon_mod[KM_MOD_NUM])
constexpr const char * c_str() const
float ui_event_icon_offset(const int icon_id)
static const wmKeyMapItem * keymap_item_from_enum_item(const wmKeyMap *keymap, const EnumPropertyItem *item)
bool uiTemplateEventFromKeymapItem(uiLayout *layout, const StringRefNull text, const wmKeyMapItem *kmi, bool text_fallback)
static bool keymap_item_can_collapse(const wmKeyMapItem *kmi_a, const wmKeyMapItem *kmi_b)
int uiTemplateStatusBarModalItem(uiLayout *layout, const wmKeyMap *keymap, const EnumPropertyItem *item)
void label(blender::StringRef name, int icon)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
struct wmKeyMapItem * next
#define ISKEYBOARD(event_type)
const char * WM_key_event_string(const short type, const bool compact)