diff options
Diffstat (limited to 'modules/gdnative')
-rw-r--r-- | modules/gdnative/arvr/arvr_interface_gdnative.cpp | 12 | ||||
-rw-r--r-- | modules/gdnative/gdnative_library_editor_plugin.cpp | 34 | ||||
-rw-r--r-- | modules/gdnative/nativescript/SCsub | 2 | ||||
-rw-r--r-- | modules/gdnative/nativescript/nativescript.cpp | 4 |
4 files changed, 26 insertions, 26 deletions
diff --git a/modules/gdnative/arvr/arvr_interface_gdnative.cpp b/modules/gdnative/arvr/arvr_interface_gdnative.cpp index a033c2b7f9..0f0c864df2 100644 --- a/modules/gdnative/arvr/arvr_interface_gdnative.cpp +++ b/modules/gdnative/arvr/arvr_interface_gdnative.cpp @@ -29,7 +29,7 @@ /*************************************************************************/ #include "arvr_interface_gdnative.h" -#include "main/input_default.h" +#include "core/input/input_filter.h" #include "servers/arvr/arvr_positional_tracker.h" #include "servers/visual/visual_server_globals.h" @@ -317,7 +317,7 @@ godot_int GDAPI godot_arvr_add_controller(char *p_device_name, godot_int p_hand, ARVRServer *arvr_server = ARVRServer::get_singleton(); ERR_FAIL_NULL_V(arvr_server, 0); - InputDefault *input = (InputDefault *)Input::get_singleton(); + InputFilter *input = InputFilter::get_singleton(); ERR_FAIL_NULL_V(input, 0); ARVRPositionalTracker *new_tracker = memnew(ARVRPositionalTracker); @@ -356,7 +356,7 @@ void GDAPI godot_arvr_remove_controller(godot_int p_controller_id) { ARVRServer *arvr_server = ARVRServer::get_singleton(); ERR_FAIL_NULL(arvr_server); - InputDefault *input = (InputDefault *)Input::get_singleton(); + InputFilter *input = InputFilter::get_singleton(); ERR_FAIL_NULL(input); ARVRPositionalTracker *remove_tracker = arvr_server->find_by_type_and_id(ARVRServer::TRACKER_CONTROLLER, p_controller_id); @@ -394,7 +394,7 @@ void GDAPI godot_arvr_set_controller_button(godot_int p_controller_id, godot_int ARVRServer *arvr_server = ARVRServer::get_singleton(); ERR_FAIL_NULL(arvr_server); - InputDefault *input = (InputDefault *)Input::get_singleton(); + InputFilter *input = InputFilter::get_singleton(); ERR_FAIL_NULL(input); ARVRPositionalTracker *tracker = arvr_server->find_by_type_and_id(ARVRServer::TRACKER_CONTROLLER, p_controller_id); @@ -410,14 +410,14 @@ void GDAPI godot_arvr_set_controller_axis(godot_int p_controller_id, godot_int p ARVRServer *arvr_server = ARVRServer::get_singleton(); ERR_FAIL_NULL(arvr_server); - InputDefault *input = (InputDefault *)Input::get_singleton(); + InputFilter *input = InputFilter::get_singleton(); ERR_FAIL_NULL(input); ARVRPositionalTracker *tracker = arvr_server->find_by_type_and_id(ARVRServer::TRACKER_CONTROLLER, p_controller_id); if (tracker != NULL) { int joyid = tracker->get_joy_id(); if (joyid != -1) { - InputDefault::JoyAxis jx; + InputFilter::JoyAxis jx; jx.min = p_can_be_negative ? -1 : 0; jx.value = p_value; input->joy_axis(joyid, p_axis, jx); diff --git a/modules/gdnative/gdnative_library_editor_plugin.cpp b/modules/gdnative/gdnative_library_editor_plugin.cpp index db90199e63..9b4c3c794e 100644 --- a/modules/gdnative/gdnative_library_editor_plugin.cpp +++ b/modules/gdnative/gdnative_library_editor_plugin.cpp @@ -77,9 +77,9 @@ void GDNativeLibraryEditor::_update_tree() { platform->set_text(0, E->get().name); platform->set_metadata(0, E->get().library_extension); - platform->set_custom_bg_color(0, get_color("prop_category", "Editor")); - platform->set_custom_bg_color(1, get_color("prop_category", "Editor")); - platform->set_custom_bg_color(2, get_color("prop_category", "Editor")); + platform->set_custom_bg_color(0, get_theme_color("prop_category", "Editor")); + platform->set_custom_bg_color(1, get_theme_color("prop_category", "Editor")); + platform->set_custom_bg_color(2, get_theme_color("prop_category", "Editor")); platform->set_selectable(0, false); platform->set_expand_right(0, true); @@ -91,31 +91,31 @@ void GDNativeLibraryEditor::_update_tree() { bit->set_text(0, it->get()); bit->set_metadata(0, target); bit->set_selectable(0, false); - bit->set_custom_bg_color(0, get_color("prop_subsection", "Editor")); + bit->set_custom_bg_color(0, get_theme_color("prop_subsection", "Editor")); - bit->add_button(1, get_icon("Folder", "EditorIcons"), BUTTON_SELECT_LIBRARY, false, TTR("Select the dynamic library for this entry")); + bit->add_button(1, get_theme_icon("Folder", "EditorIcons"), BUTTON_SELECT_LIBRARY, false, TTR("Select the dynamic library for this entry")); String file = entry_configs[target].library; if (!file.empty()) { - bit->add_button(1, get_icon("Clear", "EditorIcons"), BUTTON_CLEAR_LIBRARY, false, TTR("Clear")); + bit->add_button(1, get_theme_icon("Clear", "EditorIcons"), BUTTON_CLEAR_LIBRARY, false, TTR("Clear")); } bit->set_text(1, file); - bit->add_button(2, get_icon("Folder", "EditorIcons"), BUTTON_SELECT_DEPENDENCES, false, TTR("Select dependencies of the library for this entry")); + bit->add_button(2, get_theme_icon("Folder", "EditorIcons"), BUTTON_SELECT_DEPENDENCES, false, TTR("Select dependencies of the library for this entry")); Array files = entry_configs[target].dependencies; if (files.size()) { - bit->add_button(2, get_icon("Clear", "EditorIcons"), BUTTON_CLEAR_DEPENDENCES, false, TTR("Clear")); + bit->add_button(2, get_theme_icon("Clear", "EditorIcons"), BUTTON_CLEAR_DEPENDENCES, false, TTR("Clear")); } bit->set_text(2, Variant(files)); - bit->add_button(3, get_icon("MoveUp", "EditorIcons"), BUTTON_MOVE_UP, false, TTR("Move Up")); - bit->add_button(3, get_icon("MoveDown", "EditorIcons"), BUTTON_MOVE_DOWN, false, TTR("Move Down")); - bit->add_button(3, get_icon("Remove", "EditorIcons"), BUTTON_ERASE_ENTRY, false, TTR("Remove current entry")); + bit->add_button(3, get_theme_icon("MoveUp", "EditorIcons"), BUTTON_MOVE_UP, false, TTR("Move Up")); + bit->add_button(3, get_theme_icon("MoveDown", "EditorIcons"), BUTTON_MOVE_DOWN, false, TTR("Move Down")); + bit->add_button(3, get_theme_icon("Remove", "EditorIcons"), BUTTON_ERASE_ENTRY, false, TTR("Remove current entry")); } TreeItem *new_arch = tree->create_item(platform); new_arch->set_text(0, TTR("Double click to create a new entry")); new_arch->set_text_align(0, TreeItem::ALIGN_CENTER); - new_arch->set_custom_color(0, get_color("accent_color", "Editor")); + new_arch->set_custom_color(0, get_theme_color("accent_color", "Editor")); new_arch->set_expand_right(0, true); new_arch->set_metadata(1, E->key()); @@ -133,15 +133,15 @@ void GDNativeLibraryEditor::_on_item_button(Object *item, int column, int id) { if (id == BUTTON_SELECT_LIBRARY || id == BUTTON_SELECT_DEPENDENCES) { - EditorFileDialog::Mode mode = EditorFileDialog::MODE_OPEN_FILE; + EditorFileDialog::FileMode mode = EditorFileDialog::FILE_MODE_OPEN_FILE; if (id == BUTTON_SELECT_DEPENDENCES) - mode = EditorFileDialog::MODE_OPEN_FILES; + mode = EditorFileDialog::FILE_MODE_OPEN_FILES; file_dialog->set_meta("target", target); file_dialog->set_meta("section", section); file_dialog->clear_filters(); file_dialog->add_filter(Object::cast_to<TreeItem>(item)->get_parent()->get_metadata(0)); - file_dialog->set_mode(mode); + file_dialog->set_file_mode(mode); file_dialog->popup_centered_ratio(); } else if (id == BUTTON_CLEAR_LIBRARY) { @@ -372,7 +372,7 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() { file_dialog = memnew(EditorFileDialog); file_dialog->set_access(EditorFileDialog::ACCESS_RESOURCES); - file_dialog->set_resizable(true); + //file_dialog->set_resizable(true); add_child(file_dialog); file_dialog->connect("file_selected", callable_mp(this, &GDNativeLibraryEditor::_on_library_selected)); file_dialog->connect("files_selected", callable_mp(this, &GDNativeLibraryEditor::_on_dependencies_selected)); @@ -382,7 +382,7 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() { new_architecture_dialog->set_title(TTR("Add an architecture entry")); new_architecture_input = memnew(LineEdit); new_architecture_dialog->add_child(new_architecture_input); - new_architecture_dialog->set_custom_minimum_size(Vector2(300, 80) * EDSCALE); + // new_architecture_dialog->set_custom_minimum_size(Vector2(300, 80) * EDSCALE); new_architecture_input->set_anchors_and_margins_preset(PRESET_HCENTER_WIDE, PRESET_MODE_MINSIZE, 5 * EDSCALE); new_architecture_dialog->get_ok()->connect("pressed", callable_mp(this, &GDNativeLibraryEditor::_on_create_new_entry)); } diff --git a/modules/gdnative/nativescript/SCsub b/modules/gdnative/nativescript/SCsub index 92c9d6630d..c28a1c8659 100644 --- a/modules/gdnative/nativescript/SCsub +++ b/modules/gdnative/nativescript/SCsub @@ -5,5 +5,5 @@ Import('env_gdnative') env_gdnative.add_source_files(env.modules_sources, '*.cpp') -if "platform" in env and env["platform"] in ["x11", "iphone"]: +if "platform" in env and env["platform"] in ["linuxbsd", "iphone"]: env.Append(LINKFLAGS=["-rdynamic"]) diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp index fb88479ca3..80aebaccd1 100644 --- a/modules/gdnative/nativescript/nativescript.cpp +++ b/modules/gdnative/nativescript/nativescript.cpp @@ -1827,7 +1827,7 @@ void NativeReloadNode::_notification(int p_what) { #ifdef TOOLS_ENABLED switch (p_what) { - case MainLoop::NOTIFICATION_WM_FOCUS_OUT: { + case NOTIFICATION_WM_FOCUS_OUT: { if (unloaded) break; @@ -1862,7 +1862,7 @@ void NativeReloadNode::_notification(int p_what) { } break; - case MainLoop::NOTIFICATION_WM_FOCUS_IN: { + case NOTIFICATION_WM_FOCUS_IN: { if (!unloaded) break; |