summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md66
-rw-r--r--doc/base/classes.xml2
-rw-r--r--drivers/unix/ip_unix.cpp4
-rw-r--r--drivers/unix/socket_helpers.h2
-rw-r--r--drivers/windows/dir_access_windows.cpp2
-rw-r--r--drivers/windows/file_access_windows.cpp4
-rw-r--r--drivers/windows/mutex_windows.cpp2
-rw-r--r--drivers/windows/semaphore_windows.cpp2
-rw-r--r--drivers/windows/shell_windows.cpp2
-rw-r--r--drivers/windows/thread_windows.cpp2
-rw-r--r--main/input_default.cpp4
-rw-r--r--modules/freetype/SCsub6
-rw-r--r--modules/freetype/uwpdef.h (renamed from modules/freetype/winrtdef.h)2
-rw-r--r--modules/gdscript/gd_parser.cpp11
-rw-r--r--modules/openssl/SCsub8
-rw-r--r--modules/webm/libvpx/SCsub8
-rw-r--r--platform/uwp/SCsub (renamed from platform/winrt/SCsub)6
-rw-r--r--platform/uwp/app.cpp (renamed from platform/winrt/app.cpp)16
-rw-r--r--platform/uwp/app.h (renamed from platform/winrt/app.h)6
-rw-r--r--platform/uwp/detect.py (renamed from platform/winrt/detect.py)8
-rw-r--r--platform/uwp/export/export.cpp (renamed from platform/winrt/export/export.cpp)64
-rw-r--r--platform/uwp/export/export.h (renamed from platform/winrt/export/export.h)2
-rw-r--r--platform/uwp/gl_context_egl.cpp (renamed from platform/winrt/gl_context_egl.cpp)0
-rw-r--r--platform/uwp/gl_context_egl.h (renamed from platform/winrt/gl_context_egl.h)0
-rw-r--r--platform/uwp/joystick_uwp.cpp (renamed from platform/winrt/joystick_winrt.cpp)26
-rw-r--r--platform/uwp/joystick_uwp.h (renamed from platform/winrt/joystick_winrt.h)12
-rw-r--r--platform/uwp/logo.png (renamed from platform/winrt/logo.png)bin1882 -> 1882 bytes
-rw-r--r--platform/uwp/os_uwp.cpp (renamed from platform/winrt/os_winrt.cpp)160
-rw-r--r--platform/uwp/os_uwp.h (renamed from platform/winrt/os_winrt.h)18
-rw-r--r--platform/uwp/platform_config.h (renamed from platform/winrt/platform_config.h)0
-rw-r--r--platform/uwp/thread_uwp.cpp (renamed from platform/winrt/thread_winrt.cpp)28
-rw-r--r--platform/uwp/thread_uwp.h (renamed from platform/winrt/thread_winrt.h)20
-rw-r--r--scene/gui/tree.cpp34
-rw-r--r--scene/gui/tree.h6
-rw-r--r--scene/main/node.cpp6
-rw-r--r--thirdparty/README.md2
-rw-r--r--thirdparty/enet/win32.c6
-rw-r--r--thirdparty/openssl/crypto/rand/rand_win.c10
-rw-r--r--thirdparty/openssl/openssl/dtls1.h2
-rw-r--r--thirdparty/openssl/uwp.cpp (renamed from thirdparty/openssl/winrt.cpp)8
-rw-r--r--thirdparty/openssl/uwp_fix.patch (renamed from thirdparty/openssl/winrt_fix.patch)12
-rw-r--r--thirdparty/rtaudio/RtAudio.h2
-rw-r--r--tools/dist/uwp_template/AppxManifest.xml2
-rw-r--r--tools/editor/icons/2x/icon_script_create.pngbin0 -> 541 bytes
-rw-r--r--tools/editor/icons/icon_script_create.pngbin0 -> 341 bytes
-rw-r--r--tools/editor/icons/source/icon_script_create.svg96
-rw-r--r--tools/editor/io_plugins/editor_import_collada.cpp92
-rw-r--r--tools/editor/io_plugins/editor_scene_import_plugin.cpp2
-rw-r--r--tools/editor/io_plugins/editor_scene_import_plugin.h1
-rw-r--r--tools/editor/scene_tree_dock.cpp5
50 files changed, 450 insertions, 329 deletions
diff --git a/README.md b/README.md
index 504a6a32a9..935170479d 100644
--- a/README.md
+++ b/README.md
@@ -1,30 +1,66 @@
-![GODOT](/logo.png)
+[![GODOT](/logo.png)](https://godotengine.org)
-https://godotengine.org
+## Godot Engine
-### The Engine
+Homepage: https://godotengine.org
-Godot is a fully featured, open source, MIT licensed, game engine. It focuses on having great tools, and a visual oriented workflow that can export to PC, Mobile and Web platforms with no hassle.
-The editor, language and APIs are feature rich, yet simple to learn, allowing you to become productive in a matter of hours.
+#### 2D and 3D cross-platform game engine
-### About
+Godot Engine is a feature-packed, cross-platform game engine to create 2D and
+3D games from a unified interface. It provides a comprehensive set of common
+tools, so that users can focus on making games without having to reinvent the
+wheel. Games can be exported in one click to a number of platforms, including
+the major desktop platforms (Linux, Mac OSX, Windows) as well as mobile
+(Android, iOS) and web-based (HTML5) platforms.
-Godot has been developed by Juan Linietsky and Ariel Manzur for several years, and was born as an in-house engine, used to publish several work-for-hire titles. Godot is a member project of the [Software Freedom Conservancy](https://sfconservancy.org)
+#### Free, open source and community-driven
-### Documentation
+Godot is completely free and open source under the very permissive MIT license.
+No strings attached, no royalties, nothing. The users' games are theirs, down
+to the last line of engine code. Godot's development is fully independent and
+community-driven, empowering users to help shape their engine to match their
+expectations. It is supported by the Software Freedom Conservancy
+not-for-profit.
-Documentation is hosted on [ReadTheDocs](http://docs.godotengine.org).
+Before being open sourced in February 2014, Godot had been developed by Juan
+Linietsky and Ariel Manzur (both still maintaining the project) for several
+years as an in-house engine, used to publish several work-for-hire titles.
-### Binary Downloads, Community, etc.
+### Getting the engine
-Binary downloads, community, etc. can be found in Godot homepage:
+#### Binary downloads
-https://godotengine.org
+Official binaries for the Godot editor and the export templates can be found
+[on the homepage](https://godotengine.org/download).
-### Compiling from Source
+#### Compiling from source
-See docs for compilation instructions for every platform:
-http://docs.godotengine.org/en/latest/reference/_compiling.html
+[See the official docs](http://docs.godotengine.org/en/latest/reference/_compiling.html)
+for compilation instructions for every supported platform.
+
+### Community
+
+Godot is not only an engine but an ever-growing community of users and engine
+developers. The main community channels are listed [on the homepage](https://godotengine.org/community).
+
+To get in touch with the developers, the best way is to join the
+[#godotengine IRC channel](https://webchat.freenode.net/?channels=godotengine)
+on Freenode.
+
+### Documentation and demos
+
+The official documentation is hosted on [ReadTheDocs](http://docs.godotengine.org).
+It is maintained by the Godot community in its own [GitHub repository](https://github.com/godotengine/godot-docs).
+
+The [class reference](http://docs.godotengine.org/en/latest/classes/_classes.html)
+is also accessible from within the engine.
+
+The official demos are maintained in their own [GitHub repository](https://github.com/godotengine/godot-demo-projects)
+as well.
+
+There are also a number of other learning resources provided by the community,
+such as text and video tutorials, demos, etc. Consult the [community channels](https://godotengine.org/community)
+for more info.
[![Build Status](https://travis-ci.org/godotengine/godot.svg?branch=master)](https://travis-ci.org/godotengine/godot)
[![Code Triagers Badge](http://www.codetriage.com/godotengine/godot/badges/users.svg)](http://www.codetriage.com/godotengine/godot)
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index 92b208ff50..e1241c2654 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -23878,7 +23878,7 @@
<return type="String">
</return>
<description>
- Return the name of the host OS. Possible values are: "Android", "BlackBerry 10", "Flash", "Haiku", "iOS", "HTML5", "OSX", "Server", "Windows", "WinRT", "X11"
+ Return the name of the host OS. Possible values are: "Android", "BlackBerry 10", "Flash", "Haiku", "iOS", "HTML5", "OSX", "Server", "Windows", "UWP", "X11"
</description>
</method>
<method name="get_process_ID" qualifiers="const">
diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp
index e3d32618ee..d998c63dfa 100644
--- a/drivers/unix/ip_unix.cpp
+++ b/drivers/unix/ip_unix.cpp
@@ -40,7 +40,7 @@
#ifndef AI_V4MAPPED
#define AI_V4MAPPED 0x00000800
#endif
- #ifdef WINRT_ENABLED
+ #ifdef UWP_ENABLED
#include <ws2tcpip.h>
#include <winsock2.h>
#include <windows.h>
@@ -124,7 +124,7 @@ IP_Address IP_Unix::_resolve_hostname(const String& p_hostname, IP_Address::Addr
#if defined(WINDOWS_ENABLED)
-#if defined(WINRT_ENABLED)
+#if defined(UWP_ENABLED)
void IP_Unix::get_local_addresses(List<IP_Address> *r_addresses) const {
diff --git a/drivers/unix/socket_helpers.h b/drivers/unix/socket_helpers.h
index 3aaae82da2..5e8e8dfd7a 100644
--- a/drivers/unix/socket_helpers.h
+++ b/drivers/unix/socket_helpers.h
@@ -10,7 +10,7 @@
#endif
#endif
-#ifdef WINRT_ENABLED
+#ifdef UWP_ENABLED
#define in6addr_any IN6ADDR_ANY_INIT
#endif
diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp
index ad4e8f301c..00d9afe51e 100644
--- a/drivers/windows/dir_access_windows.cpp
+++ b/drivers/windows/dir_access_windows.cpp
@@ -349,7 +349,7 @@ DirAccessWindows::DirAccessWindows() {
drive_count=0;
-#ifdef WINRT_ENABLED
+#ifdef UWP_ENABLED
Windows::Storage::StorageFolder ^install_folder = Windows::ApplicationModel::Package::Current->InstalledLocation;
change_dir(install_folder->Path->Data());
diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp
index 36dcab1d67..00e54e2b3e 100644
--- a/drivers/windows/file_access_windows.cpp
+++ b/drivers/windows/file_access_windows.cpp
@@ -125,8 +125,8 @@ void FileAccessWindows::close() {
bool rename_error;
-#ifdef WINRT_ENABLED
- // WinRT has no PathFileExists, so we check attributes instead
+#ifdef UWP_ENABLED
+ // UWP has no PathFileExists, so we check attributes instead
DWORD fileAttr;
fileAttr = GetFileAttributesW(save_path.c_str());
diff --git a/drivers/windows/mutex_windows.cpp b/drivers/windows/mutex_windows.cpp
index f63415d0f8..f533626c30 100644
--- a/drivers/windows/mutex_windows.cpp
+++ b/drivers/windows/mutex_windows.cpp
@@ -81,7 +81,7 @@ MutexWindows::MutexWindows() {
#ifdef WINDOWS_USE_MUTEX
mutex = CreateMutex( NULL, FALSE, NULL );
#else
- #ifdef WINRT_ENABLED
+ #ifdef UWP_ENABLED
InitializeCriticalSectionEx( &mutex, 0, 0 );
#else
InitializeCriticalSection( &mutex );
diff --git a/drivers/windows/semaphore_windows.cpp b/drivers/windows/semaphore_windows.cpp
index 8d11d1b1c1..5ea98f341f 100644
--- a/drivers/windows/semaphore_windows.cpp
+++ b/drivers/windows/semaphore_windows.cpp
@@ -71,7 +71,7 @@ void SemaphoreWindows::make_default() {
SemaphoreWindows::SemaphoreWindows() {
-#ifdef WINRT_ENABLED
+#ifdef UWP_ENABLED
semaphore=CreateSemaphoreEx(
NULL,
0,
diff --git a/drivers/windows/shell_windows.cpp b/drivers/windows/shell_windows.cpp
index c69d371a65..283a453be1 100644
--- a/drivers/windows/shell_windows.cpp
+++ b/drivers/windows/shell_windows.cpp
@@ -28,7 +28,7 @@
/*************************************************************************/
#ifdef WINDOWS_ENABLED
-#ifdef WINRT_ENABLED
+#ifdef UWP_ENABLED
// Use Launcher class on windows 8
diff --git a/drivers/windows/thread_windows.cpp b/drivers/windows/thread_windows.cpp
index 884575e81e..2056113412 100644
--- a/drivers/windows/thread_windows.cpp
+++ b/drivers/windows/thread_windows.cpp
@@ -28,7 +28,7 @@
/*************************************************************************/
#include "thread_windows.h"
-#if defined(WINDOWS_ENABLED) && !defined(WINRT_ENABLED)
+#if defined(WINDOWS_ENABLED) && !defined(UWP_ENABLED)
#include "os/memory.h"
diff --git a/main/input_default.cpp b/main/input_default.cpp
index c60fcd2243..0995f7132d 100644
--- a/main/input_default.cpp
+++ b/main/input_default.cpp
@@ -739,8 +739,8 @@ static const char *s_ControllerMappings [] =
"c2a94d6963726f736f66742058626f78,Wireless X360 Controller,leftx:a0,lefty:a1,dpdown:b14,rightstick:b10,rightshoulder:b5,rightx:a3,start:b7,righty:a4,dpleft:b11,lefttrigger:a2,x:b2,dpup:b13,back:b6,leftstick:b9,leftshoulder:b4,y:b3,a:b0,dpright:b12,righttrigger:a5,b:b1,",
#endif
- #ifdef WINRT_ENABLED
- "__WINRT_GAMEPAD__,Xbox Controller,a:b2,b:b3,x:b4,y:b5,start:b0,back:b1,leftstick:b12,rightstick:b13,leftshoulder:b10,rightshoulder:b11,dpup:b6,dpdown:b7,dpleft:b8,dpright:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,",
+ #ifdef UWP_ENABLED
+ "__UWP_GAMEPAD__,Xbox Controller,a:b2,b:b3,x:b4,y:b5,start:b0,back:b1,leftstick:b12,rightstick:b13,leftshoulder:b10,rightshoulder:b11,dpup:b6,dpdown:b7,dpleft:b8,dpright:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,",
#endif
NULL
};
diff --git a/modules/freetype/SCsub b/modules/freetype/SCsub
index 87652a3ddf..e4dd1c36a0 100644
--- a/modules/freetype/SCsub
+++ b/modules/freetype/SCsub
@@ -54,9 +54,9 @@ if (env['builtin_freetype'] != 'no'):
]
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
- # Include header for WinRT to fix build issues
- if "platform" in env and env["platform"] == "winrt":
- env.Append(CCFLAGS=['/FI', '"modules/freetype/winrtdef.h"'])
+ # Include header for UWP to fix build issues
+ if "platform" in env and env["platform"] == "uwp":
+ env.Append(CCFLAGS=['/FI', '"modules/freetype/uwpdef.h"'])
env.Append(CPPPATH=[thirdparty_dir, thirdparty_dir + "/include"])
diff --git a/modules/freetype/winrtdef.h b/modules/freetype/uwpdef.h
index 69c6baf532..c7dce80461 100644
--- a/modules/freetype/winrtdef.h
+++ b/modules/freetype/uwpdef.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* winrtdef.h */
+/* uwpdef.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp
index 434f918355..131b9a0853 100644
--- a/modules/gdscript/gd_parser.cpp
+++ b/modules/gdscript/gd_parser.cpp
@@ -3375,7 +3375,16 @@ void GDParser::_parse_class(ClassNode *p_class) {
} break;
-
+
+ case GDTokenizer::TK_CONSTANT: {
+ if(tokenizer->get_token_constant().get_type() == Variant::STRING) {
+ tokenizer->advance();
+ // Ignore
+ } else {
+ _set_error(String()+"Unexpected constant of type: "+Variant::get_type_name(tokenizer->get_token_constant().get_type()));
+ return;
+ }
+ } break;
default: {
diff --git a/modules/openssl/SCsub b/modules/openssl/SCsub
index ccd90d1534..0e811ce8c9 100644
--- a/modules/openssl/SCsub
+++ b/modules/openssl/SCsub
@@ -648,8 +648,8 @@ if (env['builtin_openssl'] != 'no'):
"crypto/bn/bn_asm.c",
]
- if "platform" in env and env["platform"] == "winrt":
- thirdparty_sources += ['winrt.cpp']
+ if "platform" in env and env["platform"] == "uwp":
+ thirdparty_sources += ['uwp.cpp']
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
@@ -679,8 +679,8 @@ if (env['builtin_openssl'] != 'no'):
env_openssl.add_source_files(env.modules_sources, "*.cpp")
env_openssl.add_source_files(env.modules_sources, "*.c")
-# platform/winrt need to know openssl is available, pass to main env
-if "platform" in env and env["platform"] == "winrt":
+# platform/uwp need to know openssl is available, pass to main env
+if "platform" in env and env["platform"] == "uwp":
env.Append(CPPPATH=[thirdparty_dir])
env.Append(CPPFLAGS=['-DOPENSSL_ENABLED'])
diff --git a/modules/webm/libvpx/SCsub b/modules/webm/libvpx/SCsub
index a7eca29c05..365cabd072 100644
--- a/modules/webm/libvpx/SCsub
+++ b/modules/webm/libvpx/SCsub
@@ -257,7 +257,7 @@ cpu_bits = env["bits"]
osx_fat = (env["platform"] == 'osx' and cpu_bits == 'fat')
webm_cpu_x86 = False
webm_cpu_arm = False
-if env["platform"] == 'winrt':
+if env["platform"] == 'uwp':
if 'arm' in env["PROGSUFFIX"]:
webm_cpu_arm = True
else:
@@ -306,7 +306,7 @@ if webm_cpu_x86:
env_libvpx["ASFLAGS"] = '-I' + libvpx_dir[1:]
env_libvpx["ASCOM"] = '$AS $ASFLAGS $TARGET $SOURCES'
else:
- if env["platform"] == 'windows' or env["platform"] == 'winrt':
+ if env["platform"] == 'windows' or env["platform"] == 'uwp':
env_libvpx["ASFORMAT"] = 'win'
elif env["platform"] == 'osx':
env_libvpx["ASFORMAT"] = 'macho'
@@ -332,7 +332,7 @@ if webm_cpu_arm:
env_libvpx["ASFLAGS"] = '-arch armv7'
elif env["platform"] == 'android':
env_libvpx["ASFLAGS"] = '-mfpu=neon'
- elif env["platform"] == 'winrt':
+ elif env["platform"] == 'uwp':
env_libvpx["AS"] = 'armasm'
env_libvpx["ASFLAGS"] = ''
env_libvpx["ASCOM"] = '$AS $ASFLAGS -o $TARGET $SOURCES'
@@ -382,7 +382,7 @@ elif webm_cpu_arm:
env_libvpx_neon.Append(CCFLAGS=['-mfpu=neon'])
env_libvpx_neon.add_source_files(env.modules_sources, libvpx_sources_arm_neon)
- if env["platform"] == 'winrt':
+ if env["platform"] == 'uwp':
env_libvpx.add_source_files(env.modules_sources, libvpx_sources_arm_neon_armasm_ms)
elif env["platform"] == 'iphone':
env_libvpx.add_source_files(env.modules_sources, libvpx_sources_arm_neon_gas_apple)
diff --git a/platform/winrt/SCsub b/platform/uwp/SCsub
index 5259e7dc22..430d4ef9e7 100644
--- a/platform/winrt/SCsub
+++ b/platform/uwp/SCsub
@@ -3,15 +3,15 @@
Import('env')
files = [
- 'thread_winrt.cpp',
+ 'thread_uwp.cpp',
'#platform/windows/tcp_server_winsock.cpp',
'#platform/windows/packet_peer_udp_winsock.cpp',
'#platform/windows/stream_peer_winsock.cpp',
'#platform/windows/key_mapping_win.cpp',
- 'joystick_winrt.cpp',
+ 'joystick_uwp.cpp',
'gl_context_egl.cpp',
'app.cpp',
- 'os_winrt.cpp',
+ 'os_uwp.cpp',
]
if "build_angle" in env and env["build_angle"]:
diff --git a/platform/winrt/app.cpp b/platform/uwp/app.cpp
index c2b7ba0641..539c1815f6 100644
--- a/platform/winrt/app.cpp
+++ b/platform/uwp/app.cpp
@@ -53,7 +53,7 @@ using namespace Windows::System;
using namespace Windows::System::Threading::Core;
using namespace Microsoft::WRL;
-using namespace GodotWinRT;
+using namespace GodotUWP;
// Helper to convert a length in device-independent pixels (DIPs) to a length in physical pixels.
inline float ConvertDipsToPixels(float dips, float dpi)
@@ -63,7 +63,7 @@ inline float ConvertDipsToPixels(float dips, float dpi)
}
// Implementation of the IFrameworkViewSource interface, necessary to run our app.
-ref class GodotWinrtViewSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource
+ref class GodotUWPViewSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource
{
public:
virtual Windows::ApplicationModel::Core::IFrameworkView^ CreateView()
@@ -76,7 +76,7 @@ public:
[Platform::MTAThread]
int main(Platform::Array<Platform::String^>^)
{
- auto godotApplicationSource = ref new GodotWinrtViewSource();
+ auto godotApplicationSource = ref new GodotUWPViewSource();
CoreApplication::Run(godotApplicationSource);
return 0;
}
@@ -105,7 +105,7 @@ void App::Initialize(CoreApplicationView^ applicationView)
// Information about the Suspending and Resuming event handlers can be found here:
// http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh994930.aspx
- os = new OSWinrt;
+ os = new OSUWP;
}
@@ -157,7 +157,7 @@ void App::SetWindow(CoreWindow^ p_window)
unsigned int argc;
char** argv = get_command_line(&argc);
- Main::setup("winrt", argc, argv, false);
+ Main::setup("uwp", argc, argv, false);
// The CoreWindow has been created, so EGL can be initialized.
ContextEGL* context = memnew(ContextEGL(window));
@@ -431,7 +431,7 @@ void App::OnMouseMoved(MouseDevice ^ mouse_device, MouseEventArgs ^ args) {
void App::key_event(Windows::UI::Core::CoreWindow^ sender, bool p_pressed, Windows::UI::Core::KeyEventArgs^ key_args, Windows::UI::Core::CharacterReceivedEventArgs^ char_args)
{
- OSWinrt::KeyEvent ke;
+ OSUWP::KeyEvent ke;
InputModifierState mod;
mod.meta = false;
@@ -445,14 +445,14 @@ void App::key_event(Windows::UI::Core::CoreWindow^ sender, bool p_pressed, Windo
if (key_args != nullptr) {
- ke.type = OSWinrt::KeyEvent::MessageType::KEY_EVENT_MESSAGE;
+ ke.type = OSUWP::KeyEvent::MessageType::KEY_EVENT_MESSAGE;
ke.unicode = 0;
ke.scancode = KeyMappingWindows::get_keysym((unsigned int)key_args->VirtualKey);
ke.echo = (!p_pressed && !key_args->KeyStatus.IsKeyReleased) || (p_pressed && key_args->KeyStatus.WasKeyDown);
} else {
- ke.type = OSWinrt::KeyEvent::MessageType::CHAR_EVENT_MESSAGE;
+ ke.type = OSUWP::KeyEvent::MessageType::CHAR_EVENT_MESSAGE;
ke.unicode = char_args->KeyCode;
ke.scancode = 0;
ke.echo = (!p_pressed && !char_args->KeyStatus.IsKeyReleased) || (p_pressed && char_args->KeyStatus.WasKeyDown);
diff --git a/platform/winrt/app.h b/platform/uwp/app.h
index 652ec86e1f..f82de4d240 100644
--- a/platform/winrt/app.h
+++ b/platform/uwp/app.h
@@ -32,10 +32,10 @@
#include <wrl.h>
-#include "os_winrt.h"
+#include "os_uwp.h"
#include "GLES2/gl2.h"
-namespace GodotWinRT
+namespace GodotUWP
{
ref class App sealed : public Windows::ApplicationModel::Core::IFrameworkView
{
@@ -97,7 +97,7 @@ namespace GodotWinRT
EGLSurface mEglSurface;
CoreWindow^ window;
- OSWinrt* os;
+ OSUWP* os;
int last_touch_x[32]; // 20 fingers, index 31 reserved for the mouse
int last_touch_y[32];
diff --git a/platform/winrt/detect.py b/platform/uwp/detect.py
index 6a1a06d8ab..6eb4ca9caa 100644
--- a/platform/winrt/detect.py
+++ b/platform/uwp/detect.py
@@ -10,7 +10,7 @@ def is_active():
def get_name():
- return "WinRT"
+ return "UWP"
def can_build():
@@ -42,7 +42,7 @@ def configure(env):
if(env["bits"] != "default"):
print "Error: bits argument is disabled for MSVC"
print ("Bits argument is not supported for MSVC compilation. Architecture depends on the Native/Cross Compile Tools Prompt/Developer Console (or Visual Studio settings)"
- + " that is being used to run SCons. As a consequence, bits argument is disabled. Run scons again without bits argument (example: scons p=winrt) and SCons will attempt to detect what MSVC compiler"
+ + " that is being used to run SCons. As a consequence, bits argument is disabled. Run scons again without bits argument (example: scons p=uwp) and SCons will attempt to detect what MSVC compiler"
+ " will be executed and inform you.")
sys.exit()
@@ -104,7 +104,7 @@ def configure(env):
env.Append(LIBPATH=[os.environ['VCINSTALLDIR'] + 'lib/store/amd64'])
env.Append(LIBPATH=[angle_root + '/winrt/10/src/Release_x64/lib'])
- env.Append(CPPPATH=['#platform/winrt', '#drivers/windows'])
+ env.Append(CPPPATH=['#platform/uwp', '#drivers/windows'])
env.Append(LINKFLAGS=['/MANIFEST:NO', '/NXCOMPAT', '/DYNAMICBASE', '/WINMD', '/APPCONTAINER', '/ERRORREPORT:PROMPT', '/NOLOGO', '/TLBID:1', '/NODEFAULTLIB:"kernel32.lib"', '/NODEFAULTLIB:"ole32.lib"'])
env.Append(CPPFLAGS=['/D', '__WRL_NO_DEFAULT_LIB__', '/D', 'WIN32'])
env.Append(CPPFLAGS=['/FU', os.environ['VCINSTALLDIR'] + 'lib/store/references/platform.winmd'])
@@ -139,7 +139,7 @@ def configure(env):
env["OBJSUFFIX"] = "." + arch + env["OBJSUFFIX"]
env["LIBSUFFIX"] = "." + arch + env["LIBSUFFIX"]
- env.Append(CCFLAGS=['/DWINRT_ENABLED'])
+ env.Append(CCFLAGS=['/DUWP_ENABLED'])
env.Append(CCFLAGS=['/DWINDOWS_ENABLED'])
env.Append(CCFLAGS=['/DTYPED_METHOD_BIND'])
diff --git a/platform/winrt/export/export.cpp b/platform/uwp/export/export.cpp
index eca9f09de6..aab9ae8e39 100644
--- a/platform/winrt/export/export.cpp
+++ b/platform/uwp/export/export.cpp
@@ -71,7 +71,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "object.h"
#include "tools/editor/editor_import_export.h"
#include "tools/editor/editor_node.h"
-#include "platform/winrt/logo.h"
+#include "platform/uwp/logo.h"
#include "os/file_access.h"
#include "io/zip.h"
#include "io/unzip.h"
@@ -432,9 +432,9 @@ public:
~AppxPackager();
};
-class EditorExportPlatformWinrt : public EditorExportPlatform {
+class EditorExportPlatformUWP : public EditorExportPlatform {
- OBJ_TYPE(EditorExportPlatformWinrt, EditorExportPlatform);
+ OBJ_TYPE(EditorExportPlatformUWP, EditorExportPlatform);
Ref<ImageTexture> logo;
@@ -528,8 +528,8 @@ public:
virtual Error export_project(const String& p_path, bool p_debug, int p_flags = 0);
- EditorExportPlatformWinrt();
- ~EditorExportPlatformWinrt();
+ EditorExportPlatformUWP();
+ ~EditorExportPlatformUWP();
};
@@ -1452,7 +1452,7 @@ Error AppxPackager::sign(const CertFile & p_cert, const AppxDigests & digests, P
////////////////////////////////////////////////////////////////////
-bool EditorExportPlatformWinrt::_valid_resource_name(const String &p_name) const {
+bool EditorExportPlatformUWP::_valid_resource_name(const String &p_name) const {
if (p_name.empty()) return false;
if (p_name.ends_with(".")) return false;
@@ -1472,7 +1472,7 @@ bool EditorExportPlatformWinrt::_valid_resource_name(const String &p_name) const
return true;
}
-bool EditorExportPlatformWinrt::_valid_guid(const String & p_guid) const {
+bool EditorExportPlatformUWP::_valid_guid(const String & p_guid) const {
Vector<String> parts = p_guid.split("-");
@@ -1485,7 +1485,7 @@ bool EditorExportPlatformWinrt::_valid_guid(const String & p_guid) const {
return true;
}
-bool EditorExportPlatformWinrt::_valid_bgcolor(const String & p_color) const {
+bool EditorExportPlatformUWP::_valid_bgcolor(const String & p_color) const {
if (p_color.empty()) return true;
if (p_color.begins_with("#") && p_color.is_valid_html_color()) return true;
@@ -1529,7 +1529,7 @@ bool EditorExportPlatformWinrt::_valid_bgcolor(const String & p_color) const {
return false;
}
-bool EditorExportPlatformWinrt::_valid_image(const Ref<ImageTexture> p_image, int p_width, int p_height) const {
+bool EditorExportPlatformUWP::_valid_image(const Ref<ImageTexture> p_image, int p_width, int p_height) const {
if (!p_image.is_valid()) return false;
@@ -1553,7 +1553,7 @@ bool EditorExportPlatformWinrt::_valid_image(const Ref<ImageTexture> p_image, in
return valid_w && valid_h;
}
-Vector<uint8_t> EditorExportPlatformWinrt::_fix_manifest(const Vector<uint8_t> &p_template, bool p_give_internet) const {
+Vector<uint8_t> EditorExportPlatformUWP::_fix_manifest(const Vector<uint8_t> &p_template, bool p_give_internet) const {
String result = String::utf8((const char*)p_template.ptr(), p_template.size());
@@ -1659,7 +1659,7 @@ Vector<uint8_t> EditorExportPlatformWinrt::_fix_manifest(const Vector<uint8_t> &
return r_ret;
}
-Vector<uint8_t> EditorExportPlatformWinrt::_get_image_data(const String & p_path) {
+Vector<uint8_t> EditorExportPlatformUWP::_get_image_data(const String & p_path) {
Vector<uint8_t> data;
Ref<ImageTexture> ref;
@@ -1741,7 +1741,7 @@ Vector<uint8_t> EditorExportPlatformWinrt::_get_image_data(const String & p_path
return data;
}
-Error EditorExportPlatformWinrt::save_appx_file(void * p_userdata, const String & p_path, const Vector<uint8_t>& p_data, int p_file, int p_total) {
+Error EditorExportPlatformUWP::save_appx_file(void * p_userdata, const String & p_path, const Vector<uint8_t>& p_data, int p_file, int p_total) {
AppxPackager *packager = (AppxPackager*)p_userdata;
String dst_path = p_path.replace_first("res://", "game/");
@@ -1751,7 +1751,7 @@ Error EditorExportPlatformWinrt::save_appx_file(void * p_userdata, const String
return OK;
}
-bool EditorExportPlatformWinrt::_should_compress_asset(const String & p_path, const Vector<uint8_t>& p_data) {
+bool EditorExportPlatformUWP::_should_compress_asset(const String & p_path, const Vector<uint8_t>& p_data) {
/* TODO: This was copied verbatim from Android export. It should be
* refactored to the parent class and also be used for .zip export.
@@ -1800,7 +1800,7 @@ bool EditorExportPlatformWinrt::_should_compress_asset(const String & p_path, co
return true;
}
-bool EditorExportPlatformWinrt::_set(const StringName& p_name, const Variant& p_value) {
+bool EditorExportPlatformUWP::_set(const StringName& p_name, const Variant& p_value) {
String n = p_name;
@@ -1906,7 +1906,7 @@ bool EditorExportPlatformWinrt::_set(const StringName& p_name, const Variant& p_
return true;
}
-bool EditorExportPlatformWinrt::_get(const StringName& p_name, Variant &r_ret) const {
+bool EditorExportPlatformUWP::_get(const StringName& p_name, Variant &r_ret) const {
String n = p_name;
@@ -2002,7 +2002,7 @@ bool EditorExportPlatformWinrt::_get(const StringName& p_name, Variant &r_ret) c
return true;
}
-void EditorExportPlatformWinrt::_get_property_list(List<PropertyInfo>* p_list) const {
+void EditorExportPlatformUWP::_get_property_list(List<PropertyInfo>* p_list) const {
p_list->push_back(PropertyInfo(Variant::STRING, "custom_package/debug", PROPERTY_HINT_GLOBAL_FILE, "appx"));
p_list->push_back(PropertyInfo(Variant::STRING, "custom_package/release", PROPERTY_HINT_GLOBAL_FILE, "appx"));
@@ -2071,14 +2071,14 @@ void EditorExportPlatformWinrt::_get_property_list(List<PropertyInfo>* p_list) c
}
-bool EditorExportPlatformWinrt::can_export(String * r_error) const {
+bool EditorExportPlatformUWP::can_export(String * r_error) const {
String err;
bool valid = true;
- if (!exists_export_template("winrt_x86_debug.zip") || !exists_export_template("winrt_x86_release.zip")
- || !exists_export_template("winrt_arm_debug.zip") || !exists_export_template("winrt_arm_release.zip")
- || !exists_export_template("winrt_x64_debug.zip") || !exists_export_template("winrt_x64_release.zip")) {
+ if (!exists_export_template("uwp_x86_debug.zip") || !exists_export_template("uwp_x86_release.zip")
+ || !exists_export_template("uwp_arm_debug.zip") || !exists_export_template("uwp_arm_release.zip")
+ || !exists_export_template("uwp_x64_debug.zip") || !exists_export_template("uwp_x64_release.zip")) {
valid = false;
err += TTR("No export templates found.\nDownload and install export templates.") + "\n";
}
@@ -2154,7 +2154,7 @@ bool EditorExportPlatformWinrt::can_export(String * r_error) const {
return valid;
}
-Error EditorExportPlatformWinrt::export_project(const String & p_path, bool p_debug, int p_flags) {
+Error EditorExportPlatformUWP::export_project(const String & p_path, bool p_debug, int p_flags) {
String src_appx;
@@ -2170,30 +2170,30 @@ Error EditorExportPlatformWinrt::export_project(const String & p_path, bool p_de
if (p_debug) {
switch (arch) {
case X86: {
- src_appx = find_export_template("winrt_x86_debug.zip", &err);
+ src_appx = find_export_template("uwp_x86_debug.zip", &err);
break;
}
case X64: {
- src_appx = find_export_template("winrt_x64_debug.zip", &err);
+ src_appx = find_export_template("uwp_x64_debug.zip", &err);
break;
}
case ARM: {
- src_appx = find_export_template("winrt_arm_debug.zip", &err);
+ src_appx = find_export_template("uwp_arm_debug.zip", &err);
break;
}
}
} else {
switch (arch) {
case X86: {
- src_appx = find_export_template("winrt_x86_release.zip", &err);
+ src_appx = find_export_template("uwp_x86_release.zip", &err);
break;
}
case X64: {
- src_appx = find_export_template("winrt_x64_release.zip", &err);
+ src_appx = find_export_template("uwp_x64_release.zip", &err);
break;
}
case ARM: {
- src_appx = find_export_template("winrt_arm_release.zip", &err);
+ src_appx = find_export_template("uwp_arm_release.zip", &err);
break;
}
}
@@ -2337,9 +2337,9 @@ Error EditorExportPlatformWinrt::export_project(const String & p_path, bool p_de
return OK;
}
-EditorExportPlatformWinrt::EditorExportPlatformWinrt() {
+EditorExportPlatformUWP::EditorExportPlatformUWP() {
- Image img(_winrt_logo);
+ Image img(_uwp_logo);
logo = Ref<ImageTexture>(memnew(ImageTexture));
logo->create_from_image(img);
@@ -2381,11 +2381,11 @@ EditorExportPlatformWinrt::EditorExportPlatformWinrt() {
certificate_pass = "";
}
-EditorExportPlatformWinrt::~EditorExportPlatformWinrt() {}
+EditorExportPlatformUWP::~EditorExportPlatformUWP() {}
-void register_winrt_exporter() {
+void register_uwp_exporter() {
- Ref<EditorExportPlatformWinrt> exporter = Ref<EditorExportPlatformWinrt>(memnew(EditorExportPlatformWinrt));
+ Ref<EditorExportPlatformUWP> exporter = Ref<EditorExportPlatformUWP>(memnew(EditorExportPlatformUWP));
EditorImportExport::get_singleton()->add_export_platform(exporter);
}
diff --git a/platform/winrt/export/export.h b/platform/uwp/export/export.h
index 278d6d23cd..f25065341d 100644
--- a/platform/winrt/export/export.h
+++ b/platform/uwp/export/export.h
@@ -26,4 +26,4 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-void register_winrt_exporter();
+void register_uwp_exporter();
diff --git a/platform/winrt/gl_context_egl.cpp b/platform/uwp/gl_context_egl.cpp
index f7b514b3c0..f7b514b3c0 100644
--- a/platform/winrt/gl_context_egl.cpp
+++ b/platform/uwp/gl_context_egl.cpp
diff --git a/platform/winrt/gl_context_egl.h b/platform/uwp/gl_context_egl.h
index 8124c2903d..8124c2903d 100644
--- a/platform/winrt/gl_context_egl.h
+++ b/platform/uwp/gl_context_egl.h
diff --git a/platform/winrt/joystick_winrt.cpp b/platform/uwp/joystick_uwp.cpp
index 9f93c5a26b..ad0516992b 100644
--- a/platform/winrt/joystick_winrt.cpp
+++ b/platform/uwp/joystick_uwp.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* joystick.cpp */
+/* joystick_uwp.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -27,20 +27,20 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "joystick_winrt.h"
+#include "joystick_uwp.h"
using namespace Windows::Gaming::Input;
using namespace Windows::Foundation;
-void JoystickWinrt::register_events() {
+void JoystickUWP::register_events() {
Gamepad::GamepadAdded +=
- ref new EventHandler<Gamepad^>(this, &JoystickWinrt::OnGamepadAdded);
+ ref new EventHandler<Gamepad^>(this, &JoystickUWP::OnGamepadAdded);
Gamepad::GamepadRemoved +=
- ref new EventHandler<Gamepad^>(this, &JoystickWinrt::OnGamepadRemoved);
+ ref new EventHandler<Gamepad^>(this, &JoystickUWP::OnGamepadRemoved);
}
-uint32_t JoystickWinrt::process_controllers(uint32_t p_last_id) {
+uint32_t JoystickUWP::process_controllers(uint32_t p_last_id) {
for (int i = 0; i < MAX_CONTROLLERS; i++) {
@@ -74,20 +74,20 @@ uint32_t JoystickWinrt::process_controllers(uint32_t p_last_id) {
return p_last_id;
}
-JoystickWinrt::JoystickWinrt() {
+JoystickUWP::JoystickUWP() {
for (int i = 0; i < MAX_CONTROLLERS; i++)
controllers[i].id = i;
}
-JoystickWinrt::JoystickWinrt(InputDefault * p_input) {
+JoystickUWP::JoystickUWP(InputDefault * p_input) {
input = p_input;
- JoystickWinrt();
+ JoystickUWP();
}
-void JoystickWinrt::OnGamepadAdded(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ value) {
+void JoystickUWP::OnGamepadAdded(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ value) {
short idx = -1;
@@ -106,10 +106,10 @@ void JoystickWinrt::OnGamepadAdded(Platform::Object ^ sender, Windows::Gaming::I
controllers[idx].id = idx;
controllers[idx].type = ControllerType::GAMEPAD_CONTROLLER;
- input->joy_connection_changed(controllers[idx].id, true, "Xbox Controller", "__WINRT_GAMEPAD__");
+ input->joy_connection_changed(controllers[idx].id, true, "Xbox Controller", "__UWP_GAMEPAD__");
}
-void JoystickWinrt::OnGamepadRemoved(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ value) {
+void JoystickUWP::OnGamepadRemoved(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ value) {
short idx = -1;
@@ -136,7 +136,7 @@ void JoystickWinrt::OnGamepadRemoved(Platform::Object ^ sender, Windows::Gaming:
input->joy_connection_changed(idx, false, "Xbox Controller");
}
-InputDefault::JoyAxis JoystickWinrt::axis_correct(double p_val, bool p_negate, bool p_trigger) const {
+InputDefault::JoyAxis JoystickUWP::axis_correct(double p_val, bool p_negate, bool p_trigger) const {
InputDefault::JoyAxis jx;
diff --git a/platform/winrt/joystick_winrt.h b/platform/uwp/joystick_uwp.h
index 17f9565708..47ec738a18 100644
--- a/platform/winrt/joystick_winrt.h
+++ b/platform/uwp/joystick_uwp.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* joystick.h */
+/* joystick_uwp.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -26,20 +26,20 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef JOYSTICK_WINRT_H
-#define JOYSTICK_WINRT_H
+#ifndef JOYSTICK_UWP_H
+#define JOYSTICK_UWP_H
#include "main/input_default.h"
-ref class JoystickWinrt sealed {
+ref class JoystickUWP sealed {
internal:
void register_events();
uint32_t process_controllers(uint32_t p_last_id);
- JoystickWinrt();
- JoystickWinrt(InputDefault* p_input);
+ JoystickUWP();
+ JoystickUWP(InputDefault* p_input);
private:
diff --git a/platform/winrt/logo.png b/platform/uwp/logo.png
index 4376abd563..4376abd563 100644
--- a/platform/winrt/logo.png
+++ b/platform/uwp/logo.png
Binary files differ
diff --git a/platform/winrt/os_winrt.cpp b/platform/uwp/os_uwp.cpp
index 4b23f3960e..fb1dc3be19 100644
--- a/platform/winrt/os_winrt.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* os_winrt.cpp */
+/* os_uwp.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -27,10 +27,10 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "drivers/gles2/rasterizer_gles2.h"
-#include "os_winrt.h"
+#include "os_uwp.h"
#include "drivers/unix/memory_pool_static_malloc.h"
#include "os/memory_pool_dynamic_static.h"
-#include "thread_winrt.h"
+#include "thread_uwp.h"
#include "drivers/windows/semaphore_windows.h"
#include "drivers/windows/mutex_windows.h"
#include "main/main.h"
@@ -69,28 +69,28 @@ using namespace Windows::ApplicationModel::DataTransfer;
using namespace concurrency;
-int OSWinrt::get_video_driver_count() const {
+int OSUWP::get_video_driver_count() const {
return 1;
}
-const char * OSWinrt::get_video_driver_name(int p_driver) const {
+const char * OSUWP::get_video_driver_name(int p_driver) const {
return "GLES2";
}
-OS::VideoMode OSWinrt::get_default_video_mode() const {
+OS::VideoMode OSUWP::get_default_video_mode() const {
return video_mode;
}
-Size2 OSWinrt::get_window_size() const {
+Size2 OSUWP::get_window_size() const {
Size2 size;
size.width = video_mode.width;
size.height = video_mode.height;
return size;
}
-void OSWinrt::set_window_size(const Size2 p_size) {
+void OSUWP::set_window_size(const Size2 p_size) {
Windows::Foundation::Size new_size;
new_size.Width = p_size.width;
@@ -105,7 +105,7 @@ void OSWinrt::set_window_size(const Size2 p_size) {
}
}
-void OSWinrt::set_window_fullscreen(bool p_enabled) {
+void OSUWP::set_window_fullscreen(bool p_enabled) {
ApplicationView^ view = ApplicationView::GetForCurrentView();
@@ -126,12 +126,12 @@ void OSWinrt::set_window_fullscreen(bool p_enabled) {
}
}
-bool OSWinrt::is_window_fullscreen() const {
+bool OSUWP::is_window_fullscreen() const {
return ApplicationView::GetForCurrentView()->IsFullScreenMode;
}
-void OSWinrt::set_keep_screen_on(bool p_enabled) {
+void OSUWP::set_keep_screen_on(bool p_enabled) {
if (is_keep_screen_on() == p_enabled) return;
@@ -143,11 +143,11 @@ void OSWinrt::set_keep_screen_on(bool p_enabled) {
OS::set_keep_screen_on(p_enabled);
}
-int OSWinrt::get_audio_driver_count() const {
+int OSUWP::get_audio_driver_count() const {
return AudioDriverManagerSW::get_driver_count();
}
-const char * OSWinrt::get_audio_driver_name(int p_driver) const {
+const char * OSUWP::get_audio_driver_name(int p_driver) const {
AudioDriverSW* driver = AudioDriverManagerSW::get_driver(p_driver);
ERR_FAIL_COND_V( !driver, "" );
@@ -157,14 +157,14 @@ const char * OSWinrt::get_audio_driver_name(int p_driver) const {
static MemoryPoolStatic *mempool_static=NULL;
static MemoryPoolDynamic *mempool_dynamic=NULL;
-void OSWinrt::initialize_core() {
+void OSUWP::initialize_core() {
last_button_state=0;
//RedirectIOToConsole();
- ThreadWinrt::make_default();
+ ThreadUWP::make_default();
SemaphoreWindows::make_default();
MutexWindows::make_default();
@@ -206,23 +206,23 @@ void OSWinrt::initialize_core() {
cursor_shape=CURSOR_ARROW;
}
-bool OSWinrt::can_draw() const {
+bool OSUWP::can_draw() const {
return !minimized;
};
-void OSWinrt::set_gl_context(ContextEGL* p_context) {
+void OSUWP::set_gl_context(ContextEGL* p_context) {
gl_context = p_context;
};
-void OSWinrt::screen_size_changed() {
+void OSUWP::screen_size_changed() {
gl_context->reset();
};
-void OSWinrt::initialize(const VideoMode& p_desired,int p_video_driver,int p_audio_driver) {
+void OSUWP::initialize(const VideoMode& p_desired,int p_video_driver,int p_audio_driver) {
main_loop=NULL;
outside=true;
@@ -285,7 +285,7 @@ void OSWinrt::initialize(const VideoMode& p_desired,int p_video_driver,int p_aud
input = memnew( InputDefault );
- joystick = ref new JoystickWinrt(input);
+ joystick = ref new JoystickUWP(input);
joystick->register_events();
AudioDriverManagerSW::get_driver(p_audio_driver)->set_singleton();
@@ -345,7 +345,7 @@ void OSWinrt::initialize(const VideoMode& p_desired,int p_video_driver,int p_aud
}
-void OSWinrt::set_clipboard(const String& p_text) {
+void OSUWP::set_clipboard(const String& p_text) {
DataPackage^ clip = ref new DataPackage();
clip->RequestedOperation = DataPackageOperation::Copy;
@@ -354,7 +354,7 @@ void OSWinrt::set_clipboard(const String& p_text) {
Clipboard::SetContent(clip);
};
-String OSWinrt::get_clipboard() const {
+String OSUWP::get_clipboard() const {
if (managed_object->clipboard != nullptr)
return managed_object->clipboard->Data();
@@ -363,7 +363,7 @@ String OSWinrt::get_clipboard() const {
};
-void OSWinrt::input_event(InputEvent &p_event) {
+void OSUWP::input_event(InputEvent &p_event) {
p_event.ID = ++last_id;
@@ -378,20 +378,20 @@ void OSWinrt::input_event(InputEvent &p_event) {
}
};
-void OSWinrt::delete_main_loop() {
+void OSUWP::delete_main_loop() {
if (main_loop)
memdelete(main_loop);
main_loop=NULL;
}
-void OSWinrt::set_main_loop( MainLoop * p_main_loop ) {
+void OSUWP::set_main_loop( MainLoop * p_main_loop ) {
input->set_main_loop(p_main_loop);
main_loop=p_main_loop;
}
-void OSWinrt::finalize() {
+void OSUWP::finalize() {
if(main_loop)
memdelete(main_loop);
@@ -432,7 +432,7 @@ void OSWinrt::finalize() {
joystick = nullptr;
}
-void OSWinrt::finalize_core() {
+void OSUWP::finalize_core() {
if (mempool_dynamic)
memdelete( mempool_dynamic );
@@ -440,7 +440,7 @@ void OSWinrt::finalize_core() {
}
-void OSWinrt::vprint(const char* p_format, va_list p_list, bool p_stderr) {
+void OSUWP::vprint(const char* p_format, va_list p_list, bool p_stderr) {
char buf[16384+1];
int len = vsnprintf(buf,16384,p_format,p_list);
@@ -467,14 +467,14 @@ void OSWinrt::vprint(const char* p_format, va_list p_list, bool p_stderr) {
fflush(stdout);
};
-void OSWinrt::alert(const String& p_alert,const String& p_title) {
+void OSUWP::alert(const String& p_alert,const String& p_title) {
Platform::String^ alert = ref new Platform::String(p_alert.c_str());
Platform::String^ title = ref new Platform::String(p_title.c_str());
MessageDialog^ msg = ref new MessageDialog(alert, title);
- UICommand^ close = ref new UICommand("Close", ref new UICommandInvokedHandler(managed_object, &OSWinrt::ManagedType::alert_close));
+ UICommand^ close = ref new UICommand("Close", ref new UICommandInvokedHandler(managed_object, &OSUWP::ManagedType::alert_close));
msg->Commands->Append(close);
msg->DefaultCommandIndex = 0;
@@ -483,17 +483,17 @@ void OSWinrt::alert(const String& p_alert,const String& p_title) {
msg->ShowAsync();
}
-void OSWinrt::ManagedType::alert_close(IUICommand^ command) {
+void OSUWP::ManagedType::alert_close(IUICommand^ command) {
alert_close_handle = false;
}
-void OSWinrt::ManagedType::on_clipboard_changed(Platform::Object ^ sender, Platform::Object ^ ev) {
+void OSUWP::ManagedType::on_clipboard_changed(Platform::Object ^ sender, Platform::Object ^ ev) {
update_clipboard();
}
-void OSWinrt::ManagedType::update_clipboard() {
+void OSUWP::ManagedType::update_clipboard() {
DataPackageView^ data = Clipboard::GetContent();
@@ -507,7 +507,7 @@ void OSWinrt::ManagedType::update_clipboard() {
}
}
-void OSWinrt::ManagedType::on_accelerometer_reading_changed(Accelerometer ^ sender, AccelerometerReadingChangedEventArgs ^ args) {
+void OSUWP::ManagedType::on_accelerometer_reading_changed(Accelerometer ^ sender, AccelerometerReadingChangedEventArgs ^ args) {
AccelerometerReading^ reading = args->Reading;
@@ -518,7 +518,7 @@ void OSWinrt::ManagedType::on_accelerometer_reading_changed(Accelerometer ^ send
));
}
-void OSWinrt::ManagedType::on_magnetometer_reading_changed(Magnetometer ^ sender, MagnetometerReadingChangedEventArgs ^ args) {
+void OSUWP::ManagedType::on_magnetometer_reading_changed(Magnetometer ^ sender, MagnetometerReadingChangedEventArgs ^ args) {
MagnetometerReading^ reading = args->Reading;
@@ -529,7 +529,7 @@ void OSWinrt::ManagedType::on_magnetometer_reading_changed(Magnetometer ^ sender
));
}
-void OSWinrt::ManagedType::on_gyroscope_reading_changed(Gyrometer ^ sender, GyrometerReadingChangedEventArgs ^ args) {
+void OSUWP::ManagedType::on_gyroscope_reading_changed(Gyrometer ^ sender, GyrometerReadingChangedEventArgs ^ args) {
GyrometerReading^ reading = args->Reading;
@@ -540,7 +540,7 @@ void OSWinrt::ManagedType::on_gyroscope_reading_changed(Gyrometer ^ sender, Gyro
));
}
-void OSWinrt::set_mouse_mode(MouseMode p_mode) {
+void OSUWP::set_mouse_mode(MouseMode p_mode) {
if (p_mode == MouseMode::MOUSE_MODE_CAPTURED) {
@@ -566,41 +566,41 @@ void OSWinrt::set_mouse_mode(MouseMode p_mode) {
SetEvent(mouse_mode_changed);
}
-OSWinrt::MouseMode OSWinrt::get_mouse_mode() const{
+OSUWP::MouseMode OSUWP::get_mouse_mode() const{
return mouse_mode;
}
-Point2 OSWinrt::get_mouse_pos() const {
+Point2 OSUWP::get_mouse_pos() const {
return Point2(old_x, old_y);
}
-int OSWinrt::get_mouse_button_state() const {
+int OSUWP::get_mouse_button_state() const {
return last_button_state;
}
-void OSWinrt::set_window_title(const String& p_title) {
+void OSUWP::set_window_title(const String& p_title) {
}
-void OSWinrt::set_video_mode(const VideoMode& p_video_mode,int p_screen) {
+void OSUWP::set_video_mode(const VideoMode& p_video_mode,int p_screen) {
video_mode = p_video_mode;
}
-OS::VideoMode OSWinrt::get_video_mode(int p_screen) const {
+OS::VideoMode OSUWP::get_video_mode(int p_screen) const {
return video_mode;
}
-void OSWinrt::get_fullscreen_mode_list(List<VideoMode> *p_list,int p_screen) const {
+void OSUWP::get_fullscreen_mode_list(List<VideoMode> *p_list,int p_screen) const {
}
-void OSWinrt::print_error(const char* p_function, const char* p_file, int p_line, const char* p_code, const char* p_rationale, ErrorType p_type) {
+void OSUWP::print_error(const char* p_function, const char* p_file, int p_line, const char* p_code, const char* p_rationale, ErrorType p_type) {
const char* err_details;
if (p_rationale && p_rationale[0])
@@ -625,12 +625,12 @@ void OSWinrt::print_error(const char* p_function, const char* p_file, int p_line
}
-String OSWinrt::get_name() {
+String OSUWP::get_name() {
- return "WinRT";
+ return "UWP";
}
-OS::Date OSWinrt::get_date(bool utc) const {
+OS::Date OSUWP::get_date(bool utc) const {
SYSTEMTIME systemtime;
if (utc)
@@ -646,7 +646,7 @@ OS::Date OSWinrt::get_date(bool utc) const {
date.dst=false;
return date;
}
-OS::Time OSWinrt::get_time(bool utc) const {
+OS::Time OSUWP::get_time(bool utc) const {
SYSTEMTIME systemtime;
if (utc)
@@ -661,7 +661,7 @@ OS::Time OSWinrt::get_time(bool utc) const {
return time;
}
-OS::TimeZoneInfo OSWinrt::get_time_zone_info() const {
+OS::TimeZoneInfo OSUWP::get_time_zone_info() const {
TIME_ZONE_INFORMATION info;
bool daylight = false;
if (GetTimeZoneInformation(&info) == TIME_ZONE_ID_DAYLIGHT)
@@ -678,7 +678,7 @@ OS::TimeZoneInfo OSWinrt::get_time_zone_info() const {
return ret;
}
-uint64_t OSWinrt::get_unix_time() const {
+uint64_t OSUWP::get_unix_time() const {
FILETIME ft;
SYSTEMTIME st;
@@ -700,7 +700,7 @@ uint64_t OSWinrt::get_unix_time() const {
return (*(uint64_t*)&ft - *(uint64_t*)&fep) / 10000000;
};
-void OSWinrt::delay_usec(uint32_t p_usec) const {
+void OSUWP::delay_usec(uint32_t p_usec) const {
int msec = p_usec < 1000 ? 1 : p_usec / 1000;
@@ -708,7 +708,7 @@ void OSWinrt::delay_usec(uint32_t p_usec) const {
WaitForSingleObjectEx(GetCurrentThread(), msec, false);
}
-uint64_t OSWinrt::get_ticks_usec() const {
+uint64_t OSUWP::get_ticks_usec() const {
uint64_t ticks;
uint64_t time;
@@ -723,13 +723,13 @@ uint64_t OSWinrt::get_ticks_usec() const {
}
-void OSWinrt::process_events() {
+void OSUWP::process_events() {
last_id = joystick->process_controllers(last_id);
process_key_events();
}
-void OSWinrt::process_key_events()
+void OSUWP::process_key_events()
{
for (int i = 0; i < key_event_pos; i++) {
@@ -750,7 +750,7 @@ void OSWinrt::process_key_events()
key_event_pos = 0;
}
-void OSWinrt::queue_key_event(KeyEvent & p_event)
+void OSUWP::queue_key_event(KeyEvent & p_event)
{
// This merges Char events with the previous Key event, so
// the unicode can be retrieved without sending duplicate events.
@@ -768,7 +768,7 @@ void OSWinrt::queue_key_event(KeyEvent & p_event)
key_event_buffer[key_event_pos++] = p_event;
}
-void OSWinrt::set_cursor_shape(CursorShape p_shape) {
+void OSUWP::set_cursor_shape(CursorShape p_shape) {
ERR_FAIL_INDEX(p_shape, CURSOR_MAX);
@@ -800,58 +800,58 @@ void OSWinrt::set_cursor_shape(CursorShape p_shape) {
cursor_shape = p_shape;
}
-Error OSWinrt::execute(const String& p_path, const List<String>& p_arguments,bool p_blocking,ProcessID *r_child_id,String* r_pipe,int *r_exitcode) {
+Error OSUWP::execute(const String& p_path, const List<String>& p_arguments,bool p_blocking,ProcessID *r_child_id,String* r_pipe,int *r_exitcode) {
return FAILED;
};
-Error OSWinrt::kill(const ProcessID& p_pid) {
+Error OSUWP::kill(const ProcessID& p_pid) {
return FAILED;
};
-Error OSWinrt::set_cwd(const String& p_cwd) {
+Error OSUWP::set_cwd(const String& p_cwd) {
return FAILED;
}
-String OSWinrt::get_executable_path() const {
+String OSUWP::get_executable_path() const {
return "";
}
-void OSWinrt::set_icon(const Image& p_icon) {
+void OSUWP::set_icon(const Image& p_icon) {
}
-bool OSWinrt::has_environment(const String& p_var) const {
+bool OSUWP::has_environment(const String& p_var) const {
return false;
};
-String OSWinrt::get_environment(const String& p_var) const {
+String OSUWP::get_environment(const String& p_var) const {
return "";
};
-String OSWinrt::get_stdin_string(bool p_block) {
+String OSUWP::get_stdin_string(bool p_block) {
return String();
}
-void OSWinrt::move_window_to_foreground() {
+void OSUWP::move_window_to_foreground() {
}
-Error OSWinrt::shell_open(String p_uri) {
+Error OSUWP::shell_open(String p_uri) {
return FAILED;
}
-String OSWinrt::get_locale() const {
+String OSUWP::get_locale() const {
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP // this should work on phone 8.1, but it doesn't
return "en";
@@ -861,46 +861,46 @@ String OSWinrt::get_locale() const {
#endif
}
-void OSWinrt::release_rendering_thread() {
+void OSUWP::release_rendering_thread() {
gl_context->release_current();
}
-void OSWinrt::make_rendering_thread() {
+void OSUWP::make_rendering_thread() {
gl_context->make_current();
}
-void OSWinrt::swap_buffers() {
+void OSUWP::swap_buffers() {
gl_context->swap_buffers();
}
-bool OSWinrt::has_touchscreen_ui_hint() const {
+bool OSUWP::has_touchscreen_ui_hint() const {
TouchCapabilities^ tc = ref new TouchCapabilities();
return tc->TouchPresent != 0 || UIViewSettings::GetForCurrentView()->UserInteractionMode == UserInteractionMode::Touch;
}
-bool OSWinrt::has_virtual_keyboard() const {
+bool OSUWP::has_virtual_keyboard() const {
return UIViewSettings::GetForCurrentView()->UserInteractionMode == UserInteractionMode::Touch;
}
-void OSWinrt::show_virtual_keyboard(const String & p_existing_text, const Rect2 & p_screen_rect) {
+void OSUWP::show_virtual_keyboard(const String & p_existing_text, const Rect2 & p_screen_rect) {
InputPane^ pane = InputPane::GetForCurrentView();
pane->TryShow();
}
-void OSWinrt::hide_virtual_keyboard() {
+void OSUWP::hide_virtual_keyboard() {
InputPane^ pane = InputPane::GetForCurrentView();
pane->TryHide();
}
-void OSWinrt::run() {
+void OSUWP::run() {
if (!main_loop)
return;
@@ -927,13 +927,13 @@ void OSWinrt::run() {
-MainLoop *OSWinrt::get_main_loop() const {
+MainLoop *OSUWP::get_main_loop() const {
return main_loop;
}
-String OSWinrt::get_data_dir() const {
+String OSUWP::get_data_dir() const {
Windows::Storage::StorageFolder ^data_folder = Windows::Storage::ApplicationData::Current->LocalFolder;
@@ -941,7 +941,7 @@ String OSWinrt::get_data_dir() const {
}
-OSWinrt::OSWinrt() {
+OSUWP::OSUWP() {
key_event_pos=0;
force_quit=false;
@@ -973,7 +973,7 @@ OSWinrt::OSWinrt() {
}
-OSWinrt::~OSWinrt()
+OSUWP::~OSUWP()
{
#ifdef STDOUT_FILE
fclose(stdo);
diff --git a/platform/winrt/os_winrt.h b/platform/uwp/os_uwp.h
index a4667f213d..47eb095e11 100644
--- a/platform/winrt/os_winrt.h
+++ b/platform/uwp/os_uwp.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* os_winrt.h */
+/* os_uwp.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -26,8 +26,8 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef OSWinrt_H
-#define OSWinrt_H
+#ifndef OSUWP_H
+#define OSUWP_H
#include "os/input.h"
#include "os/os.h"
@@ -55,12 +55,12 @@
#include <stdio.h>
#include "main/input_default.h"
-#include "joystick_winrt.h"
+#include "joystick_uwp.h"
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
-class OSWinrt : public OS {
+class OSUWP : public OS {
public:
@@ -137,7 +137,7 @@ private:
InputDefault *input;
- JoystickWinrt^ joystick;
+ JoystickUWP^ joystick;
Windows::System::Display::DisplayRequest^ display_request;
@@ -159,7 +159,7 @@ private:
internal:
ManagedType() { alert_close_handle = false; }
- property OSWinrt* os;
+ property OSUWP* os;
};
ManagedType^ managed_object;
Windows::Devices::Sensors::Accelerometer^ accelerometer;
@@ -273,8 +273,8 @@ public:
void queue_key_event(KeyEvent &p_event);
- OSWinrt();
- ~OSWinrt();
+ OSUWP();
+ ~OSUWP();
};
diff --git a/platform/winrt/platform_config.h b/platform/uwp/platform_config.h
index 88b1fefed8..88b1fefed8 100644
--- a/platform/winrt/platform_config.h
+++ b/platform/uwp/platform_config.h
diff --git a/platform/winrt/thread_winrt.cpp b/platform/uwp/thread_uwp.cpp
index 8e3e0d5bef..a5a0920df6 100644
--- a/platform/winrt/thread_winrt.cpp
+++ b/platform/uwp/thread_uwp.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* thread_winrt.cpp */
+/* thread_uwp.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -26,13 +26,13 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "thread_winrt.h"
+#include "thread_uwp.h"
#include "os/memory.h"
-Thread* ThreadWinrt::create_func_winrt(ThreadCreateCallback p_callback,void *p_user,const Settings&) {
+Thread* ThreadUWP::create_func_uwp(ThreadCreateCallback p_callback,void *p_user,const Settings&) {
- ThreadWinrt* thread = memnew(ThreadWinrt);
+ ThreadUWP* thread = memnew(ThreadUWP);
std::thread new_thread(p_callback, p_user);
@@ -41,34 +41,34 @@ Thread* ThreadWinrt::create_func_winrt(ThreadCreateCallback p_callback,void *p_u
return thread;
};
-Thread::ID ThreadWinrt::get_thread_ID_func_winrt() {
+Thread::ID ThreadUWP::get_thread_ID_func_uwp() {
return std::hash<std::thread::id>()(std::this_thread::get_id());
};
-void ThreadWinrt::wait_to_finish_func_winrt(Thread* p_thread) {
+void ThreadUWP::wait_to_finish_func_uwp(Thread* p_thread) {
- ThreadWinrt *tp=static_cast<ThreadWinrt*>(p_thread);
+ ThreadUWP *tp=static_cast<ThreadUWP*>(p_thread);
tp->thread.join();
};
-Thread::ID ThreadWinrt::get_ID() const {
+Thread::ID ThreadUWP::get_ID() const {
return std::hash<std::thread::id>()(thread.get_id());
};
-void ThreadWinrt::make_default() {
- create_func = create_func_winrt;
- get_thread_ID_func = get_thread_ID_func_winrt;
- wait_to_finish_func = wait_to_finish_func_winrt;
+void ThreadUWP::make_default() {
+ create_func = create_func_uwp;
+ get_thread_ID_func = get_thread_ID_func_uwp;
+ wait_to_finish_func = wait_to_finish_func_uwp;
};
-ThreadWinrt::ThreadWinrt() {
+ThreadUWP::ThreadUWP() {
};
-ThreadWinrt::~ThreadWinrt() {
+ThreadUWP::~ThreadUWP() {
};
diff --git a/platform/winrt/thread_winrt.h b/platform/uwp/thread_uwp.h
index df275d560a..95b9aeb62b 100644
--- a/platform/winrt/thread_winrt.h
+++ b/platform/uwp/thread_uwp.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* thread_winrt.h */
+/* thread_uwp.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -26,24 +26,24 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef THREAD_WINRT_H
-#define THREAD_WINRT_H
+#ifndef THREAD_UWP_H
+#define THREAD_UWP_H
-#ifdef WINRT_ENABLED
+#ifdef UWP_ENABLED
#include "os/thread.h"
#include <thread>
-class ThreadWinrt : public Thread {
+class ThreadUWP : public Thread {
std::thread thread;
- static Thread* create_func_winrt(ThreadCreateCallback p_callback,void *,const Settings&);
- static ID get_thread_ID_func_winrt();
- static void wait_to_finish_func_winrt(Thread* p_thread);
+ static Thread* create_func_uwp(ThreadCreateCallback p_callback,void *,const Settings&);
+ static ID get_thread_ID_func_uwp();
+ static void wait_to_finish_func_uwp(Thread* p_thread);
- ThreadWinrt();
+ ThreadUWP();
public:
@@ -52,7 +52,7 @@ public:
static void make_default();
- ~ThreadWinrt();
+ ~ThreadUWP();
};
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index ca9c666c01..912371142f 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -2363,19 +2363,11 @@ void Tree::_input_event(InputEvent p_event) {
Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
warp_mouse(range_drag_capture_pos);
} else {
-
- if (delayed_text_editor) {
- uint64_t diff = OS::get_singleton()->get_ticks_msec() - first_selection_time;
- if (diff >= 400 && diff <= 800)
- edit_selected();
- // fast double click
- else if (diff < 400) {
- emit_signal("item_double_clicked");
- }
-
- first_selection_time = OS::get_singleton()->get_ticks_msec();
- } else {
+ Rect2 rect = get_selected()->get_meta("__focus_rect");
+ if (rect.has_point(Point2(p_event.mouse_button.x,p_event.mouse_button.y))) {
edit_selected();
+ } else {
+ emit_signal("item_double_clicked");
}
}
pressing_for_editor=false;
@@ -2921,8 +2913,6 @@ void Tree::item_selected(int p_column,TreeItem *p_item) {
p_item->cells[p_column].selected=true;
//emit_signal("multi_selected",p_item,p_column,true); - NO this is for TreeItem::select
- if (delayed_text_editor)
- first_selection_time = OS::get_singleton()->get_ticks_msec();
} else {
@@ -3572,15 +3562,6 @@ bool Tree::get_allow_rmb_select() const{
}
-void Tree::set_delayed_text_editor(bool enabled) {
- delayed_text_editor = enabled;
-}
-
-bool Tree::is_delayed_text_editor_enabled() const {
- return delayed_text_editor;
-}
-
-
void Tree::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_range_click_timeout"),&Tree::_range_click_timeout);
@@ -3634,10 +3615,6 @@ void Tree::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_allow_rmb_select","allow"),&Tree::set_allow_rmb_select);
ObjectTypeDB::bind_method(_MD("get_allow_rmb_select"),&Tree::get_allow_rmb_select);
- ObjectTypeDB::bind_method(_MD("set_delayed_text_editor","enable"),&Tree::set_delayed_text_editor);
- ObjectTypeDB::bind_method(_MD("is_delayed_text_editor_enabled"),&Tree::is_delayed_text_editor_enabled);
-
-
ObjectTypeDB::bind_method(_MD("set_single_select_cell_editing_only_when_already_selected","enable"),&Tree::set_single_select_cell_editing_only_when_already_selected);
ObjectTypeDB::bind_method(_MD("get_single_select_cell_editing_only_when_already_selected"),&Tree::get_single_select_cell_editing_only_when_already_selected);
@@ -3751,9 +3728,6 @@ Tree::Tree() {
force_select_on_already_selected=false;
allow_rmb_select=false;
-
- first_selection_time = 0;
- delayed_text_editor = false;
}
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index 6c2f1dae40..1936f926c8 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -439,9 +439,6 @@ friend class TreeItem;
float last_drag_time;
float time_since_motion;*/
- bool delayed_text_editor;
- uint64_t first_selection_time;
-
float drag_speed;
float drag_from;
float drag_accum;
@@ -537,9 +534,6 @@ public:
void set_value_evaluator(ValueEvaluator *p_evaluator);
- void set_delayed_text_editor(bool enabled);
- bool is_delayed_text_editor_enabled() const;
-
Tree();
~Tree();
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 6e33dcb4c9..f4fb48682c 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -2485,6 +2485,12 @@ void Node::replace_by(Node* p_node,bool p_keep_data) {
rd.name=E->get().name;
rd.value=get(rd.name);
}
+
+ List<GroupInfo> groups;
+ get_groups(&groups);
+
+ for(List<GroupInfo>::Element *E=groups.front();E;E=E->next())
+ p_node->add_to_group(E->get().name, E->get().persistent);
}
_replace_connections_target(p_node);
diff --git a/thirdparty/README.md b/thirdparty/README.md
index a1445a7a9a..3adbbea59b 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -14,7 +14,7 @@ Files extracted from upstream source:
- LICENSE file
Important: Some files have been modified by Godot developers so that they work
-for all platforms (especially WinRT). Check the diff with the 1.3.13 tarball
+for all platforms (especially UWP). Check the diff with the 1.3.13 tarball
before the next update.
diff --git a/thirdparty/enet/win32.c b/thirdparty/enet/win32.c
index 15edd7acbb..f8e0d4efd4 100644
--- a/thirdparty/enet/win32.c
+++ b/thirdparty/enet/win32.c
@@ -28,7 +28,7 @@ enet_initialize (void)
return -1;
}
-#ifndef WINRT_ENABLED
+#ifndef UWP_ENABLED
timeBeginPeriod (1);
#endif
@@ -38,14 +38,14 @@ enet_initialize (void)
void
enet_deinitialize (void)
{
-#ifndef WINRT_ENABLED
+#ifndef UWP_ENABLED
timeEndPeriod (1);
#endif
WSACleanup ();
}
-#ifdef WINRT_ENABLED
+#ifdef UWP_ENABLED
enet_uint32
timeGetTime() {
ULONGLONG ticks = GetTickCount64();
diff --git a/thirdparty/openssl/crypto/rand/rand_win.c b/thirdparty/openssl/crypto/rand/rand_win.c
index 70fd52a7aa..da4c935a53 100644
--- a/thirdparty/openssl/crypto/rand/rand_win.c
+++ b/thirdparty/openssl/crypto/rand/rand_win.c
@@ -118,7 +118,7 @@
# ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0400
# endif
-#ifndef WINRT_ENABLED
+#ifndef UWP_ENABLED
# include <wincrypt.h>
# include <tlhelp32.h>
#endif
@@ -163,7 +163,7 @@ typedef struct tagCURSORINFO {
# define CURSOR_SHOWING 0x00000001
# endif /* CURSOR_SHOWING */
-# if !defined(OPENSSL_SYS_WINCE) && !defined(WINRT_ENABLED)
+# if !defined(OPENSSL_SYS_WINCE) && !defined(UWP_ENABLED)
typedef BOOL(WINAPI *CRYPTACQUIRECONTEXTW) (HCRYPTPROV *, LPCWSTR, LPCWSTR,
DWORD, DWORD);
typedef BOOL(WINAPI *CRYPTGENRANDOM) (HCRYPTPROV, DWORD, BYTE *);
@@ -198,7 +198,7 @@ typedef NET_API_STATUS(NET_API_FUNCTION *NETFREE) (LPBYTE);
# endif /* 1 */
# endif /* !OPENSSL_SYS_WINCE */
-#if !defined(WINRT_ENABLED)
+#if !defined(UWP_ENABLED)
int RAND_poll(void)
{
MEMORYSTATUS m;
@@ -583,7 +583,7 @@ int RAND_poll(void)
return (1);
}
-#endif // WINRT_ENABLED
+#endif // UWP_ENABLED
int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam)
{
@@ -687,7 +687,7 @@ static void readtimer(void)
static void readscreen(void)
{
-# if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN) && !defined(WINRT_ENABLED)
+# if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN) && !defined(UWP_ENABLED)
HDC hScrDC; /* screen DC */
HBITMAP hBitmap; /* handle for our bitmap */
BITMAP bm; /* bitmap properties */
diff --git a/thirdparty/openssl/openssl/dtls1.h b/thirdparty/openssl/openssl/dtls1.h
index a58aca248d..cdd1e4d86e 100644
--- a/thirdparty/openssl/openssl/dtls1.h
+++ b/thirdparty/openssl/openssl/dtls1.h
@@ -81,7 +81,7 @@
# include <sys/time.h>
# endif
# endif
-#ifdef WINRT_ENABLED
+#ifdef UWP_ENABLED
#include <winsock2.h>
#endif
diff --git a/thirdparty/openssl/winrt.cpp b/thirdparty/openssl/uwp.cpp
index c3a6f8bfcc..dcfd22b77f 100644
--- a/thirdparty/openssl/winrt.cpp
+++ b/thirdparty/openssl/uwp.cpp
@@ -1,7 +1,7 @@
/* Snippets extracted from https://github.com/Microsoft/openssl/blob/ec7e430e06e4e3ac87c183dee33cb216814cf980/ms/winrt.cpp
* Adapted for Godot definitions
*/
-/* winrt.cpp
+/* uwp.cpp
* Copyright 2014 Microsoft Corporation
* C++/CX Entropy/shims for Windows Phone/Windows Store platform
* written by Alejandro Jimenez Martinez
@@ -44,7 +44,7 @@ int RAND_poll(void)
return 1;
}
-#if defined(WINRT_ENABLED)
+#if defined(UWP_ENABLED)
extern "C"
{
#include<stdio.h>
@@ -144,7 +144,7 @@ extern "C"
{
return 0;
}
- int winrt_GetTickCount(void)
+ int uwp_GetTickCount(void)
{
LARGE_INTEGER t;
return(int) (QueryPerformanceCounter(&t) ? t.QuadPart : 0);
@@ -152,4 +152,4 @@ extern "C"
void *OPENSSL_UplinkTable [26]= {0};
} //extern C
-#endif /*defined(WINRT_ENABLED)*/
+#endif /*defined(UWP_ENABLED)*/
diff --git a/thirdparty/openssl/winrt_fix.patch b/thirdparty/openssl/uwp_fix.patch
index caf180a75b..00d8b64d00 100644
--- a/thirdparty/openssl/winrt_fix.patch
+++ b/thirdparty/openssl/uwp_fix.patch
@@ -6,7 +6,7 @@ index 06670ae..70fd52a 100644
# ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0400
# endif
-+#ifndef WINRT_ENABLED
++#ifndef UWP_ENABLED
# include <wincrypt.h>
# include <tlhelp32.h>
+#endif
@@ -18,7 +18,7 @@ index 06670ae..70fd52a 100644
# endif /* CURSOR_SHOWING */
-# if !defined(OPENSSL_SYS_WINCE)
-+# if !defined(OPENSSL_SYS_WINCE) && !defined(WINRT_ENABLED)
++# if !defined(OPENSSL_SYS_WINCE) && !defined(UWP_ENABLED)
typedef BOOL(WINAPI *CRYPTACQUIRECONTEXTW) (HCRYPTPROV *, LPCWSTR, LPCWSTR,
DWORD, DWORD);
typedef BOOL(WINAPI *CRYPTGENRANDOM) (HCRYPTPROV, DWORD, BYTE *);
@@ -26,7 +26,7 @@ index 06670ae..70fd52a 100644
# endif /* 1 */
# endif /* !OPENSSL_SYS_WINCE */
-+#if !defined(WINRT_ENABLED)
++#if !defined(UWP_ENABLED)
int RAND_poll(void)
{
MEMORYSTATUS m;
@@ -34,7 +34,7 @@ index 06670ae..70fd52a 100644
return (1);
}
-+#endif // WINRT_ENABLED
++#endif // UWP_ENABLED
+
int RAND_event(UINT iMsg, WPARAM wParam, LPARAM lParam)
{
@@ -44,7 +44,7 @@ index 06670ae..70fd52a 100644
static void readscreen(void)
{
-# if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN)
-+# if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN) && !defined(WINRT_ENABLED)
++# if !defined(OPENSSL_SYS_WINCE) && !defined(OPENSSL_SYS_WIN32_CYGWIN) && !defined(UWP_ENABLED)
HDC hScrDC; /* screen DC */
HBITMAP hBitmap; /* handle for our bitmap */
BITMAP bm; /* bitmap properties */
@@ -56,7 +56,7 @@ index 64ad3c8..a58aca2 100644
# include <sys/time.h>
# endif
# endif
-+#ifdef WINRT_ENABLED
++#ifdef UWP_ENABLED
+#include <winsock2.h>
+#endif
diff --git a/thirdparty/rtaudio/RtAudio.h b/thirdparty/rtaudio/RtAudio.h
index 4392e95f32..aab109d907 100644
--- a/thirdparty/rtaudio/RtAudio.h
+++ b/thirdparty/rtaudio/RtAudio.h
@@ -7,7 +7,7 @@
#elif defined(UNIX_ENABLED)
#define __LINUX_ALSA__
#elif defined(WINDOWS_ENABLED)
- #if defined(WINRT_ENABLED)
+ #if defined(UWP_ENABLED)
#define __RTAUDIO_DUMMY__
#else
#define __WINDOWS_DS__
diff --git a/tools/dist/uwp_template/AppxManifest.xml b/tools/dist/uwp_template/AppxManifest.xml
index 48a2ba7eb3..d5e653708c 100644
--- a/tools/dist/uwp_template/AppxManifest.xml
+++ b/tools/dist/uwp_template/AppxManifest.xml
@@ -15,7 +15,7 @@
<Resource Language="EN-US" />
</Resources>
<Applications>
- <Application Id="App" Executable="godot.winrt.exe" EntryPoint="GodotWinRT.App">
+ <Application Id="App" Executable="godot.uwp.exe" EntryPoint="GodotUWP.App">
<uap:VisualElements DisplayName="$display_name$" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="$app_description$" BackgroundColor="$bg_color$">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" Square310x310Logo="Assets\Square310x310Logo.png" Square71x71Logo="Assets\Square71x71Logo.png" ShortName="$short_name$">
$name_on_tiles$
diff --git a/tools/editor/icons/2x/icon_script_create.png b/tools/editor/icons/2x/icon_script_create.png
new file mode 100644
index 0000000000..67f80e8760
--- /dev/null
+++ b/tools/editor/icons/2x/icon_script_create.png
Binary files differ
diff --git a/tools/editor/icons/icon_script_create.png b/tools/editor/icons/icon_script_create.png
new file mode 100644
index 0000000000..f5d8b0cfd6
--- /dev/null
+++ b/tools/editor/icons/icon_script_create.png
Binary files differ
diff --git a/tools/editor/icons/source/icon_script_create.svg b/tools/editor/icons/source/icon_script_create.svg
new file mode 100644
index 0000000000..c3f69c4601
--- /dev/null
+++ b/tools/editor/icons/source/icon_script_create.svg
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/godotengine/godot/tools/editor/icons/con_script_create.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_script_create.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="29.966667"
+ inkscape:cx="5.495872"
+ inkscape:cy="2.1206692"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1119"
+ inkscape:window-x="0"
+ inkscape:window-y="26"
+ inkscape:window-maximized="1"
+ showguides="false">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336"
+ empspacing="4" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843"
+ d="M 6 1 L 6 2 A 1 1 0 0 0 5 3 L 5 13 L 4 13 L 4 11 L 2 11 L 2 13 A 1 1 0 0 0 2.5 13.865234 A 1 1 0 0 0 3 14 L 3 15 L 10 15 L 10 14 L 7 14 L 7 10 L 10 10 L 10 7 L 12 7 L 12 5 L 15 5 L 15 3 A 2 2 0 0 0 13 1 L 6 1 z M 11 8 L 11 11 L 8 11 L 8 13 L 11 13 L 11 14.730469 A 2 2 0 0 0 12 13 L 12 8 L 11 8 z "
+ transform="translate(0,1036.3622)"
+ id="rect4255" />
+ <path
+ style="opacity:1;fill:#b4b4b4;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843"
+ d="M 6 1 C 4.8954305 1 4 1.8954305 4 3 L 4 10 L 2 10 L 1 10 L 1 11 L 1 13 C 1 14.104569 1.8954305 15 3 15 C 4.1045695 15 5 14.104569 5 13 L 5 3 C 5 2.4477153 5.4477153 2 6 2 C 6.5522847 2 7 2.4477153 7 3 L 7 4 L 7 5 L 7 6 L 8 6 L 12 6 L 12 5 L 8 5 L 8 4 L 8 3 C 8 1.8954305 7.1045695 1 6 1 z M 2 11 L 4 11 L 4 13 C 4 13.552285 3.5522847 14 3 14 C 2.4477153 14 2 13.552285 2 13 L 2 11 z "
+ transform="translate(0,1036.3622)"
+ id="path4265" />
+ <circle
+ cy="1048.3622"
+ cx="3"
+ id="ellipse4234"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843"
+ ry="1.0000174"
+ rx="1" />
+ <path
+ style="fill:#e0e0e0;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
+ d="m 13,1049.3622 3,0 0,-2 -3,0 0,-3 -2,0 0,3 -3,0 0,2 3,0 0,3 2,0 z"
+ id="path8069"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/tools/editor/io_plugins/editor_import_collada.cpp b/tools/editor/io_plugins/editor_import_collada.cpp
index 1130e2be30..2211167dbb 100644
--- a/tools/editor/io_plugins/editor_import_collada.cpp
+++ b/tools/editor/io_plugins/editor_import_collada.cpp
@@ -88,8 +88,8 @@ struct ColladaImport {
Error _create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,const Map<String,Collada::NodeGeometry::Material>& p_material_map,const Collada::MeshData &meshdata,const Transform& p_local_xform,const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_data, const Collada::MorphControllerData *p_morph_data,Vector<Ref<Mesh> > p_morph_meshes=Vector<Ref<Mesh> >());
Error load(const String& p_path, int p_flags, bool p_force_make_tangents=false);
void _fix_param_animation_tracks();
- void create_animation(int p_clip,bool p_make_tracks_in_all_bones);
- void create_animations(bool p_make_tracks_in_all_bones);
+ void create_animation(int p_clip,bool p_make_tracks_in_all_bones, bool p_import_value_tracks);
+ void create_animations(bool p_make_tracks_in_all_bones, bool p_import_value_tracks);
Set<String> tracks_in_clips;
Vector<String> missing_textures;
@@ -1898,7 +1898,7 @@ void ColladaImport::_fix_param_animation_tracks() {
}
-void ColladaImport::create_animations(bool p_make_tracks_in_all_bones) {
+void ColladaImport::create_animations(bool p_make_tracks_in_all_bones, bool p_import_value_tracks) {
_fix_param_animation_tracks();
@@ -1943,14 +1943,14 @@ void ColladaImport::create_animations(bool p_make_tracks_in_all_bones) {
}
- create_animation(-1,p_make_tracks_in_all_bones);
+ create_animation(-1,p_make_tracks_in_all_bones, p_import_value_tracks);
//print_line("clipcount: "+itos(collada.state.animation_clips.size()));
for(int i=0;i<collada.state.animation_clips.size();i++)
- create_animation(i,p_make_tracks_in_all_bones);
+ create_animation(i, p_make_tracks_in_all_bones, p_import_value_tracks);
}
-void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones) {
+void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones, bool p_import_value_tracks) {
Ref<Animation> animation = Ref<Animation>( memnew( Animation ));
@@ -2251,64 +2251,68 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
+ if (p_import_value_tracks) {
+ for (int i = 0; i < valid_animated_properties.size(); i++) {
- for(int i=0;i<valid_animated_properties.size();i++) {
+ int ti = valid_animated_properties[i];
- int ti = valid_animated_properties[i];
+ if (p_clip == -1) {
- if (p_clip==-1) {
+ if (track_filter.has(ti))
+ continue;
+ }
+ else {
- if (track_filter.has(ti))
- continue;
- } else {
+ if (!track_filter.has(ti))
+ continue;
- if (!track_filter.has(ti))
- continue;
+ }
- }
+ Collada::AnimationTrack &at = collada.state.animation_tracks[ti];
- Collada::AnimationTrack &at = collada.state.animation_tracks[ ti ];
+ // take snapshots
+ if (!collada.state.scene_map.has(at.target))
+ continue;
- // take snapshots
- if (!collada.state.scene_map.has(at.target))
- continue;
+ NodeMap &nm = node_map[at.target];
+ String path = scene->get_path_to(nm.node);
- NodeMap &nm = node_map[at.target];
- String path = scene->get_path_to(nm.node);
+ animation->add_track(Animation::TYPE_VALUE);
+ int track = animation->get_track_count() - 1;
- animation->add_track(Animation::TYPE_VALUE);
- int track = animation->get_track_count() -1;
+ path = path + ":" + at.param;
+ animation->track_set_path(track, path);
+ animation->track_set_imported(track, true); //helps merging later
- path = path +":"+at.param;
- animation->track_set_path( track , path );
- animation->track_set_imported( track , true ); //helps merging later
+ for (int i = 0; i < at.keys.size(); i++) {
- for(int i=0;i<at.keys.size();i++) {
+ float time = at.keys[i].time;
+ Variant value;
+ Vector<float> data = at.keys[i].data;
+ if (data.size() == 1) {
+ //push a float
+ value = data[0];
- float time = at.keys[i].time;
- Variant value;
- Vector<float> data = at.keys[i].data;
- if (data.size()==1) {
- //push a float
- value=data[0];
+ }
+ else if (data.size() == 16) {
+ //matrix
+ print_line("value keys for matrices not supported");
+ }
+ else {
- } else if (data.size()==16) {
- //matrix
- print_line("value keys for matrices not supported");
- } else {
+ print_line("don't know what to do with this amount of value keys: " + itos(data.size()));
+ }
- print_line("don't know what to do with this amount of value keys: "+itos(data.size()));
+ animation->track_insert_key(track, time, value);
}
- animation->track_insert_key(track,time,value);
- }
+ tracks_found = true;
- tracks_found=true;
-
+ }
}
@@ -2373,7 +2377,7 @@ Node* EditorSceneImporterCollada::import_scene(const String& p_path, uint32_t p_
if (p_flags&IMPORT_ANIMATION) {
- state.create_animations(p_flags&IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS);
+ state.create_animations(p_flags&IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS,p_flags&EditorSceneImporter::IMPORT_ANIMATION_KEEP_VALUE_TRACKS);
AnimationPlayer *ap = memnew( AnimationPlayer );
for(int i=0;i<state.animations.size();i++) {
String name;
@@ -2410,7 +2414,7 @@ Ref<Animation> EditorSceneImporterCollada::import_animation(const String& p_path
ERR_FAIL_COND_V(err!=OK,RES());
- state.create_animations(p_flags&EditorSceneImporter::IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS);
+ state.create_animations(p_flags&EditorSceneImporter::IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS,p_flags&EditorSceneImporter::IMPORT_ANIMATION_KEEP_VALUE_TRACKS);
if (state.scene)
memdelete(state.scene);
diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.cpp b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
index 56af35c6db..cb8ec6d0bc 100644
--- a/tools/editor/io_plugins/editor_scene_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
@@ -2164,6 +2164,8 @@ Error EditorSceneImportPlugin::import1(const Ref<ResourceImportMetadata>& p_from
uint32_t import_flags=0;
if (animation_flags&EditorSceneAnimationImportPlugin::ANIMATION_DETECT_LOOP)
import_flags|=EditorSceneImporter::IMPORT_ANIMATION_DETECT_LOOP;
+ if (animation_flags&EditorSceneAnimationImportPlugin::ANIMATION_KEEP_VALUE_TRACKS)
+ import_flags |= EditorSceneImporter::IMPORT_ANIMATION_KEEP_VALUE_TRACKS;
if (animation_flags&EditorSceneAnimationImportPlugin::ANIMATION_OPTIMIZE)
import_flags|=EditorSceneImporter::IMPORT_ANIMATION_OPTIMIZE;
if (animation_flags&EditorSceneAnimationImportPlugin::ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS)
diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.h b/tools/editor/io_plugins/editor_scene_import_plugin.h
index c31d3a33d3..2c27f06960 100644
--- a/tools/editor/io_plugins/editor_scene_import_plugin.h
+++ b/tools/editor/io_plugins/editor_scene_import_plugin.h
@@ -60,6 +60,7 @@ public:
IMPORT_ANIMATION_DETECT_LOOP=4,
IMPORT_ANIMATION_OPTIMIZE=8,
IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS=16,
+ IMPORT_ANIMATION_KEEP_VALUE_TRACKS=32,
IMPORT_GENERATE_TANGENT_ARRAYS=256,
IMPORT_FAIL_ON_MISSING_DEPENDENCIES=512
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp
index b4d32eb5c2..e7d8776f1f 100644
--- a/tools/editor/scene_tree_dock.cpp
+++ b/tools/editor/scene_tree_dock.cpp
@@ -722,7 +722,7 @@ void SceneTreeDock::_notification(int p_what) {
}
button_add->set_icon(get_icon("Add","EditorIcons"));
button_instance->set_icon(get_icon("Instance","EditorIcons"));
- button_create_script->set_icon(get_icon("Script","EditorIcons"));
+ button_create_script->set_icon(get_icon("ScriptCreate","EditorIcons"));
button_load_script->set_icon(get_icon("Script", "EditorIcons"));
button_clear_script->set_icon(get_icon("Remove", "EditorIcons"));
@@ -1848,7 +1848,7 @@ void SceneTreeDock::_tree_rmb(const Vector2& p_menu_pos) {
//menu->add_icon_item(get_icon("Groups","EditorIcons"),TTR("Edit Groups"),TOOL_GROUP);
//menu->add_icon_item(get_icon("Connect","EditorIcons"),TTR("Edit Connections"),TOOL_CONNECT);
menu->add_separator();
- menu->add_icon_shortcut(get_icon("Script", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/add_script"), TOOL_CREATE_SCRIPT);
+ menu->add_icon_shortcut(get_icon("ScriptCreate", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/add_script"), TOOL_CREATE_SCRIPT);
menu->add_icon_shortcut(get_icon("Script", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/load_script"), TOOL_LOAD_SCRIPT);
menu->add_icon_shortcut(get_icon("Remove", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/clear_script"), TOOL_CLEAR_SCRIPT);
menu->add_separator();
@@ -2038,7 +2038,6 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor,Node *p_scene_root,EditorSelec
scene_tree->connect("nodes_dragged",this,"_nodes_drag_begin");
scene_tree->get_scene_tree()->connect("item_double_clicked", this, "_focus_node");
- scene_tree->get_scene_tree()->set_delayed_text_editor(true);
scene_tree->set_undo_redo(&editor_data->get_undo_redo());
scene_tree->set_editor_selection(editor_selection);