Restore FileDialog::_popup_base
This commit is contained in:
parent
dec5a373d9
commit
def5763eac
2 changed files with 17 additions and 0 deletions
|
|
@ -95,6 +95,21 @@ bool FileDialog::_can_use_native_popup() const {
|
|||
return DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_NATIVE_DIALOG_FILE);
|
||||
}
|
||||
|
||||
void FileDialog::_popup_base(const Rect2i &p_screen_rect) {
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (is_part_of_edited_scene()) {
|
||||
ConfirmationDialog::_popup_base(p_screen_rect);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (_should_use_native_popup()) {
|
||||
_native_popup();
|
||||
} else {
|
||||
ConfirmationDialog::_popup_base(p_screen_rect);
|
||||
}
|
||||
}
|
||||
|
||||
void FileDialog::set_visible(bool p_visible) {
|
||||
if (p_visible) {
|
||||
_update_option_controls();
|
||||
|
|
|
|||
|
|
@ -374,6 +374,8 @@ protected:
|
|||
virtual bool _should_hide_file(const String &p_file) const { return false; }
|
||||
virtual Color _get_folder_color(const String &p_path) const { return theme_cache.folder_icon_color; }
|
||||
|
||||
virtual void _popup_base(const Rect2i &p_screen_rect = Rect2i()) override;
|
||||
|
||||
void _validate_property(PropertyInfo &p_property) const;
|
||||
void _notification(int p_what);
|
||||
bool _set(const StringName &p_name, const Variant &p_value) { return property_helper.property_set_value(p_name, p_value); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue