mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Merge commit godotengine/godot@8004c7524f
This commit is contained in:
@@ -227,7 +227,7 @@ void OptionButton::set_item_icon(int p_idx, const Ref<Texture2D> &p_icon) {
|
||||
popup->set_item_icon(p_idx, p_icon);
|
||||
|
||||
if (current == p_idx) {
|
||||
set_icon(p_icon);
|
||||
set_button_icon(p_icon);
|
||||
}
|
||||
_queue_update_size_cache();
|
||||
}
|
||||
@@ -383,7 +383,7 @@ void OptionButton::_select(int p_which, bool p_emit) {
|
||||
|
||||
current = NONE_SELECTED;
|
||||
set_text("");
|
||||
set_icon(nullptr);
|
||||
set_button_icon(nullptr);
|
||||
} else {
|
||||
ERR_FAIL_INDEX(p_which, popup->get_item_count());
|
||||
|
||||
@@ -393,7 +393,7 @@ void OptionButton::_select(int p_which, bool p_emit) {
|
||||
|
||||
current = p_which;
|
||||
set_text(popup->get_item_text(current));
|
||||
set_icon(popup->get_item_icon(current));
|
||||
set_button_icon(popup->get_item_icon(current));
|
||||
}
|
||||
|
||||
if (is_inside_tree() && p_emit) {
|
||||
|
||||
Reference in New Issue
Block a user