mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Add support for radio-looking items with icon
Letting users of `PopupMenu` use them. `OptionButton` was one of those interested and is updated in this commit. Fixes #18063.
This commit is contained in:
@@ -112,7 +112,7 @@ void OptionButton::pressed() {
|
||||
|
||||
void OptionButton::add_icon_item(const Ref<Texture> &p_icon, const String &p_label, int p_ID) {
|
||||
|
||||
popup->add_icon_check_item(p_icon, p_label, p_ID);
|
||||
popup->add_icon_radio_check_item(p_icon, p_label, p_ID);
|
||||
if (popup->get_item_count() == 1)
|
||||
select(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user