You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-31 18:41:20 +00:00
Merge pull request #113742 from bruvzg/fd_pop_base
Restore `FileDialog::_popup_base`
This commit is contained in:
@@ -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); }
|
||||
|
||||
Reference in New Issue
Block a user