summaryrefslogtreecommitdiffstats
path: root/servers/display_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/display_server.cpp')
-rw-r--r--servers/display_server.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/servers/display_server.cpp b/servers/display_server.cpp
index 313e7218ed..5822a630db 100644
--- a/servers/display_server.cpp
+++ b/servers/display_server.cpp
@@ -497,6 +497,11 @@ Error DisplayServer::dialog_input_text(String p_title, String p_description, Str
return OK;
}
+Error DisplayServer::file_dialog_show(const String &p_title, const String &p_current_directory, const String &p_filename, bool p_show_hidden, FileDialogMode p_mode, const Vector<String> &p_filters, const Callable &p_callback) {
+ WARN_PRINT("Native dialogs not supported by this display server.");
+ return OK;
+}
+
int DisplayServer::keyboard_get_layout_count() const {
return 0;
}
@@ -755,6 +760,8 @@ void DisplayServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("dialog_show", "title", "description", "buttons", "callback"), &DisplayServer::dialog_show);
ClassDB::bind_method(D_METHOD("dialog_input_text", "title", "description", "existing_text", "callback"), &DisplayServer::dialog_input_text);
+ ClassDB::bind_method(D_METHOD("file_dialog_show", "title", "current_directory", "filename", "show_hidden", "mode", "filters", "callback"), &DisplayServer::file_dialog_show);
+
ClassDB::bind_method(D_METHOD("keyboard_get_layout_count"), &DisplayServer::keyboard_get_layout_count);
ClassDB::bind_method(D_METHOD("keyboard_get_current_layout"), &DisplayServer::keyboard_get_current_layout);
ClassDB::bind_method(D_METHOD("keyboard_set_current_layout", "index"), &DisplayServer::keyboard_set_current_layout);
@@ -846,6 +853,12 @@ void DisplayServer::_bind_methods() {
BIND_ENUM_CONSTANT(CURSOR_HELP);
BIND_ENUM_CONSTANT(CURSOR_MAX);
+ BIND_ENUM_CONSTANT(FILE_DIALOG_MODE_OPEN_FILE);
+ BIND_ENUM_CONSTANT(FILE_DIALOG_MODE_OPEN_FILES);
+ BIND_ENUM_CONSTANT(FILE_DIALOG_MODE_OPEN_DIR);
+ BIND_ENUM_CONSTANT(FILE_DIALOG_MODE_OPEN_ANY);
+ BIND_ENUM_CONSTANT(FILE_DIALOG_MODE_SAVE_FILE);
+
BIND_ENUM_CONSTANT(WINDOW_MODE_WINDOWED);
BIND_ENUM_CONSTANT(WINDOW_MODE_MINIMIZED);
BIND_ENUM_CONSTANT(WINDOW_MODE_MAXIMIZED);