diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-04-10 08:09:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-10 08:09:18 +0200 |
commit | a360a9b3482ba6927b5f6b4d5debff2222b5ab2c (patch) | |
tree | d181f4c39f18f74606b7478e0185fcfa3e101c73 /scene/gui/popup_menu.cpp | |
parent | b1d4e1be6dc6fbe839d0eb57c71e502df333c1fa (diff) | |
parent | b964a9e678a969bdc28972c55655d7f0667d68b7 (diff) |
Merge pull request #18091 from RandomShaper/icon-radio-item
Add support for radio-looking items with icon
Diffstat (limited to 'scene/gui/popup_menu.cpp')
-rw-r--r-- | scene/gui/popup_menu.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index 9ff3bd6e81..fd2466407e 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -588,6 +588,13 @@ void PopupMenu::add_radio_check_item(const String &p_label, int p_ID, uint32_t p update(); } +void PopupMenu::add_icon_radio_check_item(const Ref<Texture> &p_icon, const String &p_label, int p_ID, uint32_t p_accel) { + + add_icon_check_item(p_icon, p_label, p_ID, p_accel); + items[items.size() - 1].checkable_type = Item::CHECKABLE_TYPE_RADIO_BUTTON; + update(); +} + void PopupMenu::add_icon_shortcut(const Ref<Texture> &p_icon, const Ref<ShortCut> &p_shortcut, int p_ID, bool p_global) { ERR_FAIL_COND(p_shortcut.is_null()); |