summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--.travis.yml4
-rw-r--r--SConstruct45
-rw-r--r--core/bind/core_bind.cpp7
-rw-r--r--core/bind/core_bind.h2
-rw-r--r--core/engine.cpp4
-rw-r--r--core/global_config.cpp2
-rw-r--r--core/math/a_star.cpp7
-rw-r--r--core/math/a_star.h1
-rw-r--r--core/os/os.h2
-rw-r--r--doc/base/classes.xml16
-rw-r--r--editor/editor_plugin.cpp20
-rw-r--r--editor/editor_plugin.h2
-rw-r--r--editor/project_manager.cpp6
-rw-r--r--methods.py14
-rw-r--r--modules/visual_script/visual_script_nodes.cpp2
-rw-r--r--platform/uwp/detect.py3
-rw-r--r--platform/x11/os_x11.cpp21
-rw-r--r--platform/x11/os_x11.h2
-rw-r--r--scene/gui/item_list.cpp2
-rw-r--r--scene/gui/line_edit.cpp10
-rw-r--r--scene/gui/option_button.cpp4
-rw-r--r--scene/gui/popup_menu.cpp2
-rw-r--r--scene/gui/text_edit.cpp9
-rw-r--r--scene/resources/material.cpp2
-rw-r--r--scene/resources/mesh_data_tool.cpp6
-rw-r--r--scene/resources/packed_scene.cpp2
27 files changed, 168 insertions, 32 deletions
diff --git a/.gitignore b/.gitignore
index 7552e8fd17..497d8b50d2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -284,3 +284,6 @@ platform/windows/godot_res.res
# Visual Studio 2017 and Visual Studio Code workspace folder
/.vs
/.vscode
+
+# Scons progress indicator
+.scons_node_count
diff --git a/.travis.yml b/.travis.yml
index 12d49f5d5d..8aa21a4de4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -88,8 +88,8 @@ script:
sh ./misc/travis/clang-format.sh;
else
if [ "$TRAVIS_OS_NAME" = "windows" ]; then
- scons platform=$GODOT_TARGET CXX=$CXX openssl=builtin;
+ scons platform=$GODOT_TARGET progress=no verbose=yes CXX=$CXX openssl=builtin;
else
- scons platform=$GODOT_TARGET bits=64 CXX=$CXX openssl=builtin;
+ scons platform=$GODOT_TARGET progress=no verbose=yes bits=64 CXX=$CXX openssl=builtin;
fi
fi
diff --git a/SConstruct b/SConstruct
index a403117065..e2cfd3ec35 100644
--- a/SConstruct
+++ b/SConstruct
@@ -150,9 +150,11 @@ opts.Add('disable_3d', "Disable 3D nodes for smaller executable (yes/no)", 'no')
opts.Add('disable_advanced_gui', "Disable advance 3D gui nodes and behaviors (yes/no)", 'no')
opts.Add('extra_suffix', "Custom extra suffix added to the base filename of all generated binary files", '')
opts.Add('unix_global_settings_path', "UNIX-specific path to system-wide settings. Currently only used for templates", '')
-opts.Add('verbose', "Enable verbose output for the compilation (yes/no)", 'yes')
+opts.Add('verbose', "Enable verbose output for the compilation (yes/no)", 'no')
opts.Add('vsproj', "Generate Visual Studio Project. (yes/no)", 'no')
-opts.Add('warnings', "Set the level of warnings emitted during compilation (extra/all/moderate/no)", 'all')
+opts.Add('warnings', "Set the level of warnings emitted during compilation (extra/all/moderate/no)", 'no')
+opts.Add('progress', "Show a progress indicator during build (yes/no)", 'yes')
+opts.Add('dev', "If yes, alias for verbose=yes warnings=all (yes/no)", 'no')
# Thirdparty libraries
opts.Add('builtin_enet', "Use the builtin enet library (yes/no)", 'yes')
@@ -231,6 +233,10 @@ if selected_platform in platform_list:
env = detect.create(env_base)
else:
env = env_base.Clone()
+
+ if (env["dev"] == "yes"):
+ env["warnings"] = "all"
+ env["verbose"] = "yes"
if env['vsproj'] == "yes":
env.vs_incs = []
@@ -449,3 +455,38 @@ else:
for x in platform_list:
print("\t" + x)
print("\nPlease run scons again with argument: platform=<string>")
+
+
+screen = sys.stdout
+node_count = 0
+node_count_max = 0
+node_count_interval = 1
+node_count_fname = str(env.Dir('#')) + '/.scons_node_count'
+
+def progress_function(node):
+ global node_count, node_count_max, node_count_interval, node_count_fname
+ node_count += node_count_interval
+ if (node_count_max > 0 and node_count <= node_count_max):
+ screen.write('\r[%3d%%] ' % (node_count * 100 / node_count_max))
+ screen.flush()
+ elif (node_count_max > 0 and node_count > node_count_max):
+ screen.write('\r[100%] ')
+ screen.flush()
+ else:
+ screen.write('\r[Initial build] ')
+ screen.flush()
+
+def progress_finish(target, source, env):
+ global node_count
+ with open(node_count_fname, 'w') as f:
+ f.write('%d\n' % node_count)
+
+if (env["progress"] == "yes"):
+ try:
+ with open(node_count_fname) as f:
+ node_count_max = int(f.readline())
+ except:
+ pass
+ Progress(progress_function, interval = node_count_interval)
+ progress_finish_command = Command('progress_finish', [], progress_finish)
+ AlwaysBuild(progress_finish_command)
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 095f058ed9..e863078a48 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -300,6 +300,11 @@ bool _OS::get_borderless_window() const {
return OS::get_singleton()->get_borderless_window();
}
+void _OS::set_ime_position(const Point2 &p_pos) {
+
+ return OS::get_singleton()->set_ime_position(p_pos);
+}
+
void _OS::set_use_file_access_save_and_swap(bool p_enable) {
FileAccess::set_backup_save(p_enable);
@@ -993,6 +998,8 @@ void _OS::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_borderless_window", "borderless"), &_OS::set_borderless_window);
ClassDB::bind_method(D_METHOD("get_borderless_window"), &_OS::get_borderless_window);
+ ClassDB::bind_method(D_METHOD("set_ime_position"), &_OS::set_ime_position);
+
ClassDB::bind_method(D_METHOD("set_screen_orientation", "orientation"), &_OS::set_screen_orientation);
ClassDB::bind_method(D_METHOD("get_screen_orientation"), &_OS::get_screen_orientation);
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index 87d84c0732..f72f665d9e 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -158,6 +158,8 @@ public:
virtual void set_borderless_window(bool p_borderless);
virtual bool get_borderless_window() const;
+ virtual void set_ime_position(const Point2 &p_pos);
+
Error native_video_play(String p_path, float p_volume, String p_audio_track, String p_subtitle_track);
bool native_video_is_playing();
void native_video_pause();
diff --git a/core/engine.cpp b/core/engine.cpp
index 5301c4e519..42850325b4 100644
--- a/core/engine.cpp
+++ b/core/engine.cpp
@@ -30,6 +30,7 @@
#include "engine.h"
#include "version.h"
+#include "version_hash.gen.h"
void Engine::set_iterations_per_second(int p_ips) {
@@ -87,6 +88,9 @@ Dictionary Engine::get_version_info() const {
dict["revision"] = _MKSTR(VERSION_REVISION);
dict["year"] = VERSION_YEAR;
+ String hash = String(VERSION_HASH);
+ dict["hash"] = hash.length() == 0 ? String("unknown") : hash;
+
String stringver = String(dict["major"]) + "." + String(dict["minor"]);
if ((int)dict["patch"] != 0)
stringver += "." + String(dict["patch"]);
diff --git a/core/global_config.cpp b/core/global_config.cpp
index ba0a7f3e31..caae73ee2e 100644
--- a/core/global_config.cpp
+++ b/core/global_config.cpp
@@ -835,7 +835,7 @@ void GlobalConfig::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_singleton", "name"), &GlobalConfig::get_singleton_object);
ClassDB::bind_method(D_METHOD("load_resource_pack", "pack"), &GlobalConfig::_load_resource_pack);
ClassDB::bind_method(D_METHOD("property_can_revert", "name"), &GlobalConfig::property_can_revert);
- ClassDB::bind_method(D_METHOD("property_get_revert", "name"), &GlobalConfig::property_get_revert);
+ ClassDB::bind_method(D_METHOD("property_get_revert:Variant", "name"), &GlobalConfig::property_get_revert);
ClassDB::bind_method(D_METHOD("save_custom", "file"), &GlobalConfig::_save_custom_bnd);
}
diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp
index 838fec22f0..04e4383f03 100644
--- a/core/math/a_star.cpp
+++ b/core/math/a_star.cpp
@@ -123,6 +123,12 @@ void AStar::disconnect_points(int p_id, int p_with_id) {
a->neighbours.erase(b);
b->neighbours.erase(a);
}
+
+bool AStar::has_point(int p_id) const {
+
+ return points.has(p_id);
+}
+
bool AStar::are_points_connected(int p_id, int p_with_id) const {
Segment s(p_id, p_with_id);
@@ -400,6 +406,7 @@ void AStar::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_point_pos", "id"), &AStar::get_point_pos);
ClassDB::bind_method(D_METHOD("get_point_weight_scale", "id"), &AStar::get_point_weight_scale);
ClassDB::bind_method(D_METHOD("remove_point", "id"), &AStar::remove_point);
+ ClassDB::bind_method(D_METHOD("has_point", "id"), &AStar::has_point);
ClassDB::bind_method(D_METHOD("connect_points", "id", "to_id", "bidirectional"), &AStar::connect_points, DEFVAL(true));
ClassDB::bind_method(D_METHOD("disconnect_points", "id", "to_id"), &AStar::disconnect_points);
diff --git a/core/math/a_star.h b/core/math/a_star.h
index 34a5358344..ebf1407c17 100644
--- a/core/math/a_star.h
+++ b/core/math/a_star.h
@@ -104,6 +104,7 @@ public:
Vector3 get_point_pos(int p_id) const;
real_t get_point_weight_scale(int p_id) const;
void remove_point(int p_id);
+ bool has_point(int p_id) const;
void connect_points(int p_id, int p_with_id, bool bidirectional = true);
void disconnect_points(int p_id, int p_with_id);
diff --git a/core/os/os.h b/core/os/os.h
index 11fe8b44e3..cafd1f4e14 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -179,6 +179,8 @@ public:
virtual void set_borderless_window(int p_borderless) {}
virtual bool get_borderless_window() { return 0; }
+ virtual void set_ime_position(const Point2 &p_pos) {}
+
virtual Error open_dynamic_library(const String p_path, void *&p_library_handle) { return ERR_UNAVAILABLE; };
virtual Error close_dynamic_library(void *p_library_handle) { return ERR_UNAVAILABLE; };
virtual Error get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle) { return ERR_UNAVAILABLE; };
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index 6ff3e0fa29..7a81eddd92 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -13313,6 +13313,22 @@
<description>
</description>
</method>
+ <method name="open_scene_from_path">
+ <argument index="0" name="scene_filepath" type="String">
+ </argument>
+ </return>
+ <description>
+ Opens scene in editor. Do not use during plugin initialization. If you need, then use it together with [method Object.call_deferred].
+ </description>
+ </method>
+ <method name="reload_scene_from_path">
+ <argument index="0" name="scene_filepath" type="String">
+ </argument>
+ </return>
+ <description>
+ Reloads already loaded editor scene.
+ </description>
+ </method>
<method name="forward_canvas_gui_input" qualifiers="virtual">
<return type="bool">
</return>
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index e4b055a9e2..606fd8ee5e 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -80,6 +80,24 @@ void EditorPlugin::edit_resource(const Ref<Resource> &p_resource) {
EditorNode::get_singleton()->edit_resource(p_resource);
}
+void EditorPlugin::open_scene_from_path(const String &scene_path) {
+
+ if (EditorNode::get_singleton()->is_changing_scene()) {
+ return;
+ }
+
+ EditorNode::get_singleton()->open_request(scene_path);
+}
+
+void EditorPlugin::reload_scene_from_path(const String &scene_path) {
+
+ if (EditorNode::get_singleton()->is_changing_scene()) {
+ return;
+ }
+
+ EditorNode::get_singleton()->reload_scene(scene_path);
+}
+
void EditorPlugin::add_control_to_container(CustomControlContainer p_location, Control *p_control) {
switch (p_location) {
@@ -376,6 +394,8 @@ void EditorPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_editor_settings:EditorSettings"), &EditorPlugin::get_editor_settings);
ClassDB::bind_method(D_METHOD("queue_save_layout"), &EditorPlugin::queue_save_layout);
ClassDB::bind_method(D_METHOD("edit_resource"), &EditorPlugin::edit_resource);
+ ClassDB::bind_method(D_METHOD("open_scene_from_path", "scene_filepath"), &EditorPlugin::open_scene_from_path);
+ ClassDB::bind_method(D_METHOD("reload_scene_from_path", "scene_filepath"), &EditorPlugin::reload_scene_from_path);
ClassDB::bind_method(D_METHOD("add_import_plugin"), &EditorPlugin::add_import_plugin);
ClassDB::bind_method(D_METHOD("remove_import_plugin"), &EditorPlugin::remove_import_plugin);
ClassDB::bind_method(D_METHOD("set_input_event_forwarding_always_enabled"), &EditorPlugin::set_input_event_forwarding_always_enabled);
diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h
index 57a22a8b2f..3653851d5a 100644
--- a/editor/editor_plugin.h
+++ b/editor/editor_plugin.h
@@ -103,6 +103,8 @@ public:
void remove_control_from_bottom_panel(Control *p_control);
Control *get_editor_viewport();
void edit_resource(const Ref<Resource> &p_resource);
+ void open_scene_from_path(const String &scene_path);
+ void reload_scene_from_path(const String &scene_path);
void add_tool_menu_item(const String &p_name, Object *p_handler, const String &p_callback, const Variant &p_ud = Variant());
void add_tool_submenu_item(const String &p_name, Object *p_submenu);
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index a3d3d42110..e3f22c833e 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -49,6 +49,7 @@
#include "scene/gui/texture_rect.h"
#include "scene/gui/tool_button.h"
#include "version.h"
+#include "version_hash.gen.h"
class NewProjectDialog : public ConfirmationDialog {
@@ -1244,7 +1245,10 @@ ProjectManager::ProjectManager() {
top_hb->add_child(ccl);
top_hb->add_spacer();
l = memnew(Label);
- l->set_text("v" VERSION_MKSTRING);
+ String hash = String(VERSION_HASH);
+ if (hash.length() != 0)
+ hash = "." + hash.left(7);
+ l->set_text("v" VERSION_MKSTRING "" + hash);
//l->add_font_override("font",get_font("bold","Fonts"));
l->set_align(Label::ALIGN_CENTER);
top_hb->add_child(l);
diff --git a/methods.py b/methods.py
index 4d3d5ae343..abd87c07d7 100644
--- a/methods.py
+++ b/methods.py
@@ -1176,6 +1176,20 @@ def update_version():
f.write("#define VERSION_STATUS " + str(version.status) + "\n")
import datetime
f.write("#define VERSION_YEAR " + str(datetime.datetime.now().year) + "\n")
+ f.close()
+
+ fhash = open("core/version_hash.gen.h", "wb")
+ githash = ""
+ if os.path.isfile(".git/HEAD"):
+ head = open(".git/HEAD", "rb").readline().strip()
+ if head.startswith("ref: "):
+ head = ".git/" + head[5:]
+ if os.path.isfile(head):
+ githash = open(head, "rb").readline().strip()
+ else:
+ githash = head
+ fhash.write("#define VERSION_HASH \"" + githash + "\"")
+ fhash.close()
def parse_cg_file(fname, uniforms, sizes, conditionals):
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index f707471405..5f24bcc2c3 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -1076,7 +1076,7 @@ void VisualScriptConstant::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_constant_type"), &VisualScriptConstant::get_constant_type);
ClassDB::bind_method(D_METHOD("set_constant_value", "value"), &VisualScriptConstant::set_constant_value);
- ClassDB::bind_method(D_METHOD("get_constant_value"), &VisualScriptConstant::get_constant_value);
+ ClassDB::bind_method(D_METHOD("get_constant_value:Variant"), &VisualScriptConstant::get_constant_value);
String argt = "Null";
for (int i = 1; i < Variant::VARIANT_MAX; i++) {
diff --git a/platform/uwp/detect.py b/platform/uwp/detect.py
index ca469d0056..64dac93f1f 100644
--- a/platform/uwp/detect.py
+++ b/platform/uwp/detect.py
@@ -115,7 +115,6 @@ def configure(env):
angle_build_cmd += "Win32"
- env.Append(CPPFLAGS=['/DPNG_ABORT=abort'])
env.Append(LINKFLAGS=['/MACHINE:X86'])
env.Append(LIBPATH=[vc_base_path + 'lib/store'])
env.Append(LIBPATH=[angle_root + '/winrt/10/src/Release_Win32/lib'])
@@ -141,7 +140,7 @@ def configure(env):
winver = "0x0602" # Windows 8 is the minimum target for UWP build
env.Append(CCFLAGS=['/DWINVER=%s' % winver, '/D_WIN32_WINNT=%s' % winver])
- env.Append(CPPFLAGS=['/D', '__WRL_NO_DEFAULT_LIB__', '/D', 'WIN32'])
+ env.Append(CPPFLAGS=['/D', '__WRL_NO_DEFAULT_LIB__', '/D', 'WIN32', '/DPNG_ABORT=abort'])
env.Append(CPPFLAGS=['/AI', vc_base_path + 'lib/store/references'])
env.Append(CPPFLAGS=['/AI', vc_base_path + 'lib/x86/store/references'])
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 790182794e..4aca1468b1 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -508,22 +508,17 @@ void OS_X11::xim_destroy_callback(::XIM im, ::XPointer client_data,
os->xic = NULL;
}
-void OS_X11::set_ime_position(short x, short y) {
+void OS_X11::set_ime_position(const Point2 &p_pos) {
- if (!xic) {
+ if (!xic)
return;
- }
+
::XPoint spot;
- spot.x = x;
- spot.y = y;
- XVaNestedList preedit_attr = XVaCreateNestedList(0,
- XNSpotLocation, &spot,
- NULL);
- XSetICValues(xic,
- XNPreeditAttributes, preedit_attr,
- NULL);
+ spot.x = short(p_pos.x);
+ spot.y = short(p_pos.y);
+ XVaNestedList preedit_attr = XVaCreateNestedList(0, XNSpotLocation, &spot, NULL);
+ XSetICValues(xic, XNPreeditAttributes, preedit_attr, NULL);
XFree(preedit_attr);
- return;
}
void OS_X11::finalize() {
@@ -1489,7 +1484,7 @@ void OS_X11::process_xevents() {
case ConfigureNotify:
if (xic) {
// Not portable.
- set_ime_position(0, 1);
+ set_ime_position(Point2(0, 1));
}
/* call resizeGLScene only if our window-size changed */
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index 39c512b6bd..12e4bbb086 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -115,7 +115,6 @@ class OS_X11 : public OS_Unix {
::XIMStyle xim_style;
static void xim_destroy_callback(::XIM im, ::XPointer client_data,
::XPointer call_data);
- void set_ime_position(short x, short y);
Point2i last_mouse_pos;
bool last_mouse_pos_valid;
@@ -253,6 +252,7 @@ public:
virtual void set_borderless_window(int p_borderless);
virtual bool get_borderless_window();
+ virtual void set_ime_position(const Point2 &p_pos);
virtual void move_window_to_foreground();
virtual void alert(const String &p_alert, const String &p_title = "ALERT!");
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 160b7b151a..19768d344a 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -1274,7 +1274,7 @@ void ItemList::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_item_disabled", "idx"), &ItemList::is_item_disabled);
ClassDB::bind_method(D_METHOD("set_item_metadata", "idx", "metadata"), &ItemList::set_item_metadata);
- ClassDB::bind_method(D_METHOD("get_item_metadata", "idx"), &ItemList::get_item_metadata);
+ ClassDB::bind_method(D_METHOD("get_item_metadata:Variant", "idx"), &ItemList::get_item_metadata);
ClassDB::bind_method(D_METHOD("set_item_custom_bg_color", "idx", "custom_bg_color"), &ItemList::set_item_custom_bg_color);
ClassDB::bind_method(D_METHOD("get_item_custom_bg_color", "idx"), &ItemList::get_item_custom_bg_color);
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index bc579020bd..8d3271ca8c 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -660,6 +660,11 @@ void LineEdit::_notification(int p_what) {
Point2(x_ofs, y_ofs), Size2(1, caret_height)),
cursor_color);
}
+
+ if (has_focus()) {
+
+ OS::get_singleton()->set_ime_position(get_global_position() + Point2(x_ofs, y_ofs + caret_height));
+ }
} break;
case NOTIFICATION_FOCUS_ENTER: {
@@ -667,12 +672,17 @@ void LineEdit::_notification(int p_what) {
draw_caret = true;
}
+ Point2 cursor_pos = Point2(get_cursor_pos(), 1) * get_minimum_size().height;
+ OS::get_singleton()->set_ime_position(get_global_position() + cursor_pos);
+
if (OS::get_singleton()->has_virtual_keyboard())
OS::get_singleton()->show_virtual_keyboard(text, get_global_rect());
} break;
case NOTIFICATION_FOCUS_EXIT: {
+ OS::get_singleton()->set_ime_position(Point2());
+
if (OS::get_singleton()->has_virtual_keyboard())
OS::get_singleton()->hide_virtual_keyboard();
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index 0806d35d48..f75e0986c1 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -283,7 +283,7 @@ void OptionButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_item_text", "idx"), &OptionButton::get_item_text);
ClassDB::bind_method(D_METHOD("get_item_icon:Texture", "idx"), &OptionButton::get_item_icon);
ClassDB::bind_method(D_METHOD("get_item_ID", "idx"), &OptionButton::get_item_ID);
- ClassDB::bind_method(D_METHOD("get_item_metadata", "idx"), &OptionButton::get_item_metadata);
+ ClassDB::bind_method(D_METHOD("get_item_metadata:Variant", "idx"), &OptionButton::get_item_metadata);
ClassDB::bind_method(D_METHOD("is_item_disabled", "idx"), &OptionButton::is_item_disabled);
ClassDB::bind_method(D_METHOD("get_item_count"), &OptionButton::get_item_count);
ClassDB::bind_method(D_METHOD("add_separator"), &OptionButton::add_separator);
@@ -291,7 +291,7 @@ void OptionButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("select", "idx"), &OptionButton::select);
ClassDB::bind_method(D_METHOD("get_selected"), &OptionButton::get_selected);
ClassDB::bind_method(D_METHOD("get_selected_ID"), &OptionButton::get_selected_ID);
- ClassDB::bind_method(D_METHOD("get_selected_metadata"), &OptionButton::get_selected_metadata);
+ ClassDB::bind_method(D_METHOD("get_selected_metadata:Variant"), &OptionButton::get_selected_metadata);
ClassDB::bind_method(D_METHOD("remove_item", "idx"), &OptionButton::remove_item);
ClassDB::bind_method(D_METHOD("_select_int"), &OptionButton::_select_int);
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index 74b26da580..072e90df3a 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -1096,7 +1096,7 @@ void PopupMenu::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_item_ID", "idx"), &PopupMenu::get_item_ID);
ClassDB::bind_method(D_METHOD("get_item_index", "id"), &PopupMenu::get_item_index);
ClassDB::bind_method(D_METHOD("get_item_accelerator", "idx"), &PopupMenu::get_item_accelerator);
- ClassDB::bind_method(D_METHOD("get_item_metadata", "idx"), &PopupMenu::get_item_metadata);
+ ClassDB::bind_method(D_METHOD("get_item_metadata:Variant", "idx"), &PopupMenu::get_item_metadata);
ClassDB::bind_method(D_METHOD("is_item_disabled", "idx"), &PopupMenu::is_item_disabled);
ClassDB::bind_method(D_METHOD("get_item_submenu", "idx"), &PopupMenu::get_item_submenu);
ClassDB::bind_method(D_METHOD("is_item_separator", "idx"), &PopupMenu::is_item_separator);
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 936a9b77f8..ffa23ce771 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1191,12 +1191,19 @@ void TextEdit::_notification(int p_what) {
}
}
+ if (has_focus()) {
+ OS::get_singleton()->set_ime_position(get_global_position() + cursor_pos + Point2(0, get_row_height()));
+ }
} break;
case NOTIFICATION_FOCUS_ENTER: {
if (!caret_blink_enabled) {
draw_caret = true;
}
+
+ Point2 cursor_pos = Point2(cursor_get_column(), cursor_get_line()) * get_row_height();
+ OS::get_singleton()->set_ime_position(get_global_position() + cursor_pos);
+
if (OS::get_singleton()->has_virtual_keyboard())
OS::get_singleton()->show_virtual_keyboard(get_text(), get_global_rect());
if (raised_from_completion) {
@@ -1206,6 +1213,8 @@ void TextEdit::_notification(int p_what) {
} break;
case NOTIFICATION_FOCUS_EXIT: {
+ OS::get_singleton()->set_ime_position(Point2());
+
if (OS::get_singleton()->has_virtual_keyboard())
OS::get_singleton()->hide_virtual_keyboard();
if (raised_from_completion) {
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index 705702b8be..a0b192259b 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -163,7 +163,7 @@ void ShaderMaterial::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_shader", "shader:Shader"), &ShaderMaterial::set_shader);
ClassDB::bind_method(D_METHOD("get_shader:Shader"), &ShaderMaterial::get_shader);
ClassDB::bind_method(D_METHOD("set_shader_param", "param", "value"), &ShaderMaterial::set_shader_param);
- ClassDB::bind_method(D_METHOD("get_shader_param", "param"), &ShaderMaterial::get_shader_param);
+ ClassDB::bind_method(D_METHOD("get_shader_param:Variant", "param"), &ShaderMaterial::get_shader_param);
}
void ShaderMaterial::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
diff --git a/scene/resources/mesh_data_tool.cpp b/scene/resources/mesh_data_tool.cpp
index dc3713fb57..bf1b3d40be 100644
--- a/scene/resources/mesh_data_tool.cpp
+++ b/scene/resources/mesh_data_tool.cpp
@@ -554,7 +554,7 @@ void MeshDataTool::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_vertex_weights", "idx"), &MeshDataTool::get_vertex_weights);
ClassDB::bind_method(D_METHOD("set_vertex_meta", "idx", "meta"), &MeshDataTool::set_vertex_meta);
- ClassDB::bind_method(D_METHOD("get_vertex_meta", "idx"), &MeshDataTool::get_vertex_meta);
+ ClassDB::bind_method(D_METHOD("get_vertex_meta:Variant", "idx"), &MeshDataTool::get_vertex_meta);
ClassDB::bind_method(D_METHOD("get_vertex_edges", "idx"), &MeshDataTool::get_vertex_edges);
ClassDB::bind_method(D_METHOD("get_vertex_faces", "idx"), &MeshDataTool::get_vertex_faces);
@@ -563,13 +563,13 @@ void MeshDataTool::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_edge_faces", "idx", "faces"), &MeshDataTool::get_edge_faces);
ClassDB::bind_method(D_METHOD("set_edge_meta", "idx", "meta"), &MeshDataTool::set_edge_meta);
- ClassDB::bind_method(D_METHOD("get_edge_meta", "idx"), &MeshDataTool::get_edge_meta);
+ ClassDB::bind_method(D_METHOD("get_edge_meta:Variant", "idx"), &MeshDataTool::get_edge_meta);
ClassDB::bind_method(D_METHOD("get_face_vertex", "idx", "vertex"), &MeshDataTool::get_face_vertex);
ClassDB::bind_method(D_METHOD("get_face_edge", "idx", "edge"), &MeshDataTool::get_face_edge);
ClassDB::bind_method(D_METHOD("set_face_meta", "idx", "meta"), &MeshDataTool::set_face_meta);
- ClassDB::bind_method(D_METHOD("get_face_meta", "idx"), &MeshDataTool::get_face_meta);
+ ClassDB::bind_method(D_METHOD("get_face_meta:Variant", "idx"), &MeshDataTool::get_face_meta);
ClassDB::bind_method(D_METHOD("get_face_normal", "idx"), &MeshDataTool::get_face_normal);
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 50fbb6a162..1afaed2284 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -1671,7 +1671,7 @@ void SceneState::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_node_groups", "idx"), &SceneState::_get_node_groups);
ClassDB::bind_method(D_METHOD("get_node_property_count", "idx"), &SceneState::get_node_property_count);
ClassDB::bind_method(D_METHOD("get_node_property_name", "idx", "prop_idx"), &SceneState::get_node_property_name);
- ClassDB::bind_method(D_METHOD("get_node_property_value", "idx", "prop_idx"), &SceneState::get_node_property_value);
+ ClassDB::bind_method(D_METHOD("get_node_property_value:Variant", "idx", "prop_idx"), &SceneState::get_node_property_value);
ClassDB::bind_method(D_METHOD("get_connection_count"), &SceneState::get_connection_count);
ClassDB::bind_method(D_METHOD("get_connection_source", "idx"), &SceneState::get_connection_source);
ClassDB::bind_method(D_METHOD("get_connection_signal", "idx"), &SceneState::get_connection_signal);