diff options
193 files changed, 4997 insertions, 648 deletions
diff --git a/SConstruct b/SConstruct index 5e821751f3..0f9b046e2b 100644 --- a/SConstruct +++ b/SConstruct @@ -63,14 +63,9 @@ elif (os.name=="nt"): if (os.getenv("VSINSTALLDIR")==None or platform_arg=="android"): custom_tools=['mingw'] -env_base=Environment( - tools=custom_tools, - ENV={ - 'PATH' : os.getenv('PATH'), - 'PKG_CONFIG_PATH' : os.getenv('PKG_CONFIG_PATH') -}); - -#env_base=Environment(tools=custom_tools); +env_base=Environment(tools=custom_tools); +env_base.AppendENVPath('PATH', os.getenv('PATH')) +env_base.AppendENVPath('PKG_CONFIG_PATH', os.getenv('PKG_CONFIG_PATH')) env_base.global_defaults=global_defaults env_base.android_maven_repos=[] env_base.android_dependencies=[] diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index addc26525e..31c0c0e208 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -436,6 +436,15 @@ Error _OS::set_thread_name(const String& p_name) { return Thread::set_name(p_name); }; +void _OS::set_use_vsync(bool p_enable) { + OS::get_singleton()->set_use_vsync(p_enable); +} + +bool _OS::is_vsnc_enabled() const { + + return OS::get_singleton()->is_vsnc_enabled(); +} + /* enum Weekday { @@ -1110,6 +1119,8 @@ void _OS::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_thread_name","name"),&_OS::set_thread_name); + ObjectTypeDB::bind_method(_MD("set_use_vsync","enable"),&_OS::set_use_vsync); + ObjectTypeDB::bind_method(_MD("is_vsnc_enabled"),&_OS::is_vsnc_enabled); BIND_CONSTANT( DAY_SUNDAY ); BIND_CONSTANT( DAY_MONDAY ); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index af89536c45..441927940d 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -282,6 +282,9 @@ public: Error set_thread_name(const String& p_name); + void set_use_vsync(bool p_enable); + bool is_vsnc_enabled() const; + static _OS *get_singleton() { return singleton; } _OS(); diff --git a/core/command_queue_mt.h b/core/command_queue_mt.h index b1e0066c35..409543bf25 100644 --- a/core/command_queue_mt.h +++ b/core/command_queue_mt.h @@ -152,6 +152,23 @@ class CommandQueueMT { virtual void call() { (instance->*method)(p1,p2,p3,p4,p5,p6,p7); } }; + template<class T,class M,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> + struct Command8 : public CommandBase { + + T*instance; + M method; + typename GetSimpleTypeT<P1>::type_t p1; + typename GetSimpleTypeT<P2>::type_t p2; + typename GetSimpleTypeT<P3>::type_t p3; + typename GetSimpleTypeT<P4>::type_t p4; + typename GetSimpleTypeT<P5>::type_t p5; + typename GetSimpleTypeT<P6>::type_t p6; + typename GetSimpleTypeT<P7>::type_t p7; + typename GetSimpleTypeT<P8>::type_t p8; + + virtual void call() { (instance->*method)(p1,p2,p3,p4,p5,p6,p7,p8); } + }; + /* comands that return */ template<class T,class M,class R> @@ -270,6 +287,25 @@ class CommandQueueMT { virtual void call() { *ret = (instance->*method)(p1,p2,p3,p4,p5,p6,p7); sync->sem->post(); sync->in_use=false; ; } }; + template<class T,class M,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8,class R> + struct CommandRet8 : public CommandBase { + + T*instance; + M method; + typename GetSimpleTypeT<P1>::type_t p1; + typename GetSimpleTypeT<P2>::type_t p2; + typename GetSimpleTypeT<P3>::type_t p3; + typename GetSimpleTypeT<P4>::type_t p4; + typename GetSimpleTypeT<P5>::type_t p5; + typename GetSimpleTypeT<P6>::type_t p6; + typename GetSimpleTypeT<P7>::type_t p7; + typename GetSimpleTypeT<P8>::type_t p8; + R* ret; + SyncSemaphore *sync; + + virtual void call() { *ret = (instance->*method)(p1,p2,p3,p4,p5,p6,p7,p8); sync->sem->post(); sync->in_use=false; ; } + }; + /** commands that don't return but sync */ /* comands that return */ @@ -390,6 +426,25 @@ class CommandQueueMT { virtual void call() { (instance->*method)(p1,p2,p3,p4,p5,p6,p7); sync->sem->post(); sync->in_use=false; ; } }; + template<class T,class M,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class P8> + struct CommandSync8 : public CommandBase { + + T*instance; + M method; + typename GetSimpleTypeT<P1>::type_t p1; + typename GetSimpleTypeT<P2>::type_t p2; + typename GetSimpleTypeT<P3>::type_t p3; + typename GetSimpleTypeT<P4>::type_t p4; + typename GetSimpleTypeT<P5>::type_t p5; + typename GetSimpleTypeT<P6>::type_t p6; + typename GetSimpleTypeT<P7>::type_t p7; + typename GetSimpleTypeT<P8>::type_t p8; + + SyncSemaphore *sync; + + virtual void call() { (instance->*method)(p1,p2,p3,p4,p5,p6,p7,p8); sync->sem->post(); sync->in_use=false; ; } + }; + /***** BASE *******/ enum { @@ -639,6 +694,27 @@ public: if (sync) sync->post(); } + + template<class T, class M, class P1, class P2, class P3, class P4, class P5, class P6, class P7,class P8> + void push( T * p_instance, M p_method, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8 ) { + + Command8<T,M,P1,P2,P3,P4,P5,P6,P7,P8> * cmd = allocate_and_lock< Command8<T,M,P1,P2,P3,P4,P5,P6,P7,P8> >(); + + cmd->instance=p_instance; + cmd->method=p_method; + cmd->p1=p1; + cmd->p2=p2; + cmd->p3=p3; + cmd->p4=p4; + cmd->p5=p5; + cmd->p6=p6; + cmd->p7=p7; + cmd->p8=p8; + + unlock(); + + if (sync) sync->post(); + } /*** PUSH AND RET COMMANDS ***/ @@ -806,6 +882,31 @@ public: ss->sem->wait(); } + template<class T, class M, class P1, class P2, class P3, class P4, class P5, class P6,class P7,class P8,class R> + void push_and_ret( T * p_instance, M p_method, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6,P7 p7,P8 p8, R* r_ret ) { + + CommandRet8<T,M,P1,P2,P3,P4,P5,P6,P7,P8,R> * cmd = allocate_and_lock< CommandRet8<T,M,P1,P2,P3,P4,P5,P6,P7,P8,R> >(); + + cmd->instance=p_instance; + cmd->method=p_method; + cmd->p1=p1; + cmd->p2=p2; + cmd->p3=p3; + cmd->p4=p4; + cmd->p5=p5; + cmd->p6=p6; + cmd->p7=p7; + cmd->p8=p8; + cmd->ret=r_ret; + SyncSemaphore *ss=_alloc_sync_sem(); + cmd->sync=ss; + + unlock(); + + if (sync) sync->post(); + ss->sem->wait(); + } + template<class T, class M> void push_and_sync( T * p_instance, M p_method) { @@ -971,6 +1072,31 @@ public: ss->sem->wait(); } + template<class T, class M, class P1, class P2, class P3, class P4, class P5, class P6,class P7,class P8> + void push_and_sync( T * p_instance, M p_method, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6,P7 p7,P8 p8) { + + CommandSync8<T,M,P1,P2,P3,P4,P5,P6,P7,P8> * cmd = allocate_and_lock< CommandSync8<T,M,P1,P2,P3,P4,P5,P6,P7,P8> >(); + + cmd->instance=p_instance; + cmd->method=p_method; + cmd->p1=p1; + cmd->p2=p2; + cmd->p3=p3; + cmd->p4=p4; + cmd->p5=p5; + cmd->p6=p6; + cmd->p7=p7; + cmd->p8=p8; + + SyncSemaphore *ss=_alloc_sync_sem(); + cmd->sync=ss; + + unlock(); + + if (sync) sync->post(); + ss->sem->wait(); + } + void wait_and_flush_one() { ERR_FAIL_COND(!sync); sync->wait(); diff --git a/core/dictionary.cpp b/core/dictionary.cpp index 75c8531251..6204a87054 100644 --- a/core/dictionary.cpp +++ b/core/dictionary.cpp @@ -199,6 +199,18 @@ Array Dictionary::keys() const { } +Array Dictionary::values() const { + + Array varr; + varr.resize(size()); + const Variant *key=NULL; + int i=0; + while((key=next(key))){ + varr[i++] = _p->variant_map[*key]; + } + return varr; +} + const Variant* Dictionary::next(const Variant* p_key) const { return _p->variant_map.next(p_key); @@ -250,5 +262,3 @@ Dictionary::~Dictionary() { _unref(); } - - diff --git a/core/dictionary.h b/core/dictionary.h index c854e95ee6..ae79fab9c3 100644 --- a/core/dictionary.h +++ b/core/dictionary.h @@ -81,6 +81,7 @@ public: const Variant* next(const Variant* p_key=NULL) const; Array keys() const; + Array values() const; Dictionary(const Dictionary& p_from); Dictionary(bool p_shared=false); diff --git a/core/dvector.h b/core/dvector.h index fbb1fc4824..a5519ed604 100644 --- a/core/dvector.h +++ b/core/dvector.h @@ -285,6 +285,7 @@ public: Error resize(int p_size); + void invert(); void operator=(const DVector& p_dvector) { reference(p_dvector); } DVector() {} @@ -424,6 +425,18 @@ Error DVector<T>::resize(int p_size) { return OK; } +template<class T> +void DVector<T>::invert() { + T temp; + Write w = write(); + int s = size(); + int half_s = s/2; + for(int i=0;i<half_s;i++) { + temp = w[i]; + w[i] = w[s-i-1]; + w[s-i-1] = temp; + } +} #endif diff --git a/core/global_constants.cpp b/core/global_constants.cpp index 3cf4ff8f83..63764383ff 100644 --- a/core/global_constants.cpp +++ b/core/global_constants.cpp @@ -478,7 +478,21 @@ static _GlobalConstant _global_constants[]={ BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_STORAGE ), BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_EDITOR ), BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_NETWORK ), + + BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_EDITOR_HELPER ), + BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_CHECKABLE ), + BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_CHECKED ), + BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_INTERNATIONALIZED ), + BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_BUNDLE ), + BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_CATEGORY ), + BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_STORE_IF_NONZERO ), + BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_STORE_IF_NONONE ), + BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_NO_INSTANCE_STATE ), + BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_RESTART_IF_CHANGED ), + BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_DEFAULT ), + BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_DEFAULT_INTL ), + BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_NOEDITOR ), BIND_GLOBAL_CONSTANT( METHOD_FLAG_NORMAL ), BIND_GLOBAL_CONSTANT( METHOD_FLAG_EDITOR ), diff --git a/core/input_map.cpp b/core/input_map.cpp index c266220541..08ee8138a3 100644 --- a/core/input_map.cpp +++ b/core/input_map.cpp @@ -327,56 +327,56 @@ void InputMap::load_default() { InputEvent key; key.type=InputEvent::KEY; - add_action("input/ui_accept"); + add_action("ui_accept"); key.key.scancode=KEY_RETURN; - action_add_event("input/ui_accept",key); + action_add_event("ui_accept",key); key.key.scancode=KEY_ENTER; - action_add_event("input/ui_accept",key); + action_add_event("ui_accept",key); key.key.scancode=KEY_SPACE; - action_add_event("input/ui_accept",key); + action_add_event("ui_accept",key); - add_action("input/ui_select"); + add_action("ui_select"); key.key.scancode=KEY_SPACE; - action_add_event("input/ui_select",key); + action_add_event("ui_select",key); - add_action("input/ui_cancel"); + add_action("ui_cancel"); key.key.scancode=KEY_ESCAPE; - action_add_event("input/ui_cancel",key); + action_add_event("ui_cancel",key); - add_action("input/ui_focus_next"); + add_action("ui_focus_next"); key.key.scancode=KEY_TAB; - action_add_event("input/ui_focus_next",key); + action_add_event("ui_focus_next",key); - add_action("input/ui_focus_prev"); + add_action("ui_focus_prev"); key.key.scancode=KEY_TAB; key.key.mod.shift=true; - action_add_event("input/ui_focus_prev",key); + action_add_event("ui_focus_prev",key); key.key.mod.shift=false; - add_action("input/ui_left"); + add_action("ui_left"); key.key.scancode=KEY_LEFT; - action_add_event("input/ui_left",key); + action_add_event("ui_left",key); - add_action("input/ui_right"); + add_action("ui_right"); key.key.scancode=KEY_RIGHT; - action_add_event("input/ui_right",key); + action_add_event("ui_right",key); - add_action("input/ui_up"); + add_action("ui_up"); key.key.scancode=KEY_UP; - action_add_event("input/ui_up",key); + action_add_event("ui_up",key); - add_action("input/ui_down"); + add_action("ui_down"); key.key.scancode=KEY_DOWN; - action_add_event("input/ui_down",key); + action_add_event("ui_down",key); - add_action("input/ui_page_up"); + add_action("ui_page_up"); key.key.scancode=KEY_PAGEUP; - action_add_event("input/ui_page_up",key); + action_add_event("ui_page_up",key); - add_action("input/ui_page_down"); + add_action("ui_page_down"); key.key.scancode=KEY_PAGEDOWN; - action_add_event("input/ui_page_down",key); + action_add_event("ui_page_down",key); // set("display/orientation", "landscape"); diff --git a/core/io/LICENSE-InfoZip.txt b/core/io/LICENSE-InfoZip.txt new file mode 100644 index 0000000000..bcfe47e978 --- /dev/null +++ b/core/io/LICENSE-InfoZip.txt @@ -0,0 +1,60 @@ +This is version 2007-Mar-4 of the Info-ZIP license. +The definitive version of this document should be available at +ftp://ftp.info-zip.org/pub/infozip/license.html indefinitely and +a copy at http://www.info-zip.org/pub/infozip/license.html. + + +Copyright (c) 1990-2007 Info-ZIP. All rights reserved. + +For the purposes of this copyright and license, "Info-ZIP" is defined as +the following set of individuals: + + Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois, + Jean-loup Gailly, Hunter Goatley, Ed Gordon, Ian Gorman, Chris Herborth, + Dirk Haase, Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, + David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko, + Steve P. Miller, Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs, + Kai Uwe Rommel, Steve Salisbury, Dave Smith, Steven M. Schweda, + Christian Spieler, Cosmin Truta, Antoine Verheijen, Paul von Behren, + Rich Wales, Mike White. + +This software is provided "as is," without warranty of any kind, express +or implied. In no event shall Info-ZIP or its contributors be held liable +for any direct, indirect, incidental, special or consequential damages +arising out of the use of or inability to use this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the above disclaimer and the following restrictions: + + 1. Redistributions of source code (in whole or in part) must retain + the above copyright notice, definition, disclaimer, and this list + of conditions. + + 2. Redistributions in binary form (compiled executables and libraries) + must reproduce the above copyright notice, definition, disclaimer, + and this list of conditions in documentation and/or other materials + provided with the distribution. The sole exception to this condition + is redistribution of a standard UnZipSFX binary (including SFXWiz) as + part of a self-extracting archive; that is permitted without inclusion + of this license, as long as the normal SFX banner has not been removed + from the binary or disabled. + + 3. Altered versions--including, but not limited to, ports to new operating + systems, existing ports with new graphical interfaces, versions with + modified or added functionality, and dynamic, shared, or static library + versions not from Info-ZIP--must be plainly marked as such and must not + be misrepresented as being the original source or, if binaries, + compiled from the original source. Such altered versions also must not + be misrepresented as being Info-ZIP releases--including, but not + limited to, labeling of the altered versions with the names "Info-ZIP" + (or any variation thereof, including, but not limited to, different + capitalizations), "Pocket UnZip," "WiZ" or "MacZip" without the + explicit permission of Info-ZIP. Such altered versions are further + prohibited from misrepresentative use of the Zip-Bugs or Info-ZIP + e-mail addresses or the Info-ZIP URL(s), such as to imply Info-ZIP + will provide support for the altered versions. + + 4. Info-ZIP retains the right to use the names "Info-ZIP," "Zip," "UnZip," + "UnZipSFX," "WiZ," "Pocket UnZip," "Pocket Zip," and "MacZip" for its + own source and binary releases. diff --git a/core/io/LICENSE-MiniZip.txt b/core/io/LICENSE-MiniZip.txt new file mode 100644 index 0000000000..0e8950f86f --- /dev/null +++ b/core/io/LICENSE-MiniZip.txt @@ -0,0 +1,32 @@ +Credits + + Gilles Vollant - Original MiniZip author + Even Rouault - ZIP64 unzip Support + Daniel Borca - BZip Compression method support in unzip + Mathias Svensson - ZIP64 zip support + Mathias Svensson - BZip Compression method support in zip + + This version has been modified for Godot Engine + + +License +---------------------------------------------------------------------------- + Condition of use and distribution are the same than zlib : + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + +---------------------------------------------------------------------------- diff --git a/core/io/ioapi.c b/core/io/ioapi.c index 8818199f0b..d6063a5fe6 100644 --- a/core/io/ioapi.c +++ b/core/io/ioapi.c @@ -6,7 +6,7 @@ Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - For more info read MiniZip_info.txt + For more info read LICENSE-MiniZip.txt */ diff --git a/core/io/ioapi.h b/core/io/ioapi.h index 24bf612617..cb6cb7e766 100644 --- a/core/io/ioapi.h +++ b/core/io/ioapi.h @@ -5,7 +5,7 @@ Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - For more info read MiniZip_info.txt + For more info read LICENSE-MiniZip.txt Changes diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index b547dc0e85..1bb80e74eb 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -319,7 +319,11 @@ Ref<ResourceInteractiveLoader> ResourceLoader::load_interactive(const String &p_ if (OS::get_singleton()->is_stdout_verbose()) print_line("load resource: "+local_path+" (cached)"); - return RES( ResourceCache::get(local_path ) ); + Ref<Resource> res_cached = ResourceCache::get(local_path); + Ref<ResourceInteractiveLoaderDefault> ril = Ref<ResourceInteractiveLoaderDefault>(memnew(ResourceInteractiveLoaderDefault)); + + ril->resource = res_cached; + return ril; } if (OS::get_singleton()->is_stdout_verbose()) diff --git a/core/io/unzip.c b/core/io/unzip.c index b438021ad7..78672677f9 100644 --- a/core/io/unzip.c +++ b/core/io/unzip.c @@ -10,7 +10,7 @@ Modifications for Zip64 support on both zip and unzip Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - For more info read MiniZip_info.txt + For more info read LICENSE-MiniZip.txt ------------------------------------------------------------------------------------ diff --git a/core/io/unzip.h b/core/io/unzip.h index cb3d239eac..f67c3b2fa8 100644 --- a/core/io/unzip.h +++ b/core/io/unzip.h @@ -10,7 +10,7 @@ Modifications for Zip64 support on both zip and unzip Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - For more info read MiniZip_info.txt + For more info read LICENSE-MiniZip.txt --------------------------------------------------------------------------------- diff --git a/core/io/zip.c b/core/io/zip.c index c4ab93ab81..44c79195d9 100644 --- a/core/io/zip.c +++ b/core/io/zip.c @@ -7,7 +7,7 @@ Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - For more info read MiniZip_info.txt + For more info read LICENSE-MiniZip.txt Changes Oct-2009 - Mathias Svensson - Remove old C style function prototypes diff --git a/core/io/zip.h b/core/io/zip.h index 85f93568c9..37478b34c0 100644 --- a/core/io/zip.h +++ b/core/io/zip.h @@ -6,7 +6,7 @@ Modifications for Zip64 support Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - For more info read MiniZip_info.txt + For more info read LICENSE-MiniZip.txt --------------------------------------------------------------------------- diff --git a/core/object.cpp b/core/object.cpp index bedab63281..34d6d8487a 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -1401,6 +1401,13 @@ bool Object::has_persistent_signal_connections() const { return false; } +void Object::get_signals_connected_to_this(List<Connection> *p_connections) const { + + for (const List<Connection>::Element *E=connections.front();E;E=E->next()) { + p_connections->push_back(E->get()); + } +} + Error Object::connect(const StringName& p_signal, Object *p_to_object, const StringName& p_to_method,const Vector<Variant>& p_binds,uint32_t p_flags) { diff --git a/core/object.h b/core/object.h index e886aa3459..9359f4d4b2 100644 --- a/core/object.h +++ b/core/object.h @@ -605,6 +605,7 @@ public: void get_signal_connection_list(const StringName& p_signal,List<Connection> *p_connections) const; void get_all_signal_connections(List<Connection> *p_connections) const; bool has_persistent_signal_connections() const; + void get_signals_connected_to_this(List<Connection> *p_connections) const; Error connect(const StringName& p_signal, Object *p_to_object, const StringName& p_to_method,const Vector<Variant>& p_binds=Vector<Variant>(),uint32_t p_flags=0); void disconnect(const StringName& p_signal, Object *p_to_object, const StringName& p_to_method); diff --git a/core/os/os.cpp b/core/os/os.cpp index 4daf41e68e..e501bc2eb5 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -539,6 +539,14 @@ String OS::get_joy_guid(int p_device) const { void OS::set_context(int p_context) { } +void OS::set_use_vsync(bool p_enable) { + +} + +bool OS::is_vsnc_enabled() const{ + + return true; +} OS::OS() { last_error=NULL; diff --git a/core/os/os.h b/core/os/os.h index a1047bd48f..c291d09250 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -420,6 +420,9 @@ public: virtual void set_context(int p_context); + virtual void set_use_vsync(bool p_enable); + virtual bool is_vsnc_enabled() const; + bool is_hidpi_allowed() const { return _allow_hidpi; } OS(); virtual ~OS(); diff --git a/core/variant_call.cpp b/core/variant_call.cpp index f5dcd75691..d427a80541 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -262,7 +262,7 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var VCALL_LOCALMEM0R(String,basename); VCALL_LOCALMEM1R(String,plus_file); VCALL_LOCALMEM1R(String,ord_at); - //VCALL_LOCALMEM2R(String,erase); + VCALL_LOCALMEM2(String,erase); VCALL_LOCALMEM0R(String,hash); VCALL_LOCALMEM0R(String,md5_text); VCALL_LOCALMEM0R(String,md5_buffer); @@ -339,6 +339,7 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var VCALL_LOCALMEM1R(Vector2,reflect); VCALL_LOCALMEM0R(Vector2,angle); // VCALL_LOCALMEM1R(Vector2,cross); + VCALL_LOCALMEM0R(Vector2,abs); VCALL_LOCALMEM0R(Rect2,get_area); VCALL_LOCALMEM1R(Rect2,intersects); @@ -445,6 +446,7 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var VCALL_LOCALMEM1(Dictionary,erase); VCALL_LOCALMEM0R(Dictionary,hash); VCALL_LOCALMEM0R(Dictionary,keys); + VCALL_LOCALMEM0R(Dictionary,values); VCALL_LOCALMEM1R(Dictionary,parse_json); VCALL_LOCALMEM0R(Dictionary,to_json); @@ -1284,7 +1286,7 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl ADDFUNC0(STRING,STRING,String,basename,varray()); ADDFUNC1(STRING,STRING,String,plus_file,STRING,"file",varray()); ADDFUNC1(STRING,STRING,String,ord_at,INT,"at",varray()); -// ADDFUNC2(STRING,String,erase,INT,INT,varray()); + ADDFUNC2(STRING,NIL,String,erase,INT,"pos",INT,"chars", varray()); ADDFUNC0(STRING,INT,String,hash,varray()); ADDFUNC0(STRING,STRING,String,md5_text,varray()); ADDFUNC0(STRING,RAW_ARRAY,String,md5_buffer,varray()); @@ -1335,6 +1337,7 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl ADDFUNC1(VECTOR2,VECTOR2,Vector2,slide,VECTOR2,"vec",varray()); ADDFUNC1(VECTOR2,VECTOR2,Vector2,reflect,VECTOR2,"vec",varray()); //ADDFUNC1(VECTOR2,REAL,Vector2,cross,VECTOR2,"with",varray()); + ADDFUNC0(VECTOR2,VECTOR2,Vector2,abs,varray()); ADDFUNC0(RECT2,REAL,Rect2,get_area,varray()); ADDFUNC1(RECT2,BOOL,Rect2,intersects,RECT2,"b",varray()); @@ -1434,6 +1437,7 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl ADDFUNC1(DICTIONARY,NIL,Dictionary,erase,NIL,"value",varray()); ADDFUNC0(DICTIONARY,INT,Dictionary,hash,varray()); ADDFUNC0(DICTIONARY,ARRAY,Dictionary,keys,varray()); + ADDFUNC0(DICTIONARY,ARRAY,Dictionary,values,varray()); ADDFUNC1(DICTIONARY,INT,Dictionary,parse_json,STRING,"json",varray()); ADDFUNC0(DICTIONARY,STRING,Dictionary,to_json,varray()); @@ -1659,6 +1663,9 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl _VariantCall::constant_data[Variant::IMAGE].value["FORMAT_ATC_ALPHA_INTERPOLATED"]=Image::FORMAT_ATC_ALPHA_INTERPOLATED; _VariantCall::constant_data[Variant::IMAGE].value["FORMAT_CUSTOM"]=Image::FORMAT_CUSTOM; + _VariantCall::constant_data[Variant::IMAGE].value["INTERPOLATE_NEAREST"]=Image::INTERPOLATE_NEAREST; + _VariantCall::constant_data[Variant::IMAGE].value["INTERPOLATE_BILINEAR"]=Image::INTERPOLATE_BILINEAR; + _VariantCall::constant_data[Variant::IMAGE].value["INTERPOLATE_CUBIC"]=Image::INTERPOLATE_CUBIC; } void unregister_variant_methods() { diff --git a/doc/base/classes.xml b/doc/base/classes.xml index d71918b949..9b8940bc50 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -1809,9 +1809,33 @@ </constant> <constant name="PROPERTY_USAGE_NETWORK" value="4"> </constant> + <constant name="PROPERTY_USAGE_EDITOR_HELPER" value="8"> + </constant> + <constant name="PROPERTY_USAGE_CHECKABLE" value="16"> + </constant> + <constant name="PROPERTY_USAGE_CHECKED" value="32"> + </constant> + <constant name="PROPERTY_USAGE_INTERNATIONALIZED" value="64"> + </constant> + <constant name="PROPERTY_USAGE_BUNDLE" value="128"> + </constant> + <constant name="PROPERTY_USAGE_CATEGORY" value="256"> + </constant> + <constant name="PROPERTY_USAGE_STORE_IF_NONZERO" value="512"> + </constant> + <constant name="PROPERTY_USAGE_STORE_IF_NONONE" value="1024"> + </constant> + <constant name="PROPERTY_USAGE_NO_INSTANCE_STATE" value="2048"> + </constant> + <constant name="PROPERTY_USAGE_RESTART_IF_CHANGED" value="4096"> + </constant> <constant name="PROPERTY_USAGE_DEFAULT" value="7"> Default usage (storage and editor). </constant> + <constant name="PROPERTY_USAGE_DEFAULT_INTL" value="71"> + </constant> + <constant name="PROPERTY_USAGE_NOEDITOR" value="5"> + </constant> <constant name="METHOD_FLAG_NORMAL" value="1"> </constant> <constant name="METHOD_FLAG_EDITOR" value="2"> @@ -9015,7 +9039,7 @@ </argument> <description> Change the anchor (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) type for a margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Changing the anchor mode converts the current margin offset from the previous anchor mode to the new one, so margin offsets ([method set_margin]) must be done after setting anchors, or at the same time ([method set_anchor_and_margin]) - + Additionally, [code]keep_margin[/code] controls whether margins should be left the same, or changed to keep the same position and size on-screen. </description> </method> @@ -9404,6 +9428,96 @@ <description> </description> </method> + <method name="has_icon_override" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <description> + </description> + </method> + <method name="has_stylebox_override" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <description> + </description> + </method> + <method name="has_font_override" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <description> + </description> + </method> + <method name="has_color_override" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <description> + </description> + </method> + <method name="has_constant_override" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <description> + </description> + </method> + <method name="has_icon" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <argument index="1" name="type" type="String" default=""""> + </argument> + <description> + </description> + </method> + <method name="has_stylebox" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <argument index="1" name="type" type="String" default=""""> + </argument> + <description> + </description> + </method> + <method name="has_font" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <argument index="1" name="type" type="String" default=""""> + </argument> + <description> + </description> + </method> + <method name="has_color" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <argument index="1" name="type" type="String" default=""""> + </argument> + <description> + </description> + </method> + <method name="has_constant" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <argument index="1" name="type" type="String" default=""""> + </argument> + <description> + </description> + </method> <method name="get_parent_control" qualifiers="const"> <return type="Control"> </return> @@ -9523,6 +9637,10 @@ <description> </description> </method> + <method name="minimum_size_changed"> + <description> + </description> + </method> </methods> <signals> <signal name="focus_enter"> @@ -10312,7 +10430,7 @@ This approximation makes straight segments between each point, then subdivides t <return type="Array"> </return> <description> - Return the list of keys in the dictionary. + Return the list of keys in the [Dictionary]. </description> </method> <method name="parse_json"> @@ -10338,6 +10456,13 @@ This approximation makes straight segments between each point, then subdivides t Return the dictionary as json text. </description> </method> + <method name="values"> + <return type="Array"> + </return> + <description> + Return the list of values in the [Dictionary]. + </description> + </method> </methods> <constants> </constants> @@ -10671,14 +10796,14 @@ This approximation makes straight segments between each point, then subdivides t This function is called for each file exported and depending from the return value one of many things might happen. - + 1) If returned value is null, the file is exported as is. - + 2) If the returned value is a RawAray (array of bytes), the content of that array becomes the new file being exported. - + 3) If the file must also change it's name when exported, then a [Dictionary] must be returned with two fields: 'name' with the new filename and 'data' @@ -10848,8 +10973,8 @@ This approximation makes straight segments between each point, then subdivides t </brief_description> <description> Import plugins make it easy to handle importing of external assets - into a project. - + into a project. + They way they work is not that obvious though, so please make sure to read the documentation, tutorials and examples. </description> @@ -10872,7 +10997,7 @@ This approximation makes straight segments between each point, then subdivides t when exported. The only exception is in some cases when the file must be re-imported for different platforms (ie. texture compression). - + If you want to customize the export process, it's recommended to use [EditorExportPlugin.custom_export] instead. @@ -10884,7 +11009,7 @@ This approximation makes straight segments between each point, then subdivides t <description> Get the name of the import plugin, which will be used to identify content imported by this plugin. - + Try to use lowecase and underscores if possible. </description> </method> @@ -10909,23 +11034,23 @@ This approximation makes straight segments between each point, then subdivides t (from the dialog) or re-import (manual or automatic when external source files changed). - + An import process generally works like this: - + 1) Check the metadata for source files and options. Metadata is either generated in the import dialog or taken from an existing resource upon reimport. - + 2) Perform the import process into a new resource. Some times the resource being re-imported may be already loaded and in use, so checking for this by using [ResourceLoader.has] is recommended. Otherwise create a new resource. - + 3) Set the metadata from the argument into the existing or new resource being created using [Resource.set_import_metadata]. - + 4) Save the resource into 'path' (function argument) </description> </method> @@ -10938,12 +11063,12 @@ This approximation makes straight segments between each point, then subdivides t when the user chooses to re-import the resource (from filesystem). In the later case, the path for the existing file is supplied in the argument. - + If the path is supplied, it is recommended to read the import metadata with [ResourceLoader.load_import_metadata] and fill in the fields with the values contained there. - + The dialog can be shown in any way (just use a ConfirmationDialog and pop it up). Upon confirmation, fill up a ResourceImportMetadata and @@ -11000,8 +11125,8 @@ This approximation makes straight segments between each point, then subdivides t This method is called when the editor is about to save the project, switch to another tab, etc. It asks the plugin to apply any pending state changes - to ensure consistency. - + to ensure consistency. + This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object. @@ -11045,7 +11170,7 @@ This approximation makes straight segments between each point, then subdivides t object type derived from CanvasItem to capture the input in the 2D editor viewport. The function is only being called if your object is being edited. - + Return true if you want to capture the input, otherwise false. </description> @@ -11062,11 +11187,11 @@ This approximation makes straight segments between each point, then subdivides t given objet type derived from Spatial to capture the input of the viewport. The function is only being called if your object is being edited. - + By using the [InputEvent] and the [Camera] arguments it's pretty easy to do raycasts into space using Camera functions. - + Return true if you want to capture the input, otherwise false. </description> @@ -11128,7 +11253,7 @@ This approximation makes straight segments between each point, then subdivides t This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type. - + Remember that you have to manage the visibility of all your editor controls manually. </description> @@ -11149,11 +11274,11 @@ This approximation makes straight segments between each point, then subdivides t Add a custom control to a container (see CONTAINER_* enum). There are many locations where custom controls can be added in the editor UI. - + Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it). - + If your plugin is being removed, also make sure to remove your custom controls too. </description> @@ -11166,7 +11291,7 @@ This approximation makes straight segments between each point, then subdivides t <description> Add a control to the bottom panel (together with Output, Debug, Animation, etc). - + If your plugin is being removed, also make sure to remove your control by calling [method remove_control_from_bottom_panel]. @@ -11179,12 +11304,12 @@ This approximation makes straight segments between each point, then subdivides t </argument> <description> Add the control to a specific dock slot (see DOCK_* - enum for options). - + enum for options). + If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions. - + If your plugin is being removed, also make sure to remove your control by calling [method remove_control_from_docks]. @@ -11221,16 +11346,16 @@ This approximation makes straight segments between each point, then subdivides t Add a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed. - + When given node or resource is selected, the base type will be instanced (ie, "Spatial", "Control", "Resource"), then the script will be loaded and set to this object. - + You can use the [EditorPlugin.handles] to check if your custom object is being edited by checking the - script or using 'extends' keyword. - + script or using 'extends' keyword. + During run-time, this will be a simple object with a script so this function does not need to be called then. @@ -11251,7 +11376,7 @@ This approximation makes straight segments between each point, then subdivides t Add an import plugin. These plugins manage importing external content (from outside the project) into formats the engine can understand. - + On exit, don't forget to remove the plugin by calling [method remove_import_plugin] </description> @@ -11367,7 +11492,7 @@ This approximation makes straight segments between each point, then subdivides t <description> This function is called upon import with the imported scene. - + Just do any changes desired to the scene and return it. If null is returned, import will fail and throw an error to the user. @@ -11457,14 +11582,14 @@ This approximation makes straight segments between each point, then subdivides t <description> Object that holds the project-independent editor settings. These settings are generally visible in the Editor Settings menu. - + Accessing the settings is done by using the regular [Object] API, such as. - + settings.set(prop,value) - + settings.get(prop) - + list_of_settings = settings.get_property_list() </description> <methods> @@ -11481,9 +11606,9 @@ This approximation makes straight segments between each point, then subdivides t <description> Get the global settings path for the engine. Inside this path you can find some standard paths such as: - + settings/tmp - used for temporary storage of files - + settings/templates - where export templates are located </description> @@ -11559,7 +11684,7 @@ This approximation makes straight segments between each point, then subdivides t <description> Commit a handle being edited (handles must have been prevously added by [method add_handles]). - + If the cancel parameter is true, an option to restore the edited value to the original is provided. @@ -11573,7 +11698,7 @@ This approximation makes straight segments between each point, then subdivides t <description> Get the name of an edited handle (handles must have been previously added by [method add_handles]). - + Handles can be named for reference to the user when editing. </description> </method> @@ -11605,8 +11730,8 @@ This approximation makes straight segments between each point, then subdivides t <description> This function is used when the user drags a gizmo handle (previously added with [method add_handles]) - in screen coordinates. - + in screen coordinates. + The [Camera] is also provided so screen coordinates can be converted to raycasts. </description> @@ -11622,7 +11747,7 @@ This approximation makes straight segments between each point, then subdivides t Add lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. - + Call this function during [method redraw]. </description> </method> @@ -11636,7 +11761,7 @@ This approximation makes straight segments between each point, then subdivides t <description> Add a mesh to the gizmo, this is used for visualization. - + Call this function during [method redraw]. </description> </method> @@ -11653,7 +11778,7 @@ This approximation makes straight segments between each point, then subdivides t Add collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. - + Call this function during [method redraw]. </description> </method> @@ -11664,7 +11789,7 @@ This approximation makes straight segments between each point, then subdivides t </argument> <description> Add an unscaled billboard for visualization. - + Call this function during [method redraw]. </description> </method> @@ -11678,10 +11803,10 @@ This approximation makes straight segments between each point, then subdivides t <description> Add a list of handles (points) which can be used to deform the object being edited. - + There are virtual functions which will be called upon editing of these handles. - + Call this function during [method redraw]. </description> </method> @@ -11691,7 +11816,7 @@ This approximation makes straight segments between each point, then subdivides t <description> Call this function once and upon creation of the gizmo, otherwise no other function will work. - + The argument is the node being edited by the gizmo. </description> </method> @@ -14449,7 +14574,7 @@ This approximation makes straight segments between each point, then subdivides t Hyper-text transfer protocol client. </brief_description> <description> - Hyper-text transfer protocol client. Supports SSL and SSL server certificate verification. + Hyper-text transfer protocol client. Supports SSL and SSL server certificate verification. Can be reused to connect to different hosts and make many requests. </description> <methods> @@ -14792,7 +14917,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) A Node with the ability to send HTTP requests. </brief_description> <description> - A Node with the ability to send HTTP requests. Uses a [HTTPClient] internally, supports HTTPS. + A Node with the ability to send HTTP requests. Uses a [HTTPClient] internally, supports HTTPS. Can be used to make HTTP requests or download files via HTTP. </description> <methods> @@ -15112,6 +15237,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="2" name="dest" type="Vector2" default="0"> </argument> <description> + Copy a "src_rect" [Rect2] from "src" [Image] to this [Image] on coordinates "dest". </description> </method> <method name="brush_transfer"> @@ -15122,6 +15248,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="2" name="pos" type="Vector2" default="0"> </argument> <description> + Transfer data from "src" to this [Image] using a "brush" as a mask/brush on coordinates "pos". </description> </method> <method name="brushed"> @@ -15134,6 +15261,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="2" name="pos" type="Vector2" default="0"> </argument> <description> + Return a new [Image] from this [Image] that is created by brushhing see [method brush_transfer]. </description> </method> <method name="compressed"> @@ -15142,6 +15270,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="0" name="format" type="int" default="0"> </argument> <description> + Return a new compressed [Image] from this [Image] using one of [Image].COMPRESS_*. </description> </method> <method name="converted"> @@ -15150,18 +15279,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="0" name="format" type="int" default="0"> </argument> <description> + Return a new [Image] from this [Image] with a different format. </description> </method> <method name="decompressed"> <return type="Image"> </return> <description> + Return a new decompressed [Image]. </description> </method> <method name="empty"> <return type="bool"> </return> <description> + Return whether this [Image] is empty(no data). </description> </method> <method name="fix_alpha_edges"> @@ -15172,18 +15304,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <return type="RawArray"> </return> <description> + Return the raw data of the [Image]. </description> </method> <method name="get_format"> <return type="int"> </return> <description> + Return the format of the [Image], one of [Image].FORMAT_*. </description> </method> <method name="get_height"> <return type="int"> </return> <description> + Return the height of the [Image]. </description> </method> <method name="get_pixel"> @@ -15196,6 +15331,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="2" name="mipmap_level" type="int" default="0"> </argument> <description> + Return the color of the pixel in the [Image] on coordinates "x,y" on mipmap level "mipmap_level". </description> </method> <method name="get_rect"> @@ -15204,18 +15340,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="0" name="area" type="Rect2" default="0"> </argument> <description> + Return a new [Image] that is a copy of "area" in this [Image]. </description> </method> <method name="get_used_rect"> <return type="Rect2"> </return> <description> + Return the area of this [Image] that is used/visibly colored/opaque. </description> </method> <method name="get_width"> <return type="int"> </return> <description> + Return the width of the [Image]. </description> </method> <method name="load"> @@ -15224,6 +15363,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="0" name="path" type="String" default="0"> </argument> <description> + Load an [Image]. </description> </method> <method name="put_pixel"> @@ -15236,6 +15376,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="3" name="mipmap_level" type="int" default="0"> </argument> <description> + Put a pixel of "color" on coordinates "x,y" on mipmap level "mipmap_level". </description> </method> <method name="resized"> @@ -15248,6 +15389,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="2" name="interpolation" type="int" default="1"> </argument> <description> + Return a new [Image] from this [Image] that is resized to size "x,y" using [Image].INTERPOLATE_*. </description> </method> <method name="save_png"> @@ -15256,6 +15398,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="0" name="path" type="String" default="0"> </argument> <description> + Save this [Image] as a png. </description> </method> <method name="Image"> @@ -15329,12 +15472,20 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) </constant> <constant name="FORMAT_CUSTOM" value="22"> </constant> + <constant name="INTERPOLATE_NEAREST" value="0"> + </constant> + <constant name="INTERPOLATE_BILINEAR" value="1"> + </constant> + <constant name="INTERPOLATE_CUBIC" value="2"> + </constant> </constants> </class> <class name="ImageTexture" inherits="Texture" category="Core"> <brief_description> + A [Texture] based on an [Image]. </brief_description> <description> + A [Texture] based on an [Image]. Can be created from an [Image]. </description> <methods> <method name="create"> @@ -15347,6 +15498,9 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="3" name="flags" type="int" default="7"> </argument> <description> + Create a new [ImageTexture] with "width" and "height". + "format" one of [Image].FORMAT_*. + "flags" one or more of [Texture].FLAG_*. </description> </method> <method name="create_from_image"> @@ -15355,54 +15509,63 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="1" name="flags" type="int" default="7"> </argument> <description> + Create a new [ImageTexture] from an [Image] with "flags" from [Texture].FLAG_*. </description> </method> <method name="get_format" qualifiers="const"> <return type="int"> </return> <description> + Return the format of the [ImageTexture], one of [Image].FORMAT_*. </description> </method> <method name="load"> <argument index="0" name="path" type="String"> </argument> <description> + Load an [ImageTexure]. </description> </method> <method name="set_data"> <argument index="0" name="image" type="Image"> </argument> <description> + Set the [Image] of this [ImageTexture]. </description> </method> <method name="get_data" qualifiers="const"> <return type="Image"> </return> <description> + Return the [Image] of this [ImageTexture]. </description> </method> <method name="set_storage"> <argument index="0" name="mode" type="int"> </argument> <description> + Set the storage type. One of [ImageTexture].STORAGE_*. </description> </method> <method name="get_storage" qualifiers="const"> <return type="int"> </return> <description> + Return the storage type. One of [ImageTexture].STORAGE_*. </description> </method> <method name="set_lossy_storage_quality"> <argument index="0" name="quality" type="float"> </argument> <description> + Set the storage quality in case of [ImageTexture].STORAGE_COMPRESS_LOSSY. </description> </method> <method name="get_lossy_storage_quality" qualifiers="const"> <return type="float"> </return> <description> + Return the storage quality for [ImageTexture].STORAGE_COMPRESS_LOSSY. </description> </method> <method name="fix_alpha_edges"> @@ -15430,10 +15593,13 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) </methods> <constants> <constant name="STORAGE_RAW" value="0"> + [Image] data is stored raw and unaltered. </constant> <constant name="STORAGE_COMPRESS_LOSSY" value="1"> + [Image] data is compressed with a lossy algorithm. You can set the storage quality with [method set_lossy_storage_quality]. </constant> <constant name="STORAGE_COMPRESS_LOSSLESS" value="2"> + [Image] data is compressed with a lossless algorithm. </constant> </constants> </class> @@ -17854,8 +18020,11 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) </class> <class name="LargeTexture" inherits="Texture" category="Core"> <brief_description> + A Texture capable of storing many smaller Textures with offsets. </brief_description> <description> + A Texture capable of storing many smaller Textures with offsets. + You can dynamically add pieces(Textures) to this fLargeTexture] using different offsets. </description> <methods> <method name="add_piece"> @@ -17866,6 +18035,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="1" name="texture" type="Texture"> </argument> <description> + Add another [Texture] to this [LargeTexture], starting on offset "ofs". </description> </method> <method name="set_piece_offset"> @@ -17874,6 +18044,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="1" name="ofs" type="Vector2"> </argument> <description> + Set the offset of the piece with index "idx" to "ofs". </description> </method> <method name="set_piece_texture"> @@ -17882,22 +18053,26 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="1" name="texture" type="Texture"> </argument> <description> + Set the [Texture] of the piece with index "idx" to "ofs". </description> </method> <method name="set_size"> <argument index="0" name="size" type="Vector2"> </argument> <description> + Set the size of this [LargeTexture]. </description> </method> <method name="clear"> <description> + Clear the [LargeTexture]. </description> </method> <method name="get_piece_count" qualifiers="const"> <return type="int"> </return> <description> + Return the number of pieces currently in this [LargeTexture]. </description> </method> <method name="get_piece_offset" qualifiers="const"> @@ -17906,6 +18081,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="0" name="idx" type="int"> </argument> <description> + Return the offset of the piece with index "idx". </description> </method> <method name="get_piece_texture" qualifiers="const"> @@ -17914,6 +18090,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <argument index="0" name="idx" type="int"> </argument> <description> + Return the [Texture] of the piece with index "idx". </description> </method> </methods> @@ -18665,6 +18842,36 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) </theme_item> </theme_items> </class> +<class name="Listener" inherits="Spatial" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="make_current"> + <description> + </description> + </method> + <method name="clear_current"> + <description> + </description> + </method> + <method name="is_current" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="get_listener_transform" qualifiers="const"> + <return type="Transform"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="MainLoop" inherits="Object" category="Core"> <brief_description> Main loop is the abstract main loop base class. @@ -22289,6 +22496,18 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <description> </description> </method> + <method name="set_use_vsync"> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_vsnc_enabled" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> </methods> <constants> <constant name="DAY_SUNDAY" value="0"> @@ -24232,6 +24451,18 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <description> </description> </method> + <method name="set_region_rect"> + <argument index="0" name="rect" type="Rect2"> + </argument> + <description> + </description> + </method> + <method name="get_region_rect" qualifiers="const"> + <return type="Rect2"> + </return> + <description> + </description> + </method> <method name="set_draw_center"> <argument index="0" name="draw_center" type="bool"> </argument> @@ -36645,6 +36876,14 @@ This method controls whether the position between two cached points is interpola <description> </description> </method> + <method name="erase"> + <argument index="0" name="pos" type="int"> + </argument> + <argument index="1" name="chars" type="int"> + </argument> + <description> + </description> + </method> <method name="extension"> <return type="String"> </return> @@ -37366,6 +37605,18 @@ This method controls whether the position between two cached points is interpola <description> </description> </method> + <method name="set_region_rect"> + <argument index="0" name="region" type="Rect2"> + </argument> + <description> + </description> + </method> + <method name="get_region_rect" qualifiers="const"> + <return type="Rect2"> + </return> + <description> + </description> + </method> <method name="set_draw_center"> <argument index="0" name="enable" type="bool"> </argument> @@ -41413,7 +41664,7 @@ This method controls whether the position between two cached points is interpola <description> Helper to maange UndoRedo in the editor or custom tools. It works by storing calls to functions in both 'do' an 'undo' lists. - + Common behavior is to create an action, then add do/undo calls to functions or property changes, then commiting the action. </description> @@ -41537,8 +41788,8 @@ This method controls whether the position between two cached points is interpola <description> Get the version, each time a new action is commited, the version number of the UndoRedo is increased - automatically. - + automatically. + This is useful mostly to check if something changed from a saved version. </description> @@ -41698,6 +41949,12 @@ This method controls whether the position between two cached points is interpola 2-element structure that can be used to represent positions in 2d-space, or any other pair of numeric values. </description> <methods> + <method name="abs"> + <return type="Vector2"> + </return> + <description> + </description> + </method> <method name="angle"> <return type="float"> </return> @@ -44544,11 +44801,13 @@ This method controls whether the position between two cached points is interpola </argument> <argument index="1" name="arg1" type="Rect2"> </argument> - <argument index="2" name="arg2" type="RID"> + <argument index="2" name="arg2" type="Rect2"> </argument> - <argument index="3" name="arg3" type="RealArray"> + <argument index="3" name="arg3" type="RID"> </argument> - <argument index="4" name="arg4" type="Color" default="Color(1,1,1,1)"> + <argument index="4" name="arg4" type="RealArray"> + </argument> + <argument index="5" name="arg5" type="Color" default="Color(1,1,1,1)"> </argument> <description> </description> diff --git a/drivers/etc1/SCsub b/drivers/etc1/SCsub index 4ce921ad9f..2b9dc1b31c 100644 --- a/drivers/etc1/SCsub +++ b/drivers/etc1/SCsub @@ -3,7 +3,8 @@ Import('env') etc_sources = [ "etc1/image_etc.cpp", - "etc1/rg_etc1.cpp" + "etc1/rg_etc1.cpp", + "etc1/texture_loader_pkm.cpp" ] if (env["etc1"] != "no"): diff --git a/drivers/etc1/texture_loader_pkm.cpp b/drivers/etc1/texture_loader_pkm.cpp new file mode 100644 index 0000000000..275afc1fd6 --- /dev/null +++ b/drivers/etc1/texture_loader_pkm.cpp @@ -0,0 +1,84 @@ +#include "texture_loader_pkm.h" +#include "os/file_access.h" +#include <string.h> + +struct ETC1Header { + char tag[6]; // "PKM 10" + uint16_t format; // Format == number of mips (== zero) + uint16_t texWidth; // Texture dimensions, multiple of 4 (big-endian) + uint16_t texHeight; + uint16_t origWidth; // Original dimensions (big-endian) + uint16_t origHeight; +}; + +RES ResourceFormatPKM::load(const String &p_path, const String& p_original_path, Error *r_error) { + + if (r_error) + *r_error=ERR_CANT_OPEN; + + Error err; + FileAccess *f = FileAccess::open(p_path,FileAccess::READ,&err); + if (!f) + return RES(); + + FileAccessRef fref(f); + if (r_error) + *r_error=ERR_FILE_CORRUPT; + + ERR_EXPLAIN("Unable to open PKM texture file: "+p_path); + ERR_FAIL_COND_V(err!=OK,RES()); + + // big endian + f->set_endian_swap(true); + + ETC1Header h; + ERR_EXPLAIN("Invalid or Unsupported PKM texture file: "+p_path); + f->get_buffer((uint8_t *) &h.tag, sizeof(h.tag)); + if(strncmp(h.tag, "PKM 10", sizeof(h.tag))) + ERR_FAIL_V(RES()); + + h.format = f->get_16(); + h.texWidth = f->get_16(); + h.texHeight = f->get_16(); + h.origWidth = f->get_16(); + h.origHeight = f->get_16(); + + DVector<uint8_t> src_data; + + uint32_t size = h.texWidth * h.texHeight / 2; + src_data.resize(size); + DVector<uint8_t>::Write wb = src_data.write(); + f->get_buffer(wb.ptr(),size); + wb=DVector<uint8_t>::Write(); + + int mipmaps = h.format; + int width = h.origWidth; + int height = h.origHeight; + + Image img(width,height,mipmaps,Image::FORMAT_ETC,src_data); + + Ref<ImageTexture> texture = memnew( ImageTexture ); + texture->create_from_image(img); + + if (r_error) + *r_error=OK; + + return texture; +} + +void ResourceFormatPKM::get_recognized_extensions(List<String> *p_extensions) const { + + p_extensions->push_back("pkm"); +} + +bool ResourceFormatPKM::handles_type(const String& p_type) const { + + return ObjectTypeDB::is_type(p_type,"Texture"); +} + +String ResourceFormatPKM::get_resource_type(const String &p_path) const { + + if (p_path.extension().to_lower()=="pkm") + return "ImageTexture"; + return ""; +} diff --git a/drivers/etc1/texture_loader_pkm.h b/drivers/etc1/texture_loader_pkm.h new file mode 100644 index 0000000000..5788716d9f --- /dev/null +++ b/drivers/etc1/texture_loader_pkm.h @@ -0,0 +1,18 @@ +#ifndef TEXTURE_LOADER_PKM_H +#define TEXTURE_LOADER_PKM_H + +#include "scene/resources/texture.h" +#include "io/resource_loader.h" + +class ResourceFormatPKM : public ResourceFormatLoader{ +public: + + virtual RES load(const String &p_path,const String& p_original_path="",Error *r_error=NULL); + virtual void get_recognized_extensions(List<String> *p_extensions) const; + virtual bool handles_type(const String& p_type) const; + virtual String get_resource_type(const String &p_path) const; + + virtual ~ResourceFormatPKM() {} +}; + +#endif // TEXTURE_LOADER_PKM_H diff --git a/drivers/gl_context/context_gl.h b/drivers/gl_context/context_gl.h index 1ea3662ada..fd3bbee5de 100644 --- a/drivers/gl_context/context_gl.h +++ b/drivers/gl_context/context_gl.h @@ -52,7 +52,11 @@ public: virtual void swap_buffers()=0; virtual Error initialize()=0; - + + virtual void set_use_vsync(bool p_use)=0; + virtual bool is_using_vsync() const=0; + + ContextGL(); diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index 79465638d1..8bd2fe3862 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -6497,7 +6497,7 @@ void RasterizerGLES2::_render_list_forward(RenderList *p_render_list,const Trans if (!*e->additive_ptr) { additive=false; - *e->additive_ptr=true; + *e->additive_ptr=true; } else { additive=true; } @@ -6684,7 +6684,7 @@ void RasterizerGLES2::_render_list_forward(RenderList *p_render_list,const Trans } rebind=true; } - + if (use_hw_skeleton_xform && (skeleton!=prev_skeleton||morph_values!=prev_morph_values)) { if (!prev_skeleton || !skeleton) rebind=true; //went from skeleton <-> no skeleton, needs rebind @@ -6718,7 +6718,7 @@ void RasterizerGLES2::_render_list_forward(RenderList *p_render_list,const Trans DEBUG_TEST_ERROR("Setup geometry"); }; - if (i==0 || light!=prev_light || rebind) { + if (i==0 || light!=prev_light || rebind) { if (e->light!=0xFFFF) { _setup_light(e->light); @@ -6958,7 +6958,7 @@ void RasterizerGLES2::_process_glow_bloom() { _copy_screen_quad(); copy_shader.set_conditional(CopyShaderGLES2::USE_GLOW_COPY,false); - copy_shader.set_conditional(CopyShaderGLES2::USE_HDR,false); + copy_shader.set_conditional(CopyShaderGLES2::USE_HDR,false); int passes = current_env->fx_param[VS::ENV_FX_PARAM_GLOW_BLUR_PASSES]; Vector2 psize(1.0/framebuffer.blur_size,1.0/framebuffer.blur_size); float pscale = current_env->fx_param[VS::ENV_FX_PARAM_GLOW_BLUR_SCALE]; @@ -7427,7 +7427,7 @@ void RasterizerGLES2::end_scene() { _process_hdr(); } if (current_env && current_env->fx_enabled[VS::ENV_FX_GLOW]) { - _process_glow_bloom(); + _process_glow_bloom(); int glow_transfer_mode=current_env->fx_param[VS::ENV_FX_PARAM_GLOW_BLUR_BLEND_MODE]; if (glow_transfer_mode==1) copy_shader.set_conditional(CopyShaderGLES2::USE_GLOW_SCREEN,true); @@ -8438,7 +8438,7 @@ void RasterizerGLES2::canvas_draw_rect(const Rect2& p_rect, int p_flags, const R } -void RasterizerGLES2::canvas_draw_style_box(const Rect2& p_rect, RID p_texture,const float *p_margin, bool p_draw_center,const Color& p_modulate) { +void RasterizerGLES2::canvas_draw_style_box(const Rect2& p_rect, const Rect2& p_src_region, RID p_texture,const float *p_margin, bool p_draw_center,const Color& p_modulate) { Color m = p_modulate; m.a*=canvas_opacity; @@ -8446,52 +8446,57 @@ void RasterizerGLES2::canvas_draw_style_box(const Rect2& p_rect, RID p_texture,c Texture* texture=_bind_canvas_texture(p_texture); ERR_FAIL_COND(!texture); - /* CORNERS */ + Rect2 region = p_src_region; + if (region.size.width <= 0 ) + region.size.width = texture->width; + if (region.size.height <= 0) + region.size.height = texture->height; + /* CORNERS */ _draw_textured_quad( // top left Rect2( p_rect.pos, Size2(p_margin[MARGIN_LEFT],p_margin[MARGIN_TOP])), - Rect2( Point2(), Size2(p_margin[MARGIN_LEFT],p_margin[MARGIN_TOP])), + Rect2( region.pos, Size2(p_margin[MARGIN_LEFT],p_margin[MARGIN_TOP])), Size2( texture->width, texture->height ) ); _draw_textured_quad( // top right Rect2( Point2( p_rect.pos.x + p_rect.size.width - p_margin[MARGIN_RIGHT], p_rect.pos.y), Size2(p_margin[MARGIN_RIGHT],p_margin[MARGIN_TOP])), - Rect2( Point2(texture->width-p_margin[MARGIN_RIGHT],0), Size2(p_margin[MARGIN_RIGHT],p_margin[MARGIN_TOP])), + Rect2( Point2(region.pos.x+region.size.width-p_margin[MARGIN_RIGHT], region.pos.y), Size2(p_margin[MARGIN_RIGHT],p_margin[MARGIN_TOP])), Size2( texture->width, texture->height ) ); _draw_textured_quad( // bottom left Rect2( Point2(p_rect.pos.x,p_rect.pos.y + p_rect.size.height - p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_LEFT],p_margin[MARGIN_BOTTOM])), - Rect2( Point2(0,texture->height-p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_LEFT],p_margin[MARGIN_BOTTOM])), + Rect2( Point2(region.pos.x, region.pos.y+region.size.height-p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_LEFT],p_margin[MARGIN_BOTTOM])), Size2( texture->width, texture->height ) ); _draw_textured_quad( // bottom right Rect2( Point2( p_rect.pos.x + p_rect.size.width - p_margin[MARGIN_RIGHT], p_rect.pos.y + p_rect.size.height - p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_RIGHT],p_margin[MARGIN_BOTTOM])), - Rect2( Point2(texture->width-p_margin[MARGIN_RIGHT],texture->height-p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_RIGHT],p_margin[MARGIN_BOTTOM])), + Rect2( Point2(region.pos.x+region.size.width-p_margin[MARGIN_RIGHT], region.pos.y+region.size.height-p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_RIGHT],p_margin[MARGIN_BOTTOM])), Size2( texture->width, texture->height ) ); Rect2 rect_center( p_rect.pos+Point2( p_margin[MARGIN_LEFT], p_margin[MARGIN_TOP]), Size2( p_rect.size.width - p_margin[MARGIN_LEFT] - p_margin[MARGIN_RIGHT], p_rect.size.height - p_margin[MARGIN_TOP] - p_margin[MARGIN_BOTTOM] )); - Rect2 src_center( Point2( p_margin[MARGIN_LEFT], p_margin[MARGIN_TOP]), Size2( texture->width - p_margin[MARGIN_LEFT] - p_margin[MARGIN_RIGHT], texture->height - p_margin[MARGIN_TOP] - p_margin[MARGIN_BOTTOM] )); + Rect2 src_center( Point2(region.pos.x+p_margin[MARGIN_LEFT], region.pos.y+p_margin[MARGIN_TOP]), Size2(region.size.width - p_margin[MARGIN_LEFT] - p_margin[MARGIN_RIGHT], region.size.height - p_margin[MARGIN_TOP] - p_margin[MARGIN_BOTTOM] )); _draw_textured_quad( // top Rect2( Point2(rect_center.pos.x,p_rect.pos.y),Size2(rect_center.size.width,p_margin[MARGIN_TOP])), - Rect2( Point2(p_margin[MARGIN_LEFT],0), Size2(src_center.size.width,p_margin[MARGIN_TOP])), + Rect2( Point2(src_center.pos.x,region.pos.y), Size2(src_center.size.width,p_margin[MARGIN_TOP])), Size2( texture->width, texture->height ) ); _draw_textured_quad( // bottom Rect2( Point2(rect_center.pos.x,rect_center.pos.y+rect_center.size.height),Size2(rect_center.size.width,p_margin[MARGIN_BOTTOM])), - Rect2( Point2(p_margin[MARGIN_LEFT],src_center.pos.y+src_center.size.height), Size2(src_center.size.width,p_margin[MARGIN_BOTTOM])), + Rect2( Point2(src_center.pos.x,src_center.pos.y+src_center.size.height), Size2(src_center.size.width,p_margin[MARGIN_BOTTOM])), Size2( texture->width, texture->height ) ); _draw_textured_quad( // left Rect2( Point2(p_rect.pos.x,rect_center.pos.y),Size2(p_margin[MARGIN_LEFT],rect_center.size.height)), - Rect2( Point2(0,p_margin[MARGIN_TOP]), Size2(p_margin[MARGIN_LEFT],src_center.size.height)), + Rect2( Point2(region.pos.x,region.pos.y+p_margin[MARGIN_TOP]), Size2(p_margin[MARGIN_LEFT],src_center.size.height)), Size2( texture->width, texture->height ) ); _draw_textured_quad( // right Rect2( Point2(rect_center.pos.x+rect_center.size.width,rect_center.pos.y),Size2(p_margin[MARGIN_RIGHT],rect_center.size.height)), - Rect2( Point2(src_center.pos.x+src_center.size.width,p_margin[MARGIN_TOP]), Size2(p_margin[MARGIN_RIGHT],src_center.size.height)), + Rect2( Point2(src_center.pos.x+src_center.size.width,region.pos.y+p_margin[MARGIN_TOP]), Size2(p_margin[MARGIN_RIGHT],src_center.size.height)), Size2( texture->width, texture->height ) ); if (p_draw_center) { @@ -8569,7 +8574,7 @@ void RasterizerGLES2::canvas_draw_polygon(int p_vertex_count, const int* p_indic #else //WebGL specific impl. - glBindBuffer(GL_ARRAY_BUFFER, gui_quad_buffer); + glBindBuffer(GL_ARRAY_BUFFER, gui_quad_buffer); float *b = GlobalVertexBuffer; int ofs = 0; if(p_vertex_count > MAX_POLYGON_VERTICES){ @@ -9184,7 +9189,7 @@ void RasterizerGLES2::_canvas_item_render_commands(CanvasItem *p_item,CanvasItem CanvasItem::CommandStyle* style = static_cast<CanvasItem::CommandStyle*>(c); if (use_normalmap) _canvas_normal_set_flip(Vector2(1,1)); - canvas_draw_style_box(style->rect,style->texture,style->margin,style->draw_center,style->color); + canvas_draw_style_box(style->rect,style->source,style->texture,style->margin,style->draw_center,style->color); } break; case CanvasItem::Command::TYPE_PRIMITIVE: { @@ -9430,7 +9435,7 @@ void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list,int p_z,const draw_viewport_func(ci->vp_render->owner,ci->vp_render->udata,ci->vp_render->rect); } memdelete(ci->vp_render); - ci->vp_render=NULL; + ci->vp_render=NULL; canvas_last_material=NULL; canvas_use_modulate=p_modulate!=Color(1,1,1,1); canvas_modulate=p_modulate; @@ -11424,7 +11429,7 @@ RasterizerGLES2::RasterizerGLES2(bool p_compress_arrays,bool p_keep_ram_copy,boo void RasterizerGLES2::restore_framebuffer() { glBindFramebuffer(GL_FRAMEBUFFER, base_framebuffer); - + } RasterizerGLES2::~RasterizerGLES2() { diff --git a/drivers/gles2/rasterizer_gles2.h b/drivers/gles2/rasterizer_gles2.h index 35efedc9c8..c9fc0c247d 100644 --- a/drivers/gles2/rasterizer_gles2.h +++ b/drivers/gles2/rasterizer_gles2.h @@ -1635,7 +1635,7 @@ public: virtual void canvas_end_rect(); virtual void canvas_draw_line(const Point2& p_from, const Point2& p_to,const Color& p_color,float p_width); virtual void canvas_draw_rect(const Rect2& p_rect, int p_flags, const Rect2& p_source,RID p_texture,const Color& p_modulate); - virtual void canvas_draw_style_box(const Rect2& p_rect, RID p_texture,const float *p_margins, bool p_draw_center=true,const Color& p_modulate=Color(1,1,1)); + virtual void canvas_draw_style_box(const Rect2& p_rect, const Rect2& p_src_region, RID p_texture,const float *p_margins, bool p_draw_center=true,const Color& p_modulate=Color(1,1,1)); virtual void canvas_draw_primitive(const Vector<Point2>& p_points, const Vector<Color>& p_colors,const Vector<Point2>& p_uvs, RID p_texture,float p_width); virtual void canvas_draw_polygon(int p_vertex_count, const int* p_indices, const Vector2* p_vertices, const Vector2* p_uvs, const Color* p_colors,const RID& p_texture,bool p_singlecolor); virtual void canvas_set_transform(const Matrix32& p_transform); diff --git a/drivers/ogg/COPYING b/drivers/ogg/COPYING new file mode 100644 index 0000000000..6111c6c5a6 --- /dev/null +++ b/drivers/ogg/COPYING @@ -0,0 +1,28 @@ +Copyright (c) 2002, Xiph.org Foundation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of the Xiph.org Foundation nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/drivers/opus/COPYING b/drivers/opus/COPYING new file mode 100644 index 0000000000..7b53d665df --- /dev/null +++ b/drivers/opus/COPYING @@ -0,0 +1,28 @@ +Copyright (c) 1994-2013 Xiph.Org Foundation and contributors + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of the Xiph.Org Foundation nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp index afa5f34bea..2f9767440e 100644 --- a/drivers/register_driver_types.cpp +++ b/drivers/register_driver_types.cpp @@ -16,6 +16,7 @@ #include "png/resource_saver_png.h" #include "jpegd/image_loader_jpegd.h" #include "dds/texture_loader_dds.h" +#include "etc1/texture_loader_pkm.h" #include "pvr/texture_loader_pvr.h" #include "etc1/image_etc.h" #include "chibi/event_stream_chibi.h" @@ -79,6 +80,10 @@ static ImageLoaderJPG *image_loader_jpg=NULL; static ResourceFormatDDS *resource_loader_dds=NULL; #endif +#ifdef ETC1_ENABLED +static ResourceFormatPKM *resource_loader_pkm=NULL; +#endif + #ifdef PVR_ENABLED static ResourceFormatPVR *resource_loader_pvr=NULL; @@ -199,6 +204,11 @@ void register_driver_types() { ResourceLoader::add_resource_format_loader(resource_loader_dds ); #endif +#ifdef ETC1_ENABLED + resource_loader_pkm = memnew( ResourceFormatPKM ); + ResourceLoader::add_resource_format_loader(resource_loader_pkm); +#endif + #ifdef PVR_ENABLED resource_loader_pvr = memnew( ResourceFormatPVR ); ResourceLoader::add_resource_format_loader(resource_loader_pvr ); @@ -283,6 +293,10 @@ void unregister_driver_types() { memdelete(resource_loader_dds); #endif +#ifdef ETC1_ENABLED + memdelete(resource_loader_pkm); +#endif + #ifdef PVR_ENABLED memdelete(resource_loader_pvr); #endif diff --git a/drivers/theora/COPYING b/drivers/theora/COPYING new file mode 100644 index 0000000000..c8ccce4ffb --- /dev/null +++ b/drivers/theora/COPYING @@ -0,0 +1,28 @@ +Copyright (C) 2002-2009 Xiph.org Foundation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of the Xiph.org Foundation nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/drivers/theora/LICENSE b/drivers/theora/LICENSE new file mode 100644 index 0000000000..5e5ec08469 --- /dev/null +++ b/drivers/theora/LICENSE @@ -0,0 +1,18 @@ +Please see the file COPYING for the copyright license for this software. + +In addition to and irrespective of the copyright license associated +with this software, On2 Technologies, Inc. makes the following statement +regarding technology used in this software: + + On2 represents and warrants that it shall not assert any rights + relating to infringement of On2's registered patents, nor initiate + any litigation asserting such rights, against any person who, or + entity which utilizes the On2 VP3 Codec Software, including any + use, distribution, and sale of said Software; which make changes, + modifications, and improvements in said Software; and to use, + distribute, and sell said changes as well as applications for other + fields of use. + +This reference implementation is originally derived from the On2 VP3 +Codec Software, and the Theora video format is essentially compatible +with the VP3 video format, consisting of a backward-compatible superset. diff --git a/drivers/vorbis/COPYING b/drivers/vorbis/COPYING new file mode 100644 index 0000000000..28de72a970 --- /dev/null +++ b/drivers/vorbis/COPYING @@ -0,0 +1,28 @@ +Copyright (c) 2002-2008 Xiph.org Foundation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of the Xiph.org Foundation nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/drivers/webp/AUTHORS b/drivers/webp/AUTHORS new file mode 100644 index 0000000000..70423cb4dd --- /dev/null +++ b/drivers/webp/AUTHORS @@ -0,0 +1,26 @@ +Contributors: +- Charles Munger (clm at google dot com) +- Christian Duvivier (cduvivier at google dot com) +- Djordje Pesut (djordje dot pesut at imgtec dot com) +- James Zern (jzern at google dot com) +- Jan Engelhardt (jengelh at medozas dot de) +- Johann (johann dot koenig at duck dot com) +- Jovan Zelincevic (jovan dot zelincevic at imgtec dot com) +- Jyrki Alakuijala (jyrki at google dot com) +- levytamar82 (tamar dot levy at intel dot com) +- Lou Quillio (louquillio at google dot com) +- Mans Rullgard (mans at mansr dot com) +- Martin Olsson (mnemo at minimum dot se) +- Mikołaj Zalewski (mikolajz at google dot com) +- Noel Chromium (noel at chromium dot org) +- Pascal Massimino (pascal dot massimino at gmail dot com) +- Paweł Hajdan, Jr (phajdan dot jr at chromium dot org) +- Pierre Joye (pierre dot php at gmail dot com) +- Sam Clegg (sbc at chromium dot org) +- Scott LaVarnway (slavarnway at google dot com) +- Scott Talbot (s at chikachow dot org) +- Slobodan Prijic (slobodan dot prijic at imgtec dot com) +- Somnath Banerjee (somnath dot banerjee at gmail dot com) +- Timothy Gu (timothygu99 at gmail dot com) +- Urvang Joshi (urvang at google dot com) +- Vikas Arora (vikasa at google dot com) diff --git a/drivers/webp/COPYING b/drivers/webp/COPYING new file mode 100644 index 0000000000..7a6f99547d --- /dev/null +++ b/drivers/webp/COPYING @@ -0,0 +1,30 @@ +Copyright (c) 2010, Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + * Neither the name of Google nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/drivers/webp/PATENTS b/drivers/webp/PATENTS new file mode 100644 index 0000000000..caedf607e9 --- /dev/null +++ b/drivers/webp/PATENTS @@ -0,0 +1,23 @@ +Additional IP Rights Grant (Patents) +------------------------------------ + +"These implementations" means the copyrightable works that implement the WebM +codecs distributed by Google as part of the WebM Project. + +Google hereby grants to you a perpetual, worldwide, non-exclusive, no-charge, +royalty-free, irrevocable (except as stated in this section) patent license to +make, have made, use, offer to sell, sell, import, transfer, and otherwise +run, modify and propagate the contents of these implementations of WebM, where +such license applies only to those patent claims, both currently owned by +Google and acquired in the future, licensable by Google that are necessarily +infringed by these implementations of WebM. This grant does not include claims +that would be infringed only as a consequence of further modification of these +implementations. If you or your agent or exclusive licensee institute or order +or agree to the institution of patent litigation or any other patent +enforcement activity against any entity (including a cross-claim or +counterclaim in a lawsuit) alleging that any of these implementations of WebM +or any code incorporated within any of these implementations of WebM +constitute direct or contributory patent infringement, or inducement of +patent infringement, then any patent rights granted to you under this License +for these implementations of WebM shall terminate as of the date such +litigation is filed. diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp index b9476b870b..913ba1eb2b 100644 --- a/drivers/windows/dir_access_windows.cpp +++ b/drivers/windows/dir_access_windows.cpp @@ -69,7 +69,7 @@ bool DirAccessWindows::list_dir_begin() { _cisdir=false; _cishidden=false; - + list_dir_end(); p->h = FindFirstFileExW((current_dir+"\\*").c_str(), FindExInfoStandard, &p->fu, FindExSearchNameMatch, NULL, 0); @@ -83,7 +83,7 @@ String DirAccessWindows::get_next() { if (p->h==INVALID_HANDLE_VALUE) return ""; - + _cisdir=(p->fu.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); _cishidden=(p->fu.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN); @@ -192,7 +192,7 @@ Error DirAccessWindows::make_dir(String p_dir) { #else p_dir=fix_path(p_dir); - + //p_dir.replace("/","\\"); bool success; @@ -249,7 +249,7 @@ bool DirAccessWindows::file_exists(String p_file) { p_file=get_current_dir().plus_file(p_file); p_file=fix_path(p_file); - + //p_file.replace("/","\\"); //WIN32_FILE_ATTRIBUTE_DATA fileInfo; @@ -359,8 +359,12 @@ FileType DirAccessWindows::get_file_type(const String& p_file) const { */ size_t DirAccessWindows::get_space_left() { - return -1; -}; + uint64_t bytes = 0; + GetDiskFreeSpaceEx(NULL,(PULARGE_INTEGER)&bytes,NULL,NULL); + + //this is either 0 or a value in bytes. + return (size_t)bytes; +} DirAccessWindows::DirAccessWindows() { diff --git a/main/main.cpp b/main/main.cpp index 2e30ed298a..6cddea823a 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -109,6 +109,7 @@ static String locale; static bool use_debug_profiler=false; static bool force_lowdpi=false; static int init_screen=-1; +static bool use_vsync=true; static String unescape_cmdline(const String& p_str) { @@ -726,6 +727,7 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas GLOBAL_DEF("display/fullscreen",video_mode.fullscreen); GLOBAL_DEF("display/resizable",video_mode.resizable); GLOBAL_DEF("display/borderless_window", video_mode.borderless_window); + use_vsync = GLOBAL_DEF("display/use_vsync", use_vsync); GLOBAL_DEF("display/test_width",0); GLOBAL_DEF("display/test_height",0); OS::get_singleton()->_pixel_snap=GLOBAL_DEF("display/use_2d_pixel_snap",false); @@ -876,6 +878,7 @@ Error Main::setup2() { OS::get_singleton()->set_window_position(init_custom_pos); } + OS::get_singleton()->set_use_vsync(use_vsync); register_core_singletons(); diff --git a/platform/android/AndroidManifest.xml.template b/platform/android/AndroidManifest.xml.template index 37dee4a9a5..852a821c65 100644 --- a/platform/android/AndroidManifest.xml.template +++ b/platform/android/AndroidManifest.xml.template @@ -200,6 +200,6 @@ $$ADD_PERMISSION_CHUNKS$$ <uses-permission android:name="godot.custom.18"/> <uses-permission android:name="godot.custom.19"/> -<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19"/> +<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="23"/> </manifest> diff --git a/platform/android/build.gradle.template b/platform/android/build.gradle.template index 9461cd2e99..b0630d9a3a 100644 --- a/platform/android/build.gradle.template +++ b/platform/android/build.gradle.template @@ -3,7 +3,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:1.2.0' + classpath 'com.android.tools.build:gradle:1.3.1' } } @@ -17,7 +17,7 @@ allprojects { } dependencies { - + compile 'com.android.support:support-v4:23.+' // can be removed if minSdkVersion 16 and modify DownloadNotification.java & V14CustomNotification.java $$GRADLE_DEPENDENCIES$$ } @@ -25,10 +25,12 @@ android { lintOptions { abortOnError false + disable 'MissingTranslation' } - compileSdkVersion 19 - buildToolsVersion "19.1" + compileSdkVersion 23 + buildToolsVersion "23.0.3" + useLibrary 'org.apache.http.legacy' packagingOptions { exclude 'META-INF/LICENSE' @@ -36,7 +38,7 @@ android { } defaultConfig { minSdkVersion 14 - targetSdkVersion 19 + targetSdkVersion 23 } sourceSets { main { diff --git a/platform/android/java/res/layout/downloading_expansion.xml b/platform/android/java/res/layout/downloading_expansion.xml index 553155dcd3..d678d94eac 100644 --- a/platform/android/java/res/layout/downloading_expansion.xml +++ b/platform/android/java/res/layout/downloading_expansion.xml @@ -80,7 +80,7 @@ </RelativeLayout> <LinearLayout - android:id="@+id/downloaderDashboard" + android:id="@+id/downloadButton" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" > diff --git a/platform/android/java/res/values-fa/strings.xml b/platform/android/java/res/values-fa/strings.xml index 450f9fe212..f1e29013c4 100644 --- a/platform/android/java/res/values-fa/strings.xml +++ b/platform/android/java/res/values-fa/strings.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <string name="godot_project_name_string">godot-project-name-fa</string> - <string name="testuf8">سلام</string> <string name="text_paused_cellular">آیا می خواهید بر روی اتصال داده همراه دانلود را شروع کنید؟ بر اساس نوع سطح داده شما این ممکن است برای شما هزینه مالی داشته باشد.</string> <string name="text_paused_cellular_2">اگر نمی خواهید بر روی اتصال داده همراه دانلود را شروع کنید ، دانلود به صورت خودکار در زمان دسترسی به وای-فای شروع می شود.</string> <string name="text_button_resume_cellular">ادامه دانلود</string> diff --git a/platform/android/java/src/com/android/vending/licensing/LicenseChecker.java b/platform/android/java/src/com/android/vending/licensing/LicenseChecker.java index 0b1c4b6cca..531cb22f8c 100644 --- a/platform/android/java/src/com/android/vending/licensing/LicenseChecker.java +++ b/platform/android/java/src/com/android/vending/licensing/LicenseChecker.java @@ -146,11 +146,11 @@ public class LicenseChecker implements ServiceConnection { if (mService == null) { Log.i(TAG, "Binding to licensing service."); try { + Intent serviceIntent = new Intent(new String(Base64.decode("Y29tLmFuZHJvaWQudmVuZGluZy5saWNlbnNpbmcuSUxpY2Vuc2luZ1NlcnZpY2U="))); + serviceIntent.setPackage("com.android.vending"); boolean bindResult = mContext .bindService( - new Intent( - new String( - Base64.decode("Y29tLmFuZHJvaWQudmVuZGluZy5saWNlbnNpbmcuSUxpY2Vuc2luZ1NlcnZpY2U="))), + serviceIntent, this, // ServiceConnection. Context.BIND_AUTO_CREATE); diff --git a/platform/android/java/src/com/google/android/vending/expansion/downloader/Constants.java b/platform/android/java/src/com/google/android/vending/expansion/downloader/Constants.java index ff2c6f535a..2af33b96b9 100644 --- a/platform/android/java/src/com/google/android/vending/expansion/downloader/Constants.java +++ b/platform/android/java/src/com/google/android/vending/expansion/downloader/Constants.java @@ -33,6 +33,10 @@ public class Constants { public static final String EXP_PATH = File.separator + "Android" + File.separator + "obb" + File.separator; + // save to private app's data on Android 6.0 to skip requesting permission. + public static final String EXP_PATH_API23 = File.separator + "Android" + + File.separator + "data" + File.separator; + /** The intent that gets sent when the service must wake up for a retry */ public static final String ACTION_RETRY = "android.intent.action.DOWNLOAD_WAKEUP"; @@ -70,7 +74,7 @@ public class Constants { * The number of times that the download manager will retry its network * operations when no progress is happening before it gives up. */ - public static final int MAX_RETRIES = 5; + public static final int MAX_RETRIES = 10; /** * The minimum amount of time that the download manager accepts for diff --git a/platform/android/java/src/com/google/android/vending/expansion/downloader/Helpers.java b/platform/android/java/src/com/google/android/vending/expansion/downloader/Helpers.java index b4c28d36e7..ae3fe957cb 100644 --- a/platform/android/java/src/com/google/android/vending/expansion/downloader/Helpers.java +++ b/platform/android/java/src/com/google/android/vending/expansion/downloader/Helpers.java @@ -19,6 +19,7 @@ package com.google.android.vending.expansion.downloader; import com.godot.game.R; import android.content.Context; +import android.os.Build; import android.os.Environment; import android.os.StatFs; import android.os.SystemClock; @@ -220,8 +221,8 @@ public class Helpers { static public String getSaveFilePath(Context c) { File root = Environment.getExternalStorageDirectory(); - String path = root.toString() + Constants.EXP_PATH + c.getPackageName(); - return path; + String path = Build.VERSION.SDK_INT >= 23 ? Constants.EXP_PATH_API23 : Constants.EXP_PATH; + return root.toString() + path + c.getPackageName(); } /** diff --git a/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/CustomNotificationFactory.java b/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/CustomNotificationFactory.java index 9a0ca02122..e2673a9dd7 100644 --- a/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/CustomNotificationFactory.java +++ b/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/CustomNotificationFactory.java @@ -25,6 +25,6 @@ public class CustomNotificationFactory { if (android.os.Build.VERSION.SDK_INT > 13) return new V14CustomNotification(); else - return new V3CustomNotification(); + throw new RuntimeException(); } } diff --git a/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/DownloadNotification.java b/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/DownloadNotification.java index d82b658bc3..73e6f83bec 100644 --- a/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/DownloadNotification.java +++ b/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/DownloadNotification.java @@ -27,6 +27,7 @@ import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.os.Messenger; +import android.support.v4.app.NotificationCompat; /** * This class handles displaying the notification associated with the download @@ -48,8 +49,9 @@ public class DownloadNotification implements IDownloaderClient { private IDownloaderClient mClientProxy; final ICustomNotification mCustomNotification; - private Notification mNotification; - private Notification mCurrentNotification; + // NotificationCompat.Builder is used to support API < 16. This can be changed to Notification.Builder if minimum API >= 16. + private NotificationCompat.Builder mNotificationBuilder; + private NotificationCompat.Builder mCurrentNotificationBuilder; private CharSequence mLabel; private String mCurrentText; private PendingIntent mContentIntent; @@ -132,17 +134,14 @@ public class DownloadNotification implements IDownloaderClient { } mCurrentText = mContext.getString(stringDownloadID); mCurrentTitle = mLabel.toString(); - mCurrentNotification.tickerText = mLabel + ": " + mCurrentText; - mCurrentNotification.icon = iconResource; - mCurrentNotification.setLatestEventInfo(mContext, mCurrentTitle, mCurrentText, - mContentIntent); - if (ongoingEvent) { - mCurrentNotification.flags |= Notification.FLAG_ONGOING_EVENT; - } else { - mCurrentNotification.flags &= ~Notification.FLAG_ONGOING_EVENT; - mCurrentNotification.flags |= Notification.FLAG_AUTO_CANCEL; - } - mNotificationManager.notify(NOTIFICATION_ID, mCurrentNotification); + mCurrentNotificationBuilder.setTicker(mLabel + ": " + mCurrentText); + mCurrentNotificationBuilder.setSmallIcon(iconResource); + mCurrentNotificationBuilder.setContentTitle(mCurrentTitle); + mCurrentNotificationBuilder.setContentText(mCurrentText); + mCurrentNotificationBuilder.setContentIntent(mContentIntent); + mCurrentNotificationBuilder.setOngoing(ongoingEvent); + mCurrentNotificationBuilder.setAutoCancel(!ongoingEvent); + mNotificationManager.notify(NOTIFICATION_ID, mCurrentNotificationBuilder.build()); } } @@ -154,10 +153,12 @@ public class DownloadNotification implements IDownloaderClient { } if (progress.mOverallTotal <= 0) { // we just show the text - mNotification.tickerText = mCurrentTitle; - mNotification.icon = android.R.drawable.stat_sys_download; - mNotification.setLatestEventInfo(mContext, mLabel, mCurrentText, mContentIntent); - mCurrentNotification = mNotification; + mNotificationBuilder.setTicker(mCurrentTitle); + mNotificationBuilder.setSmallIcon(android.R.drawable.stat_sys_download); + mNotificationBuilder.setContentTitle(mCurrentTitle); + mNotificationBuilder.setContentText(mCurrentText); + mNotificationBuilder.setContentIntent(mContentIntent); + mCurrentNotificationBuilder = mNotificationBuilder; } else { mCustomNotification.setCurrentBytes(progress.mOverallProgress); mCustomNotification.setTotalBytes(progress.mOverallTotal); @@ -166,9 +167,9 @@ public class DownloadNotification implements IDownloaderClient { mCustomNotification.setTicker(mLabel + ": " + mCurrentText); mCustomNotification.setTitle(mLabel); mCustomNotification.setTimeRemaining(progress.mTimeRemaining); - mCurrentNotification = mCustomNotification.updateNotification(mContext); + mCurrentNotificationBuilder = mCustomNotification.updateNotification(mContext); } - mNotificationManager.notify(NOTIFICATION_ID, mCurrentNotification); + mNotificationManager.notify(NOTIFICATION_ID, mCurrentNotificationBuilder.build()); } public interface ICustomNotification { @@ -186,7 +187,7 @@ public class DownloadNotification implements IDownloaderClient { void setTimeRemaining(long timeRemaining); - Notification updateNotification(Context c); + NotificationCompat.Builder updateNotification(Context c); } /** @@ -219,8 +220,8 @@ public class DownloadNotification implements IDownloaderClient { mContext.getSystemService(Context.NOTIFICATION_SERVICE); mCustomNotification = CustomNotificationFactory .createCustomNotification(); - mNotification = new Notification(); - mCurrentNotification = mNotification; + mNotificationBuilder = new NotificationCompat.Builder(ctx); + mCurrentNotificationBuilder = mNotificationBuilder; } diff --git a/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/V14CustomNotification.java b/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/V14CustomNotification.java index 2e049a4d47..390bde96e9 100644 --- a/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/V14CustomNotification.java +++ b/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/V14CustomNotification.java @@ -22,6 +22,7 @@ import com.google.android.vending.expansion.downloader.Helpers; import android.app.Notification; import android.app.PendingIntent; import android.content.Context; +import android.support.v4.app.NotificationCompat; public class V14CustomNotification implements DownloadNotification.ICustomNotification { @@ -53,13 +54,14 @@ public class V14CustomNotification implements DownloadNotification.ICustomNotifi mCurrentKB = currentBytes; } - void setProgress(Notification.Builder builder) { + void setProgress(NotificationCompat.Builder builder) { } @Override - public Notification updateNotification(Context c) { - Notification.Builder builder = new Notification.Builder(c); + public NotificationCompat.Builder updateNotification(Context c) { + // NotificationCompat.Builder is used to support API < 16. This can be changed to Notification.Builder if minimum API >= 16. + NotificationCompat.Builder builder = new NotificationCompat.Builder(c); builder.setContentTitle(mTitle); if (mTotalKB > 0 && -1 != mCurrentKB) { builder.setProgress((int) (mTotalKB >> 8), (int) (mCurrentKB >> 8), false); @@ -80,7 +82,7 @@ public class V14CustomNotification implements DownloadNotification.ICustomNotifi builder.setContentIntent(mPendingIntent); builder.setOnlyAlertOnce(true); - return builder.getNotification(); + return builder; } @Override diff --git a/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/V3CustomNotification.java b/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/V3CustomNotification.java deleted file mode 100644 index 94e21de7ca..0000000000 --- a/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/V3CustomNotification.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.vending.expansion.downloader.impl; - -import com.godot.game.R; -import com.google.android.vending.expansion.downloader.Helpers; - -import android.app.Notification; -import android.app.PendingIntent; -import android.content.Context; -import android.graphics.BitmapFactory; -import android.view.View; -import android.widget.RemoteViews; - -public class V3CustomNotification implements DownloadNotification.ICustomNotification { - - CharSequence mTitle; - CharSequence mTicker; - int mIcon; - long mTotalBytes = -1; - long mCurrentBytes = -1; - long mTimeRemaining; - PendingIntent mPendingIntent; - Notification mNotification = new Notification(); - - @Override - public void setIcon(int icon) { - mIcon = icon; - } - - @Override - public void setTitle(CharSequence title) { - mTitle = title; - } - - @Override - public void setTotalBytes(long totalBytes) { - mTotalBytes = totalBytes; - } - - @Override - public void setCurrentBytes(long currentBytes) { - mCurrentBytes = currentBytes; - } - - @Override - public Notification updateNotification(Context c) { - Notification n = mNotification; - - n.icon = mIcon; - - n.flags |= Notification.FLAG_ONGOING_EVENT; - - if (android.os.Build.VERSION.SDK_INT > 10) { - n.flags |= Notification.FLAG_ONLY_ALERT_ONCE; // only matters for - // Honeycomb - } - - // Build the RemoteView object - RemoteViews expandedView = new RemoteViews( - c.getPackageName(), - R.layout.status_bar_ongoing_event_progress_bar); - - expandedView.setTextViewText(R.id.title, mTitle); - // look at strings - expandedView.setViewVisibility(R.id.description, View.VISIBLE); - expandedView.setTextViewText(R.id.description, - Helpers.getDownloadProgressString(mCurrentBytes, mTotalBytes)); - expandedView.setViewVisibility(R.id.progress_bar_frame, View.VISIBLE); - expandedView.setProgressBar(R.id.progress_bar, - (int) (mTotalBytes >> 8), - (int) (mCurrentBytes >> 8), - mTotalBytes <= 0); - expandedView.setViewVisibility(R.id.time_remaining, View.VISIBLE); - expandedView.setTextViewText( - R.id.time_remaining, - c.getString(R.string.time_remaining_notification, - Helpers.getTimeRemaining(mTimeRemaining))); - expandedView.setTextViewText(R.id.progress_text, - Helpers.getDownloadProgressPercent(mCurrentBytes, mTotalBytes)); - expandedView.setImageViewResource(R.id.appIcon, mIcon); - n.contentView = expandedView; - n.contentIntent = mPendingIntent; - return n; - } - - @Override - public void setPendingIntent(PendingIntent contentIntent) { - mPendingIntent = contentIntent; - } - - @Override - public void setTicker(CharSequence ticker) { - mTicker = ticker; - } - - @Override - public void setTimeRemaining(long timeRemaining) { - mTimeRemaining = timeRemaining; - } - -} diff --git a/platform/android/java/src/org/godotengine/godot/Godot.java b/platform/android/java/src/org/godotengine/godot/Godot.java index c4ba2da751..73d54b6afa 100644 --- a/platform/android/java/src/org/godotengine/godot/Godot.java +++ b/platform/android/java/src/org/godotengine/godot/Godot.java @@ -467,7 +467,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC // Build the full path to the app's expansion files try { - expansion_pack_path = Environment.getExternalStorageDirectory().toString() + "/Android/obb/"+this.getPackageName(); + expansion_pack_path = Helpers.getSaveFilePath(getApplicationContext()); expansion_pack_path+="/"+"main."+getPackageManager().getPackageInfo(getPackageName(), 0).versionCode+"."+this.getPackageName()+".obb"; } catch (Exception e) { e.printStackTrace(); diff --git a/platform/iphone/rasterizer_iphone.cpp b/platform/iphone/rasterizer_iphone.cpp index f06f12547f..99e83343d0 100644 --- a/platform/iphone/rasterizer_iphone.cpp +++ b/platform/iphone/rasterizer_iphone.cpp @@ -2446,7 +2446,7 @@ void RasterizerIPhone::canvas_draw_rect(const Rect2& p_rect, bool p_region, cons } -void RasterizerIPhone::canvas_draw_style_box(const Rect2& p_rect, RID p_texture,const float *p_margin, bool p_draw_center) { +void RasterizerIPhone::canvas_draw_style_box(const Rect2& p_rect, const Rect2& p_src_region, RID p_texture,const float *p_margin, bool p_draw_center) { glColor4f(1, 1, 1, 1); @@ -2458,52 +2458,56 @@ void RasterizerIPhone::canvas_draw_style_box(const Rect2& p_rect, RID p_texture, glBindTexture( GL_TEXTURE_2D,texture->tex_id ); + Rect2 region = p_src_region; + if (region.size.width <= 0 ) + region.size.width = texture->width; + if (region.size.height <= 0) + region.size.height = texture->height; /* CORNERS */ - _draw_textured_quad( // top left Rect2( p_rect.pos, Size2(p_margin[MARGIN_LEFT],p_margin[MARGIN_TOP])), - Rect2( Point2(), Size2(p_margin[MARGIN_LEFT],p_margin[MARGIN_TOP])), + Rect2( region.pos, Size2(p_margin[MARGIN_LEFT],p_margin[MARGIN_TOP])), Size2( texture->width, texture->height ) ); _draw_textured_quad( // top right Rect2( Point2( p_rect.pos.x + p_rect.size.width - p_margin[MARGIN_RIGHT], p_rect.pos.y), Size2(p_margin[MARGIN_RIGHT],p_margin[MARGIN_TOP])), - Rect2( Point2(texture->width-p_margin[MARGIN_RIGHT],0), Size2(p_margin[MARGIN_RIGHT],p_margin[MARGIN_TOP])), + Rect2( Point2(region.pos.x+region.size.width-p_margin[MARGIN_RIGHT], region.pos.y), Size2(p_margin[MARGIN_RIGHT],p_margin[MARGIN_TOP])), Size2( texture->width, texture->height ) ); _draw_textured_quad( // bottom left Rect2( Point2(p_rect.pos.x,p_rect.pos.y + p_rect.size.height - p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_LEFT],p_margin[MARGIN_BOTTOM])), - Rect2( Point2(0,texture->height-p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_LEFT],p_margin[MARGIN_BOTTOM])), + Rect2( Point2(region.pos.x, region.pos.y+region.size.height-p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_LEFT],p_margin[MARGIN_BOTTOM])), Size2( texture->width, texture->height ) ); _draw_textured_quad( // bottom right Rect2( Point2( p_rect.pos.x + p_rect.size.width - p_margin[MARGIN_RIGHT], p_rect.pos.y + p_rect.size.height - p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_RIGHT],p_margin[MARGIN_BOTTOM])), - Rect2( Point2(texture->width-p_margin[MARGIN_RIGHT],texture->height-p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_RIGHT],p_margin[MARGIN_BOTTOM])), + Rect2( Point2(region.pos.x+region.size.width-p_margin[MARGIN_RIGHT], region.pos.y+region.size.height-p_margin[MARGIN_BOTTOM]), Size2(p_margin[MARGIN_RIGHT],p_margin[MARGIN_BOTTOM])), Size2( texture->width, texture->height ) ); Rect2 rect_center( p_rect.pos+Point2( p_margin[MARGIN_LEFT], p_margin[MARGIN_TOP]), Size2( p_rect.size.width - p_margin[MARGIN_LEFT] - p_margin[MARGIN_RIGHT], p_rect.size.height - p_margin[MARGIN_TOP] - p_margin[MARGIN_BOTTOM] )); - Rect2 src_center( Point2( p_margin[MARGIN_LEFT], p_margin[MARGIN_TOP]), Size2( texture->width - p_margin[MARGIN_LEFT] - p_margin[MARGIN_RIGHT], texture->height - p_margin[MARGIN_TOP] - p_margin[MARGIN_BOTTOM] )); + Rect2 src_center( Point2(region.pos.x+p_margin[MARGIN_LEFT], region.pos.y+p_margin[MARGIN_TOP]), Size2(region.size.width - p_margin[MARGIN_LEFT] - p_margin[MARGIN_RIGHT], region.size.height - p_margin[MARGIN_TOP] - p_margin[MARGIN_BOTTOM] )); _draw_textured_quad( // top Rect2( Point2(rect_center.pos.x,p_rect.pos.y),Size2(rect_center.size.width,p_margin[MARGIN_TOP])), - Rect2( Point2(p_margin[MARGIN_LEFT],0), Size2(src_center.size.width,p_margin[MARGIN_TOP])), + Rect2( Point2(src_center.pos.x,region.pos.y), Size2(src_center.size.width,p_margin[MARGIN_TOP])), Size2( texture->width, texture->height ) ); _draw_textured_quad( // bottom Rect2( Point2(rect_center.pos.x,rect_center.pos.y+rect_center.size.height),Size2(rect_center.size.width,p_margin[MARGIN_BOTTOM])), - Rect2( Point2(p_margin[MARGIN_LEFT],src_center.pos.y+src_center.size.height), Size2(src_center.size.width,p_margin[MARGIN_BOTTOM])), + Rect2( Point2(src_center.pos.x,src_center.pos.y+src_center.size.height), Size2(src_center.size.width,p_margin[MARGIN_BOTTOM])), Size2( texture->width, texture->height ) ); _draw_textured_quad( // left Rect2( Point2(p_rect.pos.x,rect_center.pos.y),Size2(p_margin[MARGIN_LEFT],rect_center.size.height)), - Rect2( Point2(0,p_margin[MARGIN_TOP]), Size2(p_margin[MARGIN_LEFT],src_center.size.height)), + Rect2( Point2(region.pos.x,region.pos.y+p_margin[MARGIN_TOP]), Size2(p_margin[MARGIN_LEFT],src_center.size.height)), Size2( texture->width, texture->height ) ); _draw_textured_quad( // right Rect2( Point2(rect_center.pos.x+rect_center.size.width,rect_center.pos.y),Size2(p_margin[MARGIN_RIGHT],rect_center.size.height)), - Rect2( Point2(src_center.pos.x+src_center.size.width,p_margin[MARGIN_TOP]), Size2(p_margin[MARGIN_RIGHT],src_center.size.height)), + Rect2( Point2(src_center.pos.x+src_center.size.width,region.pos.y+p_margin[MARGIN_TOP]), Size2(p_margin[MARGIN_RIGHT],src_center.size.height)), Size2( texture->width, texture->height ) ); if (p_draw_center) { diff --git a/platform/osx/dir_access_osx.mm b/platform/osx/dir_access_osx.mm index 20dc1df8f4..d123c5c648 100644 --- a/platform/osx/dir_access_osx.mm +++ b/platform/osx/dir_access_osx.mm @@ -319,10 +319,10 @@ size_t DirAccessOSX::get_space_left() { struct statvfs vfs; if (statvfs(current_dir.utf8().get_data(), &vfs) != 0) { - return -1; + return 0; }; - return vfs.f_bfree * vfs.f_bsize; + return (size_t) (vfs.f_bavail * vfs.f_bsize); #else #warning THIS IS BROKEN return 0; diff --git a/platform/windows/context_gl_win.cpp b/platform/windows/context_gl_win.cpp index ab66b81421..fd9e895370 100644 --- a/platform/windows/context_gl_win.cpp +++ b/platform/windows/context_gl_win.cpp @@ -96,6 +96,20 @@ static GLWrapperFuncPtr wrapper_get_proc_address(const char* p_function) { } */ +void ContextGL_Win::set_use_vsync(bool p_use) { + + if (wglSwapIntervalEXT) { + wglSwapIntervalEXT(p_use?1:0); + } + use_vsync=p_use; + +} + +bool ContextGL_Win::is_using_vsync() const { + + return use_vsync; +} + Error ContextGL_Win::initialize() { @@ -184,7 +198,7 @@ Error ContextGL_Win::initialize() { printf("Activated GL 3.1 context"); } - + wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC) wglGetProcAddress ("wglSwapIntervalEXT"); // glWrapperInit(wrapper_get_proc_address); return OK; @@ -194,6 +208,7 @@ ContextGL_Win::ContextGL_Win(HWND hwnd,bool p_opengl_3_context) { opengl_3_context=p_opengl_3_context; hWnd=hwnd; + use_vsync=false; } ContextGL_Win::~ContextGL_Win() { diff --git a/platform/windows/context_gl_win.h b/platform/windows/context_gl_win.h index 055e0b2f51..e1ab6fb26a 100644 --- a/platform/windows/context_gl_win.h +++ b/platform/windows/context_gl_win.h @@ -49,6 +49,8 @@ #include <windows.h> +typedef bool (APIENTRY *PFNWGLSWAPINTERVALEXTPROC) (int interval); + class ContextGL_Win : public ContextGL { HDC hDC; @@ -56,6 +58,10 @@ class ContextGL_Win : public ContextGL { unsigned int pixel_format; HWND hWnd; bool opengl_3_context; + bool use_vsync; + + + PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT; public: @@ -69,6 +75,8 @@ public: virtual Error initialize(); + virtual void set_use_vsync(bool p_use); + virtual bool is_using_vsync() const; ContextGL_Win(HWND hwnd,bool p_opengl_3_context); ~ContextGL_Win(); diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 65ee39f4da..5e3dc438d0 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -2269,6 +2269,21 @@ String OS_Windows::get_joy_guid(int p_device) const { return input->get_joy_guid_remapped(p_device); } +void OS_Windows::set_use_vsync(bool p_enable) { + + if (gl_context) + gl_context->set_use_vsync(p_enable); +} + +bool OS_Windows::is_vsnc_enabled() const{ + + if (gl_context) + return gl_context->is_using_vsync(); + + return true; +} + + OS_Windows::OS_Windows(HINSTANCE _hInstance) { key_event_pos=0; diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index 6dd5b78bfd..509d76abbf 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -283,6 +283,9 @@ public: virtual bool is_joy_known(int p_device); virtual String get_joy_guid(int p_device) const; + virtual void set_use_vsync(bool p_enable); + virtual bool is_vsnc_enabled() const; + OS_Windows(HINSTANCE _hInstance); ~OS_Windows(); diff --git a/platform/x11/context_gl_x11.cpp b/platform/x11/context_gl_x11.cpp index 9f987e1376..cd325dfc99 100644 --- a/platform/x11/context_gl_x11.cpp +++ b/platform/x11/context_gl_x11.cpp @@ -34,7 +34,9 @@ #include <unistd.h> #include <stdlib.h> +#define GLX_GLXEXT_PROTOTYPES #include <GL/glx.h> +#include <GL/glxext.h> #define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 @@ -176,6 +178,41 @@ int ContextGL_X11::get_window_height() { return xwa.height; } +void ContextGL_X11::set_use_vsync(bool p_use) { + static bool setup = false; + static PFNGLXSWAPINTERVALEXTPROC glXSwapIntervalEXT = NULL; + static PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalMESA = NULL; + static PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = NULL; + + if (!setup) { + setup = true; + String extensions = glXQueryExtensionsString(x11_display, DefaultScreen(x11_display)); + if (extensions.find("GLX_EXT_swap_control") != -1) + glXSwapIntervalEXT = (PFNGLXSWAPINTERVALEXTPROC) glXGetProcAddressARB((const GLubyte*)"glXSwapIntervalEXT"); + if (extensions.find("GLX_MESA_swap_control") != -1) + glXSwapIntervalMESA = (PFNGLXSWAPINTERVALSGIPROC) glXGetProcAddressARB((const GLubyte*)"glXSwapIntervalMESA"); + if (extensions.find("GLX_SGI_swap_control") != -1) + glXSwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC) glXGetProcAddressARB((const GLubyte*)"glXSwapIntervalSGI"); + } + int val = p_use ? 1:0; + if (glXSwapIntervalMESA) { + glXSwapIntervalMESA(val); + } + else if (glXSwapIntervalSGI) { + glXSwapIntervalSGI(val); + } + else if (glXSwapIntervalEXT) { + GLXDrawable drawable = glXGetCurrentDrawable(); + glXSwapIntervalEXT(x11_display, drawable, val); + } + else return; + use_vsync = p_use; +} +bool ContextGL_X11::is_using_vsync() const { + + return use_vsync; +} + ContextGL_X11::ContextGL_X11(::Display *p_x11_display,::Window &p_x11_window,const OS::VideoMode& p_default_video_mode,bool p_opengl_3_context) : x11_window(p_x11_window) { @@ -189,6 +226,7 @@ ContextGL_X11::ContextGL_X11(::Display *p_x11_display,::Window &p_x11_window,con glx_minor=glx_major=0; p = memnew( ContextGL_X11_Private ); p->glx_context=0; + use_vsync=false; } diff --git a/platform/x11/context_gl_x11.h b/platform/x11/context_gl_x11.h index c77fb3e333..4474542c0b 100644 --- a/platform/x11/context_gl_x11.h +++ b/platform/x11/context_gl_x11.h @@ -55,6 +55,7 @@ class ContextGL_X11 : public ContextGL { bool direct_render; int glx_minor,glx_major; bool opengl_3_context; + bool use_vsync; public: virtual void release_current(); @@ -65,6 +66,9 @@ public: virtual Error initialize(); + virtual void set_use_vsync(bool p_use); + virtual bool is_using_vsync() const; + ContextGL_X11(::Display *p_x11_display,::Window &p_x11_window,const OS::VideoMode& p_default_video_mode,bool p_opengl_3_context); ~ContextGL_X11(); diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 66723c0295..b089436a17 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -1952,6 +1952,20 @@ String OS_X11::get_joy_guid(int p_device) const { return input->get_joy_guid_remapped(p_device); } +void OS_X11::set_use_vsync(bool p_enable) { + if (context_gl) + return context_gl->set_use_vsync(p_enable); +} + +bool OS_X11::is_vsnc_enabled() const { + + if (context_gl) + return context_gl->is_using_vsync(); + + return true; +} + + void OS_X11::set_context(int p_context) { XClassHint* classHint = NULL; diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index 1369340b04..311f26d4d3 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -240,6 +240,9 @@ public: virtual void set_context(int p_context); + virtual void set_use_vsync(bool p_enable); + virtual bool is_vsnc_enabled() const; + void run(); OS_X11(); diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index 21615b7f55..17e5503a2d 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -455,20 +455,15 @@ void CanvasItem::_enter_canvas() { if ((!get_parent() || !get_parent()->cast_to<CanvasItem>()) || toplevel) { Node *n = this; - Viewport *viewport=NULL; + canvas_layer=NULL; while(n) { - if (n->cast_to<Viewport>()) { - - viewport = n->cast_to<Viewport>(); + canvas_layer = n->cast_to<CanvasLayer>(); + if (canvas_layer) { break; } - if (!canvas_layer && n->cast_to<CanvasLayer>()) { - - canvas_layer = n->cast_to<CanvasLayer>(); - } n=n->get_parent(); } @@ -476,7 +471,7 @@ void CanvasItem::_enter_canvas() { if (canvas_layer) canvas=canvas_layer->get_world_2d()->get_canvas(); else - canvas=viewport->find_world_2d()->get_canvas(); + canvas=get_viewport()->find_world_2d()->get_canvas(); VisualServer::get_singleton()->canvas_item_set_parent(canvas_item,canvas); @@ -488,6 +483,7 @@ void CanvasItem::_enter_canvas() { } else { CanvasItem *parent = get_parent_item(); + canvas_layer=parent->canvas_layer; VisualServer::get_singleton()->canvas_item_set_parent(canvas_item,parent->get_canvas_item()); parent->_queue_sort_children(); } @@ -1176,12 +1172,10 @@ Matrix32 CanvasItem::get_viewport_transform() const { return canvas_layer->get_transform(); } - } else if (get_viewport()) { + } else { return get_viewport()->get_final_transform() * get_viewport()->get_canvas_transform(); } - return Matrix32(); - } diff --git a/scene/3d/listener.cpp b/scene/3d/listener.cpp new file mode 100644 index 0000000000..bf42a5c92e --- /dev/null +++ b/scene/3d/listener.cpp @@ -0,0 +1,167 @@ +#include "listener.h" + +#include "scene/resources/mesh.h" + +void Listener::_update_audio_listener_state() { + + +} + +void Listener::_request_listener_update() { + + _update_listener(); +} + +bool Listener::_set(const StringName& p_name, const Variant& p_value) { + + if (p_name == "current") { + if (p_value.operator bool()) { + make_current(); + } + else { + clear_current(); + } + } + else + return false; + + return true; +} +bool Listener::_get(const StringName& p_name,Variant &r_ret) const { + + if (p_name == "current") { + if (is_inside_tree() && get_tree()->is_node_being_edited(this)) { + r_ret = current; + } + else { + r_ret = is_current(); + } + } + else + return false; + + return true; +} + +void Listener::_get_property_list( List<PropertyInfo> *p_list) const { + + p_list->push_back( PropertyInfo( Variant::BOOL, "current" ) ); +} + +void Listener::_update_listener() { + + if (is_inside_tree() && is_current()) { + get_viewport()->_listener_transform_changed_notify(); + + } +} + +void Listener::_notification(int p_what) { + + switch(p_what) { + + case NOTIFICATION_ENTER_WORLD: { + bool first_listener = get_viewport()->_listener_add(this); + if (!get_tree()->is_node_being_edited(this) && (current || first_listener)) + make_current(); + } break; + case NOTIFICATION_TRANSFORM_CHANGED: { + _request_listener_update(); + } break; + case NOTIFICATION_EXIT_WORLD: { + + if (!get_tree()->is_node_being_edited(this)) { + if (is_current()) { + clear_current(); + current=true; //keep it true + + } else { + current=false; + } + } + + get_viewport()->_listener_remove(this); + + + } break; + + + } + +} + + +Transform Listener::get_listener_transform() const { + + return get_global_transform().orthonormalized(); +} + +void Listener::make_current() { + + current=true; + + if (!is_inside_tree()) + return; + + get_viewport()->_listener_set(this); +} + + + + +void Listener::clear_current() { + + current=false; + if (!is_inside_tree()) + return; + + if (get_viewport()->get_listener()==this) { + get_viewport()->_listener_set(NULL); + get_viewport()->_listener_make_next_current(this); + } + +} + +bool Listener::is_current() const { + + if (is_inside_tree() && !get_tree()->is_node_being_edited(this)) { + + return get_viewport()->get_listener()==this; + } else + return current; + + return false; +} + +bool Listener::_can_gizmo_scale() const { + + return false; +} + +RES Listener::_get_gizmo_geometry() const { + Ref<Mesh> mesh = memnew(Mesh); + + return mesh; +} + +void Listener::_bind_methods() { + + ObjectTypeDB::bind_method( _MD("make_current"),&Listener::make_current ); + ObjectTypeDB::bind_method( _MD("clear_current"),&Listener::clear_current ); + ObjectTypeDB::bind_method( _MD("is_current"),&Listener::is_current ); + ObjectTypeDB::bind_method( _MD("get_listener_transform"),&Listener::get_listener_transform ); +} + +Listener::Listener() { + + current=false; + force_change=false; + //active=false; +} + + +Listener::~Listener() { + +} + + diff --git a/scene/3d/listener.h b/scene/3d/listener.h new file mode 100644 index 0000000000..bf0281a8e0 --- /dev/null +++ b/scene/3d/listener.h @@ -0,0 +1,53 @@ +#ifndef LISTENER_H +#define LISTENER_H + + +#include "scene/3d/spatial.h" +#include "scene/main/viewport.h" + +class Listener : public Spatial { + + OBJ_TYPE(Listener, Spatial); +private: + + bool force_change; + bool current; + + RID scenario_id; + + virtual bool _can_gizmo_scale() const; + virtual RES _get_gizmo_geometry() const; + +friend class Viewport; + void _update_audio_listener_state(); +protected: + + void _update_listener(); + virtual void _request_listener_update(); + + bool _set(const StringName& p_name, const Variant& p_value); + bool _get(const StringName& p_name,Variant &r_ret) const; + void _get_property_list( List<PropertyInfo> *p_list) const; + void _notification(int p_what); + + static void _bind_methods(); + +public: + + void make_current(); + void clear_current(); + bool is_current() const; + + virtual Transform get_listener_transform() const; + + void set_visible_layers(uint32_t p_layers); + uint32_t get_visible_layers() const; + + Vector<Plane> get_frustum() const; + + Listener(); + ~Listener(); + +}; + +#endif diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index c99d3aa0f5..bd56369746 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -770,7 +770,7 @@ Size2 Control::get_minimum_size() const { Ref<Texture> Control::get_icon(const StringName& p_name,const StringName& p_type) const { - if (p_type==StringName()) { + if (p_type==StringName() || p_type=="") { const Ref<Texture>* tex = data.icon_override.getptr(p_name); if (tex) @@ -800,7 +800,7 @@ Ref<Texture> Control::get_icon(const StringName& p_name,const StringName& p_type } Ref<Shader> Control::get_shader(const StringName& p_name,const StringName& p_type) const { - if (p_type==StringName()) { + if (p_type==StringName() || p_type=="") { const Ref<Shader>* sdr = data.shader_override.getptr(p_name); if (sdr) @@ -830,7 +830,7 @@ Ref<Shader> Control::get_shader(const StringName& p_name,const StringName& p_typ Ref<StyleBox> Control::get_stylebox(const StringName& p_name,const StringName& p_type) const { - if (p_type==StringName()) { + if (p_type==StringName() || p_type=="") { const Ref<StyleBox>* style = data.style_override.getptr(p_name); if (style) return *style; @@ -858,7 +858,7 @@ Ref<StyleBox> Control::get_stylebox(const StringName& p_name,const StringName& p } Ref<Font> Control::get_font(const StringName& p_name,const StringName& p_type) const { - if (p_type==StringName()) { + if (p_type==StringName() || p_type=="") { const Ref<Font>* font = data.font_override.getptr(p_name); if (font) return *font; @@ -889,7 +889,7 @@ Ref<Font> Control::get_font(const StringName& p_name,const StringName& p_type) c } Color Control::get_color(const StringName& p_name,const StringName& p_type) const { - if (p_type==StringName()) { + if (p_type==StringName() || p_type=="") { const Color* color = data.color_override.getptr(p_name); if (color) return *color; @@ -918,7 +918,7 @@ Color Control::get_color(const StringName& p_name,const StringName& p_type) cons int Control::get_constant(const StringName& p_name,const StringName& p_type) const { - if (p_type==StringName()) { + if (p_type==StringName() || p_type=="") { const int* constant = data.constant_override.getptr(p_name); if (constant) return *constant; @@ -946,12 +946,64 @@ int Control::get_constant(const StringName& p_name,const StringName& p_type) con } +bool Control::has_icon_override(const StringName& p_name) const { + + const Ref<Texture>* tex = data.icon_override.getptr(p_name); + if (tex) + return true; + else + return false; +} + +bool Control::has_shader_override(const StringName &p_name) const { + + const Ref<Shader>* sdr = data.shader_override.getptr(p_name); + if (sdr) + return true; + else + return false; +} + +bool Control::has_stylebox_override(const StringName& p_name) const { + + const Ref<StyleBox>* style = data.style_override.getptr(p_name); + if (style) + return true; + else + return false; +} + +bool Control::has_font_override(const StringName& p_name) const { + + const Ref<Font>* font = data.font_override.getptr(p_name); + if (font) + return true; + else + return false; +} + +bool Control::has_color_override(const StringName& p_name) const { + + const Color* color = data.color_override.getptr(p_name); + if (color) + return true; + else + return false; +} + +bool Control::has_constant_override(const StringName& p_name) const { + + const int* constant = data.constant_override.getptr(p_name); + if (constant) + return true; + else + return false; +} bool Control::has_icon(const StringName& p_name,const StringName& p_type) const { - if (p_type==StringName()) { - const Ref<Texture>* tex = data.icon_override.getptr(p_name); - if (tex) + if (p_type==StringName() || p_type=="") { + if (has_icon_override(p_name) == true) return true; } @@ -977,11 +1029,10 @@ bool Control::has_icon(const StringName& p_name,const StringName& p_type) const } -bool Control::has_shader(const StringName &p_name, const StringName &p_type) const -{ - if (p_type==StringName()) { - const Ref<Shader>* sdr = data.shader_override.getptr(p_name); - if (sdr) +bool Control::has_shader(const StringName &p_name, const StringName &p_type) const { + + if (p_type==StringName() || p_type=="") { + if (has_shader_override(p_name)==true) return true; } @@ -1008,10 +1059,8 @@ bool Control::has_shader(const StringName &p_name, const StringName &p_type) con } bool Control::has_stylebox(const StringName& p_name,const StringName& p_type) const { - if (p_type==StringName()) { - const Ref<StyleBox>* style = data.style_override.getptr(p_name); - - if (style) + if (p_type==StringName() || p_type=="") { + if (has_stylebox_override(p_name)==true) return true; } @@ -1038,9 +1087,8 @@ bool Control::has_stylebox(const StringName& p_name,const StringName& p_type) co } bool Control::has_font(const StringName& p_name,const StringName& p_type) const { - if (p_type==StringName()) { - const Ref<Font>* font = data.font_override.getptr(p_name); - if (font) + if (p_type==StringName() || p_type=="") { + if (has_font_override(p_name)==true) return true; } @@ -1066,11 +1114,11 @@ bool Control::has_font(const StringName& p_name,const StringName& p_type) const return Theme::get_default()->has_font( p_name, type ); } -bool Control::has_color(const StringName& p_name,const StringName& p_type) const { - if (p_type==StringName()) { - const Color* color = data.color_override.getptr(p_name); - if (color) +bool Control::has_color(const StringName& p_name, const StringName& p_type) const { + + if (p_type==StringName() || p_type=="") { + if (has_color_override(p_name)==true) return true; } @@ -1098,10 +1146,8 @@ bool Control::has_color(const StringName& p_name,const StringName& p_type) const bool Control::has_constant(const StringName& p_name,const StringName& p_type) const { - if (p_type==StringName()) { - - const int* constant = data.constant_override.getptr(p_name); - if (constant) + if (p_type==StringName() || p_type=="") { + if (has_constant_override(p_name) == true) return true; } @@ -2297,6 +2343,17 @@ void Control::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_color","name","type"),&Control::get_color,DEFVAL("")); ObjectTypeDB::bind_method(_MD("get_constant","name","type"),&Control::get_constant,DEFVAL("")); + ObjectTypeDB::bind_method(_MD("has_icon_override", "name"), &Control::has_icon_override); + ObjectTypeDB::bind_method(_MD("has_stylebox_override", "name"), &Control::has_stylebox_override); + ObjectTypeDB::bind_method(_MD("has_font_override", "name"), &Control::has_font_override); + ObjectTypeDB::bind_method(_MD("has_color_override", "name"), &Control::has_color_override); + ObjectTypeDB::bind_method(_MD("has_constant_override", "name"), &Control::has_constant_override); + + ObjectTypeDB::bind_method(_MD("has_icon", "name", "type"), &Control::has_icon, DEFVAL("")); + ObjectTypeDB::bind_method(_MD("has_stylebox", "name", "type"), &Control::has_stylebox, DEFVAL("")); + ObjectTypeDB::bind_method(_MD("has_font", "name", "type"), &Control::has_font, DEFVAL("")); + ObjectTypeDB::bind_method(_MD("has_color", "name", "type"), &Control::has_color, DEFVAL("")); + ObjectTypeDB::bind_method(_MD("has_constant", "name", "type"), &Control::has_constant, DEFVAL("")); ObjectTypeDB::bind_method(_MD("get_parent_control:Control"),&Control::get_parent_control); @@ -2326,6 +2383,7 @@ void Control::_bind_methods() { ObjectTypeDB::bind_method(_MD("warp_mouse","to_pos"),&Control::warp_mouse); + ObjectTypeDB::bind_method(_MD("minimum_size_changed"), &Control::minimum_size_changed); BIND_VMETHOD(MethodInfo("_input_event",PropertyInfo(Variant::INPUT_EVENT,"event"))); BIND_VMETHOD(MethodInfo(Variant::VECTOR2,"get_minimum_size")); diff --git a/scene/gui/control.h b/scene/gui/control.h index d77ba27f60..59704ae29b 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -341,6 +341,13 @@ public: Color get_color(const StringName& p_name,const StringName& p_type=StringName()) const; int get_constant(const StringName& p_name,const StringName& p_type=StringName()) const; + bool has_icon_override(const StringName& p_name) const; + bool has_shader_override(const StringName& p_name) const; + bool has_stylebox_override(const StringName& p_name) const; + bool has_font_override(const StringName& p_name) const; + bool has_color_override(const StringName& p_name) const; + bool has_constant_override(const StringName& p_name) const; + bool has_icon(const StringName& p_name,const StringName& p_type=StringName()) const; bool has_shader(const StringName& p_name,const StringName& p_type=StringName()) const; bool has_stylebox(const StringName& p_name,const StringName& p_type=StringName()) const; diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index 8652aab649..09c6a77b42 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -488,9 +488,9 @@ void Label::regenerate_word_cache() { if (!autowrap) { minsize.width=width; if (max_lines_visible > 0 && line_count > max_lines_visible) { - minsize.height=(font->get_height() * max_lines_visible) + (line_spacing * (max_lines_visible - 1)); + minsize.height=(font->get_height()+line_spacing)*max_lines_visible; } else { - minsize.height=(font->get_height() * line_count)+(line_spacing * (line_count - 1)); + minsize.height=(font->get_height()+line_spacing)*line_count; } } diff --git a/scene/gui/patch_9_frame.cpp b/scene/gui/patch_9_frame.cpp index b6e261714c..3ecee7328b 100644 --- a/scene/gui/patch_9_frame.cpp +++ b/scene/gui/patch_9_frame.cpp @@ -9,10 +9,9 @@ void Patch9Frame::_notification(int p_what) { if (texture.is_null()) return; - Size2 s=get_size(); RID ci = get_canvas_item(); - VS::get_singleton()->canvas_item_add_style_box(ci,Rect2(Point2(),s),texture->get_rid(),Vector2(margin[MARGIN_LEFT],margin[MARGIN_TOP]),Vector2(margin[MARGIN_RIGHT],margin[MARGIN_BOTTOM]),draw_center,modulate); + VS::get_singleton()->canvas_item_add_style_box(ci,Rect2(Point2(),s),region_rect,texture->get_rid(),Vector2(margin[MARGIN_LEFT],margin[MARGIN_TOP]),Vector2(margin[MARGIN_RIGHT],margin[MARGIN_BOTTOM]),draw_center,modulate); // draw_texture_rect(texture,Rect2(Point2(),s),false,modulate); /* @@ -47,12 +46,15 @@ void Patch9Frame::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_modulate"), & Patch9Frame::get_modulate ); ObjectTypeDB::bind_method(_MD("set_patch_margin","margin","value"), & Patch9Frame::set_patch_margin ); ObjectTypeDB::bind_method(_MD("get_patch_margin","margin"), & Patch9Frame::get_patch_margin ); + ObjectTypeDB::bind_method(_MD("set_region_rect","rect"),&Patch9Frame::set_region_rect); + ObjectTypeDB::bind_method(_MD("get_region_rect"),&Patch9Frame::get_region_rect); ObjectTypeDB::bind_method(_MD("set_draw_center","draw_center"), & Patch9Frame::set_draw_center ); ObjectTypeDB::bind_method(_MD("get_draw_center"), & Patch9Frame::get_draw_center ); ADD_PROPERTYNZ( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), _SCS("set_texture"),_SCS("get_texture") ); ADD_PROPERTYNO( PropertyInfo( Variant::COLOR, "modulate"), _SCS("set_modulate"),_SCS("get_modulate") ); ADD_PROPERTYNO( PropertyInfo( Variant::BOOL, "draw_center"), _SCS("set_draw_center"),_SCS("get_draw_center") ); + ADD_PROPERTYNZ( PropertyInfo( Variant::RECT2, "region_rect"), _SCS("set_region_rect"),_SCS("get_region_rect")); ADD_PROPERTYINZ( PropertyInfo( Variant::INT, "patch_margin/left",PROPERTY_HINT_RANGE,"0,16384,1"), _SCS("set_patch_margin"),_SCS("get_patch_margin"),MARGIN_LEFT ); ADD_PROPERTYINZ( PropertyInfo( Variant::INT, "patch_margin/top",PROPERTY_HINT_RANGE,"0,16384,1"), _SCS("set_patch_margin"),_SCS("get_patch_margin"),MARGIN_TOP ); ADD_PROPERTYINZ( PropertyInfo( Variant::INT, "patch_margin/right",PROPERTY_HINT_RANGE,"0,16384,1"), _SCS("set_patch_margin"),_SCS("get_patch_margin"),MARGIN_RIGHT ); @@ -93,6 +95,20 @@ void Patch9Frame::set_patch_margin(Margin p_margin,int p_size) { margin[p_margin]=p_size; update(); minimum_size_changed(); + switch (p_margin) { + case MARGIN_LEFT: + _change_notify("patch_margin/left"); + break; + case MARGIN_TOP: + _change_notify("patch_margin/top"); + break; + case MARGIN_RIGHT: + _change_notify("patch_margin/right"); + break; + case MARGIN_BOTTOM: + _change_notify("patch_margin/bottom"); + break; + } } int Patch9Frame::get_patch_margin(Margin p_margin) const{ @@ -101,6 +117,22 @@ int Patch9Frame::get_patch_margin(Margin p_margin) const{ return margin[p_margin]; } +void Patch9Frame::set_region_rect(const Rect2& p_region_rect) { + + if (region_rect==p_region_rect) + return; + + region_rect=p_region_rect; + + item_rect_changed(); + _change_notify("region_rect"); +} + +Rect2 Patch9Frame::get_region_rect() const { + + return region_rect; +} + void Patch9Frame::set_draw_center(bool p_draw) { draw_center=p_draw; @@ -128,5 +160,3 @@ Patch9Frame::Patch9Frame() { Patch9Frame::~Patch9Frame() { } - - diff --git a/scene/gui/patch_9_frame.h b/scene/gui/patch_9_frame.h index 562a5b1d77..52e2324c3d 100644 --- a/scene/gui/patch_9_frame.h +++ b/scene/gui/patch_9_frame.h @@ -11,6 +11,7 @@ class Patch9Frame : public Control { bool draw_center; int margin[4]; + Rect2 region_rect; Color modulate; Ref<Texture> texture; protected: @@ -30,6 +31,9 @@ public: void set_patch_margin(Margin p_margin,int p_size); int get_patch_margin(Margin p_margin) const; + void set_region_rect(const Rect2& p_region_rect); + Rect2 get_region_rect() const; + void set_draw_center(bool p_enable); bool get_draw_center() const; diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp index c8bd1cb5a1..d19e5f0d60 100644 --- a/scene/gui/tab_container.cpp +++ b/scene/gui/tab_container.cpp @@ -411,7 +411,6 @@ void TabContainer::_notification(int p_what) { panel->draw(ci, Rect2( 0, top_size.height, size.width, size.height-top_size.height)); } break; - case NOTIFICATION_READY: case NOTIFICATION_THEME_CHANGED: { call_deferred("set_current_tab",get_current_tab()); //wait until all changed theme diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 313be88526..4083dc893d 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -37,6 +37,7 @@ #include "servers/spatial_sound_2d_server.h" #include "scene/gui/control.h" #include "scene/3d/camera.h" +#include "scene/3d/listener.h" #include "scene/resources/mesh.h" #include "scene/3d/spatial_indexer.h" #include "scene/3d/collision_object.h" @@ -388,6 +389,19 @@ void Viewport::_notification(int p_what) { } break; case NOTIFICATION_READY: { #ifndef _3D_DISABLED + if (listeners.size() && !listener) { + Listener *first=NULL; + for(Set<Listener*>::Element *E=listeners.front();E;E=E->next()) { + + if (first==NULL || first->is_greater_than(E->get())) { + first=E->get(); + } + } + + if (first) + first->make_current(); + } + if (cameras.size() && !camera) { //there are cameras but no current camera, pick first in tree and make it current Camera *first=NULL; @@ -414,7 +428,7 @@ void Viewport::_notification(int p_what) { _vp_exit_tree(); VisualServer::get_singleton()->viewport_set_scenario(viewport,RID()); - SpatialSoundServer::get_singleton()->listener_set_space(listener,RID()); + SpatialSoundServer::get_singleton()->listener_set_space(internal_listener, RID()); VisualServer::get_singleton()->viewport_remove_canvas(viewport,current_canvas); if (contact_2d_debug.is_valid()) { VisualServer::get_singleton()->free(contact_2d_debug); @@ -740,10 +754,10 @@ Rect2 Viewport::get_rect() const { void Viewport::_update_listener() { - if (is_inside_tree() && audio_listener && camera && (!get_parent() || (get_parent()->cast_to<Control>() && get_parent()->cast_to<Control>()->is_visible()))) { - SpatialSoundServer::get_singleton()->listener_set_space(listener,find_world()->get_sound_space()); + if (is_inside_tree() && audio_listener && (camera || listener) && (!get_parent() || (get_parent()->cast_to<Control>() && get_parent()->cast_to<Control>()->is_visible()))) { + SpatialSoundServer::get_singleton()->listener_set_space(internal_listener, find_world()->get_sound_space()); } else { - SpatialSoundServer::get_singleton()->listener_set_space(listener,RID()); + SpatialSoundServer::get_singleton()->listener_set_space(internal_listener, RID()); } @@ -752,9 +766,9 @@ void Viewport::_update_listener() { void Viewport::_update_listener_2d() { if (is_inside_tree() && audio_listener && (!get_parent() || (get_parent()->cast_to<Control>() && get_parent()->cast_to<Control>()->is_visible()))) - SpatialSound2DServer::get_singleton()->listener_set_space(listener_2d,find_world_2d()->get_sound_space()); + SpatialSound2DServer::get_singleton()->listener_set_space(internal_listener_2d, find_world_2d()->get_sound_space()); else - SpatialSound2DServer::get_singleton()->listener_set_space(listener_2d,RID()); + SpatialSound2DServer::get_singleton()->listener_set_space(internal_listener_2d, RID()); } @@ -798,11 +812,11 @@ void Viewport::set_canvas_transform(const Matrix32& p_transform) { Matrix32 xform = (global_canvas_transform * canvas_transform).affine_inverse(); Size2 ss = get_visible_rect().size; - SpatialSound2DServer::get_singleton()->listener_set_transform(listener_2d,Matrix32(0,xform.xform(ss*0.5))); + SpatialSound2DServer::get_singleton()->listener_set_transform(internal_listener_2d, Matrix32(0, xform.xform(ss*0.5))); Vector2 ss2 = ss*xform.get_scale(); float panrange = MAX(ss2.x,ss2.y); - SpatialSound2DServer::get_singleton()->listener_set_param(listener_2d,SpatialSound2DServer::LISTENER_PARAM_PAN_RANGE,panrange); + SpatialSound2DServer::get_singleton()->listener_set_param(internal_listener_2d, SpatialSound2DServer::LISTENER_PARAM_PAN_RANGE, panrange); } @@ -823,11 +837,11 @@ void Viewport::_update_global_transform() { Matrix32 xform = (sxform * canvas_transform).affine_inverse(); Size2 ss = get_visible_rect().size; - SpatialSound2DServer::get_singleton()->listener_set_transform(listener_2d,Matrix32(0,xform.xform(ss*0.5))); + SpatialSound2DServer::get_singleton()->listener_set_transform(internal_listener_2d, Matrix32(0, xform.xform(ss*0.5))); Vector2 ss2 = ss*xform.get_scale(); float panrange = MAX(ss2.x,ss2.y); - SpatialSound2DServer::get_singleton()->listener_set_param(listener_2d,SpatialSound2DServer::LISTENER_PARAM_PAN_RANGE,panrange); + SpatialSound2DServer::get_singleton()->listener_set_param(internal_listener_2d, SpatialSound2DServer::LISTENER_PARAM_PAN_RANGE, panrange); } @@ -846,12 +860,75 @@ Matrix32 Viewport::get_global_canvas_transform() const{ return global_canvas_transform; } +void Viewport::_listener_transform_changed_notify() { + +#ifndef _3D_DISABLED + if (listener) + SpatialSoundServer::get_singleton()->listener_set_transform(internal_listener, listener->get_listener_transform()); +#endif +} + +void Viewport::_listener_set(Listener* p_listener) { + +#ifndef _3D_DISABLED + + if (listener == p_listener) + return; + + listener = p_listener; + + _update_listener(); + _listener_transform_changed_notify(); +#endif +} + +bool Viewport::_listener_add(Listener* p_listener) { + + listeners.insert(p_listener); + return listeners.size() == 1; +} + +void Viewport::_listener_remove(Listener* p_listener) { + + listeners.erase(p_listener); + if (listener == p_listener) { + listener = NULL; + } +} + +#ifndef _3D_DISABLED +void Viewport::_listener_make_next_current(Listener* p_exclude) { + + if (listeners.size() > 0) { + for (Set<Listener*>::Element *E = listeners.front(); E; E = E->next()) { + + if (p_exclude == E->get()) + continue; + if (!E->get()->is_inside_tree()) + continue; + if (listener != NULL) + return; + + E->get()->make_current(); + + } + } + else { + // Attempt to reset listener to the camera position + if (camera != NULL) { + _update_listener(); + _camera_transform_changed_notify(); + } + } +} +#endif void Viewport::_camera_transform_changed_notify() { #ifndef _3D_DISABLED - if (camera) - SpatialSoundServer::get_singleton()->listener_set_transform(listener,camera->get_camera_transform()); + // If there is an active listener in the scene, it takes priority over the camera + if (camera && !listener) + SpatialSoundServer::get_singleton()->listener_set_transform(internal_listener, camera->get_camera_transform()); #endif } @@ -1076,6 +1153,11 @@ Ref<World> Viewport::find_world() const{ return Ref<World>(); } +Listener* Viewport::get_listener() const { + + return listener; +} + Camera* Viewport::get_camera() const { return camera; @@ -1492,22 +1574,29 @@ void Viewport::_gui_call_input(Control *p_control,const InputEvent& p_input) { // _block(); - while(p_control) { + CanvasItem *ci=p_control; + while(ci) { - p_control->call_multilevel(SceneStringNames::get_singleton()->_input_event,p_input); - if (gui.key_event_accepted) - break; - if (!p_control->is_inside_tree()) - break; - p_control->emit_signal(SceneStringNames::get_singleton()->input_event,p_input); - if (!p_control->is_inside_tree() || p_control->is_set_as_toplevel()) { - break; + Control *control = ci->cast_to<Control>(); + if (control) { + control->call_multilevel(SceneStringNames::get_singleton()->_input_event,p_input); + if (gui.key_event_accepted) + break; + if (!control->is_inside_tree()) + break; + control->emit_signal(SceneStringNames::get_singleton()->input_event,p_input); + if (!control->is_inside_tree() || control->is_set_as_toplevel()) + break; + if (gui.key_event_accepted) + break; + if (control->data.stop_mouse && (p_input.type==InputEvent::MOUSE_BUTTON || p_input.type==InputEvent::MOUSE_MOTION)) + break; } - if (gui.key_event_accepted) - break; - if (p_control->data.stop_mouse && (p_input.type==InputEvent::MOUSE_BUTTON || p_input.type==InputEvent::MOUSE_MOTION)) + + if (ci->is_set_as_toplevel()) break; - p_control=p_control->data.parent; + + ci=ci->get_parent_item(); } //_unblock(); @@ -2539,12 +2628,13 @@ Viewport::Viewport() { world_2d = Ref<World2D>( memnew( World2D )); viewport = VisualServer::get_singleton()->viewport_create(); - listener=SpatialSoundServer::get_singleton()->listener_create(); + internal_listener = SpatialSoundServer::get_singleton()->listener_create(); audio_listener=false; - listener_2d=SpatialSound2DServer::get_singleton()->listener_create(); + internal_listener_2d = SpatialSound2DServer::get_singleton()->listener_create(); audio_listener_2d=false; transparent_bg=false; parent=NULL; + listener=NULL; camera=NULL; size_override=false; size_override_stretch=false; @@ -2592,8 +2682,8 @@ Viewport::Viewport() { Viewport::~Viewport() { VisualServer::get_singleton()->free( viewport ); - SpatialSoundServer::get_singleton()->free(listener); - SpatialSound2DServer::get_singleton()->free(listener_2d); + SpatialSoundServer::get_singleton()->free(internal_listener); + SpatialSound2DServer::get_singleton()->free(internal_listener_2d); if (render_target_texture.is_valid()) render_target_texture->vp=NULL; //so if used, will crash } diff --git a/scene/main/viewport.h b/scene/main/viewport.h index 6ae9e421eb..545020dfc7 100644 --- a/scene/main/viewport.h +++ b/scene/main/viewport.h @@ -39,6 +39,7 @@ */ class Camera; +class Listener; class Control; class CanvasItem; class Panel; @@ -92,6 +93,9 @@ friend class RenderTargetTexture; Control *parent_control; Viewport *parent; + Listener *listener; + Set<Listener*> listeners; + Camera *camera; Set<Camera*> cameras; @@ -100,10 +104,10 @@ friend class RenderTargetTexture; RID current_canvas; bool audio_listener; - RID listener; + RID internal_listener; bool audio_listener_2d; - RID listener_2d; + RID internal_listener_2d; Matrix32 canvas_transform; Matrix32 global_canvas_transform; @@ -263,6 +267,13 @@ friend class Control; Control *_gui_get_focus_owner(); +friend class Listener; + void _listener_transform_changed_notify(); + void _listener_set(Listener* p_listener); + bool _listener_add(Listener* p_listener); //true if first + void _listener_remove(Listener* p_listener); + void _listener_make_next_current(Listener* p_exclude); + friend class Camera; void _camera_transform_changed_notify(); void _camera_set(Camera* p_camera); @@ -276,7 +287,7 @@ protected: static void _bind_methods(); public: - + Listener* get_listener() const; Camera* get_camera() const; void set_as_audio_listener(bool p_enable); diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index ed38379ca9..54b4ddca9e 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -193,6 +193,7 @@ #ifndef _3D_DISABLED #include "scene/3d/camera.h" +#include "scene/3d/listener.h" #include "scene/3d/interpolated_camera.h" #include "scene/3d/position_3d.h" @@ -387,6 +388,7 @@ void register_scene_types() { ObjectTypeDB::register_type<BoneAttachment>(); ObjectTypeDB::register_virtual_type<VisualInstance>(); ObjectTypeDB::register_type<Camera>(); + ObjectTypeDB::register_type<Listener>(); ObjectTypeDB::register_type<InterpolatedCamera>(); ObjectTypeDB::register_type<TestCube>(); ObjectTypeDB::register_type<MeshInstance>(); diff --git a/scene/resources/bit_mask.h b/scene/resources/bit_mask.h index b245ea1542..e75a2aa332 100644 --- a/scene/resources/bit_mask.h +++ b/scene/resources/bit_mask.h @@ -36,6 +36,8 @@ class BitMap : public Resource { OBJ_TYPE(BitMap,Resource); + OBJ_SAVE_TYPE(BitMap); + RES_BASE_EXTENSION("pbm"); Vector<uint8_t> bitmask; int width; diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index 75e38f9701..a61ffe8e97 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -138,7 +138,7 @@ void StyleBoxTexture::draw(RID p_canvas_item,const Rect2& p_rect) const { r.pos.y-=expand_margin[MARGIN_TOP]; r.size.x+=expand_margin[MARGIN_LEFT]+expand_margin[MARGIN_RIGHT]; r.size.y+=expand_margin[MARGIN_TOP]+expand_margin[MARGIN_BOTTOM]; - VisualServer::get_singleton()->canvas_item_add_style_box( p_canvas_item,r,texture->get_rid(),Vector2(margin[MARGIN_LEFT],margin[MARGIN_TOP]),Vector2(margin[MARGIN_RIGHT],margin[MARGIN_BOTTOM]),draw_center); + VisualServer::get_singleton()->canvas_item_add_style_box( p_canvas_item,r,region_rect,texture->get_rid(),Vector2(margin[MARGIN_LEFT],margin[MARGIN_TOP]),Vector2(margin[MARGIN_RIGHT],margin[MARGIN_BOTTOM]),draw_center); } void StyleBoxTexture::set_draw_center(bool p_draw) { @@ -175,6 +175,20 @@ float StyleBoxTexture::get_expand_margin_size(Margin p_expand_margin) const { return expand_margin[p_expand_margin]; } +void StyleBoxTexture::set_region_rect(const Rect2& p_region_rect) { + + if (region_rect==p_region_rect) + return; + + region_rect=p_region_rect; + emit_changed(); +} + +Rect2 StyleBoxTexture::get_region_rect() const { + + return region_rect; +} + void StyleBoxTexture::_bind_methods() { @@ -187,10 +201,14 @@ void StyleBoxTexture::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_expand_margin_size","margin","size"),&StyleBoxTexture::set_expand_margin_size); ObjectTypeDB::bind_method(_MD("get_expand_margin_size","margin"),&StyleBoxTexture::get_expand_margin_size); + ObjectTypeDB::bind_method(_MD("set_region_rect","region"),&StyleBoxTexture::set_region_rect); + ObjectTypeDB::bind_method(_MD("get_region_rect"),&StyleBoxTexture::get_region_rect); + ObjectTypeDB::bind_method(_MD("set_draw_center","enable"),&StyleBoxTexture::set_draw_center); ObjectTypeDB::bind_method(_MD("get_draw_center"),&StyleBoxTexture::get_draw_center); ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture" ), _SCS("set_texture"),_SCS("get_texture") ); + ADD_PROPERTYNZ( PropertyInfo( Variant::RECT2, "region_rect"), _SCS("set_region_rect"),_SCS("get_region_rect")); ADD_PROPERTYI( PropertyInfo( Variant::REAL, "margin/left", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_margin_size"),_SCS("get_margin_size"), MARGIN_LEFT ); ADD_PROPERTYI( PropertyInfo( Variant::REAL, "margin/right", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_margin_size"),_SCS("get_margin_size"), MARGIN_RIGHT ); ADD_PROPERTYI( PropertyInfo( Variant::REAL, "margin/top", PROPERTY_HINT_RANGE,"0,2048,1" ), _SCS("set_margin_size"),_SCS("get_margin_size"), MARGIN_TOP); @@ -505,4 +523,3 @@ StyleBoxImageMask::StyleBoxImageMask() { } expand=true; } - diff --git a/scene/resources/style_box.h b/scene/resources/style_box.h index 02d79bc2ac..98aaee754b 100644 --- a/scene/resources/style_box.h +++ b/scene/resources/style_box.h @@ -81,6 +81,7 @@ class StyleBoxTexture : public StyleBox { float expand_margin[4]; float margin[4]; + Rect2 region_rect; Ref<Texture> texture; bool draw_center; @@ -98,6 +99,9 @@ public: void set_margin_size(Margin p_margin,float p_size); float get_margin_size(Margin p_margin) const; + void set_region_rect(const Rect2& p_region_rect); + Rect2 get_region_rect() const; + void set_texture(RES p_texture); RES get_texture() const; diff --git a/servers/server_wrap_mt_common.h b/servers/server_wrap_mt_common.h index cbb75129d0..149e9ec4f9 100644 --- a/servers/server_wrap_mt_common.h +++ b/servers/server_wrap_mt_common.h @@ -698,3 +698,64 @@ }\ } +#define FUNC8R(m_r,m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8)\ + virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) { \ + if (Thread::get_caller_ID()!=server_thread) {\ + m_r ret;\ + command_queue.push_and_ret( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6, p7, p8, &ret);\ + SYNC_DEBUG\ + return ret;\ + } else {\ + return server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8);\ + }\ + } + +#define FUNC8RC(m_r,m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8)\ + virtual m_r m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) const { \ + if (Thread::get_caller_ID()!=server_thread) {\ + m_r ret;\ + command_queue.push_and_ret( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6, p7, p8, &ret);\ + SYNC_DEBUG\ + return ret;\ + } else {\ + return server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8);\ + }\ + } + + +#define FUNC8S(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8)\ + virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) { \ + if (Thread::get_caller_ID()!=server_thread) {\ + command_queue.push_and_sync( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6, p7, p8);\ + } else {\ + server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8);\ + }\ + } + +#define FUNC8SC(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8)\ + virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) const { \ + if (Thread::get_caller_ID()!=server_thread) {\ + command_queue.push_and_sync( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6, p7, p8);\ + } else {\ + server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8);\ + }\ + } + + +#define FUNC8(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8)\ + virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) { \ + if (Thread::get_caller_ID()!=server_thread) {\ + command_queue.push( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6, p7, p8);\ + } else {\ + server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8);\ + }\ + } + +#define FUNC8C(m_type,m_arg1, m_arg2, m_arg3, m_arg4, m_arg5, m_arg6, m_arg7, m_arg8)\ + virtual void m_type(m_arg1 p1, m_arg2 p2, m_arg3 p3, m_arg4 p4, m_arg5 p5, m_arg6 p6, m_arg7 p7, m_arg8 p8) const { \ + if (Thread::get_caller_ID()!=server_thread) {\ + command_queue.push( server_name, &ServerName::m_type,p1, p2, p3, p4, p5, p6, p7, p8);\ + } else {\ + server_name->m_type(p1, p2, p3, p4, p5, p6, p7, p8);\ + }\ + } diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h index f1ad685879..50ec6792cc 100644 --- a/servers/visual/rasterizer.h +++ b/servers/visual/rasterizer.h @@ -702,6 +702,7 @@ public: struct CommandStyle : public Command { Rect2 rect; + Rect2 source; RID texture; float margin[4]; bool draw_center; @@ -944,12 +945,12 @@ public: virtual void canvas_disable_blending()=0; virtual void canvas_set_opacity(float p_opacity)=0; virtual void canvas_set_blend_mode(VS::MaterialBlendMode p_mode)=0; - virtual void canvas_begin_rect(const Matrix32& p_transform)=0;; + virtual void canvas_begin_rect(const Matrix32& p_transform)=0; virtual void canvas_set_clip(bool p_clip, const Rect2& p_rect)=0; virtual void canvas_end_rect()=0; virtual void canvas_draw_line(const Point2& p_from, const Point2& p_to,const Color& p_color,float p_width)=0; virtual void canvas_draw_rect(const Rect2& p_rect, int p_flags, const Rect2& p_source,RID p_texture,const Color& p_modulate)=0; - virtual void canvas_draw_style_box(const Rect2& p_rect, RID p_texture,const float *p_margins, bool p_draw_center=true,const Color& p_modulate=Color(1,1,1))=0; + virtual void canvas_draw_style_box(const Rect2& p_rect, const Rect2& p_src_region, RID p_texture,const float *p_margins, bool p_draw_center=true,const Color& p_modulate=Color(1,1,1))=0; virtual void canvas_draw_primitive(const Vector<Point2>& p_points, const Vector<Color>& p_colors,const Vector<Point2>& p_uvs, RID p_texture,float p_width)=0; virtual void canvas_draw_polygon(int p_vertex_count, const int* p_indices, const Vector2* p_vertices, const Vector2* p_uvs, const Color* p_colors,const RID& p_texture,bool p_singlecolor)=0; virtual void canvas_set_transform(const Matrix32& p_transform)=0; diff --git a/servers/visual/rasterizer_dummy.cpp b/servers/visual/rasterizer_dummy.cpp index 3b12b503dd..0e71d224d5 100644 --- a/servers/visual/rasterizer_dummy.cpp +++ b/servers/visual/rasterizer_dummy.cpp @@ -1627,7 +1627,7 @@ void RasterizerDummy::canvas_draw_rect(const Rect2& p_rect, int p_flags, const R } -void RasterizerDummy::canvas_draw_style_box(const Rect2& p_rect, RID p_texture,const float *p_margin, bool p_draw_center,const Color& p_modulate) { +void RasterizerDummy::canvas_draw_style_box(const Rect2& p_rect, const Rect2& p_src_region, RID p_texture,const float *p_margin, bool p_draw_center,const Color& p_modulate) { } @@ -1959,4 +1959,3 @@ RasterizerDummy::RasterizerDummy() { RasterizerDummy::~RasterizerDummy() { }; - diff --git a/servers/visual/rasterizer_dummy.h b/servers/visual/rasterizer_dummy.h index 674c165966..ac320e55f9 100644 --- a/servers/visual/rasterizer_dummy.h +++ b/servers/visual/rasterizer_dummy.h @@ -708,7 +708,7 @@ public: virtual void canvas_end_rect(); virtual void canvas_draw_line(const Point2& p_from, const Point2& p_to,const Color& p_color,float p_width); virtual void canvas_draw_rect(const Rect2& p_rect, int p_flags, const Rect2& p_source,RID p_texture,const Color& p_modulate); - virtual void canvas_draw_style_box(const Rect2& p_rect, RID p_texture,const float *p_margins, bool p_draw_center=true,const Color& p_modulate=Color(1,1,1)); + virtual void canvas_draw_style_box(const Rect2& p_rect, const Rect2& p_src_region, RID p_texture,const float *p_margins, bool p_draw_center=true,const Color& p_modulate=Color(1,1,1)); virtual void canvas_draw_primitive(const Vector<Point2>& p_points, const Vector<Color>& p_colors,const Vector<Point2>& p_uvs, RID p_texture,float p_width); virtual void canvas_draw_polygon(int p_vertex_count, const int* p_indices, const Vector2* p_vertices, const Vector2* p_uvs, const Color* p_colors,const RID& p_texture,bool p_singlecolor); virtual void canvas_set_transform(const Matrix32& p_transform); diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index b3721268bf..532247d94c 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -3745,7 +3745,7 @@ void VisualServerRaster::canvas_item_add_texture_rect_region(RID p_item, const R } -void VisualServerRaster::canvas_item_add_style_box(RID p_item, const Rect2& p_rect, RID p_texture,const Vector2& p_topleft, const Vector2& p_bottomright, bool p_draw_center,const Color& p_modulate) { +void VisualServerRaster::canvas_item_add_style_box(RID p_item, const Rect2& p_rect, const Rect2& p_source, RID p_texture, const Vector2& p_topleft, const Vector2& p_bottomright, bool p_draw_center,const Color& p_modulate) { VS_CHANGED; CanvasItem *canvas_item = canvas_item_owner.get( p_item ); @@ -3755,6 +3755,7 @@ void VisualServerRaster::canvas_item_add_style_box(RID p_item, const Rect2& p_re ERR_FAIL_COND(!style); style->texture=p_texture; style->rect=p_rect; + style->source=p_source; style->draw_center=p_draw_center; style->color=p_modulate; style->margin[MARGIN_LEFT]=p_topleft.x; diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index 39ea2f55e6..dcaac6e8d2 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -1171,7 +1171,7 @@ public: virtual void canvas_item_add_circle(RID p_item, const Point2& p_pos, float p_radius,const Color& p_color); virtual void canvas_item_add_texture_rect(RID p_item, const Rect2& p_rect, RID p_texture,bool p_tile=false,const Color& p_modulate=Color(1,1,1),bool p_transpose=false); virtual void canvas_item_add_texture_rect_region(RID p_item, const Rect2& p_rect, RID p_texture,const Rect2& p_src_rect,const Color& p_modulate=Color(1,1,1),bool p_transpose=false); - virtual void canvas_item_add_style_box(RID p_item, const Rect2& p_rect, RID p_texture,const Vector2& p_topleft, const Vector2& p_bottomright, bool p_draw_center=true,const Color& p_modulate=Color(1,1,1)); + virtual void canvas_item_add_style_box(RID p_item, const Rect2& p_rect, const Rect2& p_source, RID p_texture,const Vector2& p_topleft, const Vector2& p_bottomright, bool p_draw_center=true,const Color& p_modulate=Color(1,1,1)); virtual void canvas_item_add_primitive(RID p_item, const Vector<Point2>& p_points, const Vector<Color>& p_colors,const Vector<Point2>& p_uvs, RID p_texture,float p_width=1.0); virtual void canvas_item_add_polygon(RID p_item, const Vector<Point2>& p_points, const Vector<Color>& p_colors,const Vector<Point2>& p_uvs=Vector<Point2>(), RID p_texture=RID()); virtual void canvas_item_add_triangle_array(RID p_item, const Vector<int>& p_indices, const Vector<Point2>& p_points, const Vector<Color>& p_colors,const Vector<Point2>& p_uvs=Vector<Point2>(), RID p_texture=RID(), int p_count=-1); diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h index 80cf43d572..a97b232c03 100644 --- a/servers/visual/visual_server_wrap_mt.h +++ b/servers/visual/visual_server_wrap_mt.h @@ -607,7 +607,7 @@ public: FUNC4(canvas_item_add_circle,RID, const Point2& , float ,const Color& ); FUNC6(canvas_item_add_texture_rect,RID, const Rect2& , RID ,bool ,const Color&,bool ); FUNC6(canvas_item_add_texture_rect_region,RID, const Rect2& , RID ,const Rect2& ,const Color&,bool ); - FUNC7(canvas_item_add_style_box,RID, const Rect2& , RID ,const Vector2& ,const Vector2&, bool ,const Color& ); + FUNC8(canvas_item_add_style_box,RID, const Rect2& , const Rect2&, RID ,const Vector2& ,const Vector2&, bool ,const Color& ); FUNC6(canvas_item_add_primitive,RID, const Vector<Point2>& , const Vector<Color>& ,const Vector<Point2>& , RID ,float ); FUNC5(canvas_item_add_polygon,RID, const Vector<Point2>& , const Vector<Color>& ,const Vector<Point2>& , RID ); FUNC7(canvas_item_add_triangle_array,RID, const Vector<int>& , const Vector<Point2>& , const Vector<Color>& ,const Vector<Point2>& , RID , int ); diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index 5ac0e5b5d5..570a5a6ee4 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -705,10 +705,10 @@ void VisualServer::_bind_methods() { } -void VisualServer::_canvas_item_add_style_box(RID p_item, const Rect2& p_rect, RID p_texture,const Vector<float>& p_margins, const Color& p_modulate) { +void VisualServer::_canvas_item_add_style_box(RID p_item, const Rect2& p_rect, const Rect2& p_source, RID p_texture,const Vector<float>& p_margins, const Color& p_modulate) { ERR_FAIL_COND(p_margins.size()!=4); - canvas_item_add_style_box(p_item, p_rect, p_texture,Vector2(p_margins[0],p_margins[1]),Vector2(p_margins[2],p_margins[3]),true,p_modulate); + canvas_item_add_style_box(p_item,p_rect,p_source,p_texture,Vector2(p_margins[0],p_margins[1]),Vector2(p_margins[2],p_margins[3]),true,p_modulate); } void VisualServer::_camera_set_orthogonal(RID p_camera,float p_size,float p_z_near,float p_z_far) { @@ -822,5 +822,3 @@ VisualServer::~VisualServer() { singleton=NULL; } - - diff --git a/servers/visual_server.h b/servers/visual_server.h index f32e976b57..f330a6faee 100644 --- a/servers/visual_server.h +++ b/servers/visual_server.h @@ -52,7 +52,7 @@ class VisualServer : public Object { void _camera_set_orthogonal(RID p_camera,float p_size,float p_z_near,float p_z_far); void _viewport_set_rect(RID p_viewport,const Rect2& p_rect); Rect2 _viewport_get_rect(RID p_viewport) const; - void _canvas_item_add_style_box(RID p_item, const Rect2& p_rect, RID p_texture,const Vector<float>& p_margins, const Color& p_modulate=Color(1,1,1)); + void _canvas_item_add_style_box(RID p_item, const Rect2& p_rect, const Rect2& p_source, RID p_texture,const Vector<float>& p_margins, const Color& p_modulate=Color(1,1,1)); protected: RID _make_test_cube(); void _free_internal_rids(); @@ -1025,7 +1025,7 @@ public: virtual void canvas_item_add_circle(RID p_item, const Point2& p_pos, float p_radius,const Color& p_color)=0; virtual void canvas_item_add_texture_rect(RID p_item, const Rect2& p_rect, RID p_texture,bool p_tile=false,const Color& p_modulate=Color(1,1,1),bool p_transpose=false)=0; virtual void canvas_item_add_texture_rect_region(RID p_item, const Rect2& p_rect, RID p_texture,const Rect2& p_src_rect,const Color& p_modulate=Color(1,1,1),bool p_transpose=false)=0; - virtual void canvas_item_add_style_box(RID p_item, const Rect2& p_rect, RID p_texture,const Vector2& p_topleft, const Vector2& p_bottomright, bool p_draw_center=true,const Color& p_modulate=Color(1,1,1))=0; + virtual void canvas_item_add_style_box(RID p_item, const Rect2& p_rect, const Rect2& p_source, RID p_texture,const Vector2& p_topleft, const Vector2& p_bottomright, bool p_draw_center=true,const Color& p_modulate=Color(1,1,1))=0; virtual void canvas_item_add_primitive(RID p_item, const Vector<Point2>& p_points, const Vector<Color>& p_colors,const Vector<Point2>& p_uvs, RID p_texture,float p_width=1.0)=0; virtual void canvas_item_add_polygon(RID p_item, const Vector<Point2>& p_points, const Vector<Color>& p_colors,const Vector<Point2>& p_uvs=Vector<Point2>(), RID p_texture=RID())=0; virtual void canvas_item_add_triangle_array(RID p_item, const Vector<int>& p_indices, const Vector<Point2>& p_points, const Vector<Color>& p_colors,const Vector<Point2>& p_uvs=Vector<Point2>(), RID p_texture=RID(), int p_count=-1)=0; diff --git a/tools/collada/collada.cpp b/tools/collada/collada.cpp index 8f40ec1469..f0fde20dfc 100644 --- a/tools/collada/collada.cpp +++ b/tools/collada/collada.cpp @@ -482,6 +482,24 @@ Transform Collada::_read_transform(XMLParser& parser) { return _read_transform_from_array(array); } +String Collada::_read_empty_draw_type(XMLParser& parser) { + + String empty_draw_type = ""; + + if (parser.is_empty()) + return empty_draw_type; + + while (parser.read()==OK) { + if (parser.get_node_type() == XMLParser::NODE_TEXT) { + empty_draw_type = parser.get_node_data(); + } + else + if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END) + break; // end parsing text + } + return empty_draw_type; +} + Variant Collada::_parse_param(XMLParser& parser) { if (parser.is_empty()) @@ -1664,6 +1682,8 @@ Collada::Node* Collada::_parse_visual_scene_node(XMLParser& parser) { Vector<Node::XForm> xform_list; Vector<Node*> children; + + String empty_draw_type=""; Node *node=NULL; @@ -1771,7 +1791,9 @@ Collada::Node* Collada::_parse_visual_scene_node(XMLParser& parser) { xform_list.push_back(xf); - } else if (section=="technique" || section=="extra") { + } else if (section=="empty_draw_type") { + empty_draw_type = _read_empty_draw_type(parser); + } else if (section == "technique" || section=="extra") { } else if (section!="node") { //usually what defines the type of node @@ -1817,6 +1839,7 @@ Collada::Node* Collada::_parse_visual_scene_node(XMLParser& parser) { node->name=name; node->id=id; + node->empty_draw_type=empty_draw_type; if (node->children.size()==1) { if (node->children[0]->noname && !node->noname) { diff --git a/tools/collada/collada.h b/tools/collada/collada.h index 8983b8faf0..01934a1e76 100644 --- a/tools/collada/collada.h +++ b/tools/collada/collada.h @@ -403,6 +403,7 @@ public: String name; String id; + String empty_draw_type; bool noname; Vector<XForm> xform_list; Transform default_transform; @@ -635,6 +636,7 @@ private: // private stuff Vector<float> _read_float_array(XMLParser& parser); Vector<String> _read_string_array(XMLParser& parser); Transform _read_transform(XMLParser& parser); + String _read_empty_draw_type(XMLParser& parser); void _joint_set_owner(Collada::Node *p_node, NodeSkeleton *p_owner); void _create_skeletons(Collada::Node **p_node, NodeSkeleton *p_skeleton=NULL); diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 72d5e496d9..01a6e3514c 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -59,7 +59,7 @@ // plugins #include "plugins/sprite_frames_editor_plugin.h" -#include "plugins/sprite_region_editor_plugin.h" +#include "plugins/texture_region_editor_plugin.h" #include "plugins/canvas_item_editor_plugin.h" #include "addon_editor_plugin.h" #include "plugins/spatial_editor_plugin.h" @@ -106,6 +106,7 @@ #include "tools/editor/io_plugins/editor_font_import_plugin.h" #include "tools/editor/io_plugins/editor_sample_import_plugin.h" #include "tools/editor/io_plugins/editor_translation_import_plugin.h" +#include "tools/editor/io_plugins/editor_bitmask_import_plugin.h" #include "tools/editor/io_plugins/editor_mesh_import_plugin.h" #include "tools/editor/io_plugins/editor_export_scene.h" @@ -5215,7 +5216,7 @@ void EditorNode::_bind_methods() { ADD_SIGNAL( MethodInfo("play_pressed") ); ADD_SIGNAL( MethodInfo("pause_pressed") ); ADD_SIGNAL( MethodInfo("stop_pressed") ); - ADD_SIGNAL( MethodInfo("request_help") ); + ADD_SIGNAL( MethodInfo("request_help") ); ADD_SIGNAL( MethodInfo("script_add_function_request",PropertyInfo(Variant::OBJECT,"obj"),PropertyInfo(Variant::STRING,"function"),PropertyInfo(Variant::STRING_ARRAY,"args")) ); ADD_SIGNAL( MethodInfo("resource_saved",PropertyInfo(Variant::OBJECT,"obj")) ); @@ -5256,6 +5257,19 @@ EditorNode::EditorNode() { // load settings if (!EditorSettings::get_singleton()) EditorSettings::create(); + { + int dpi_mode = EditorSettings::get_singleton()->get("global/hidpi_mode"); + print_line("DPI MODE: "+itos(dpi_mode)); + if (dpi_mode==0) { + editor_set_hidpi( OS::get_singleton()->get_screen_dpi(0) > 150 ); + } else if (dpi_mode==2) { + editor_set_hidpi(true); + } else { + editor_set_hidpi(false); + } + } + + ResourceLoader::set_abort_on_missing_resources(false); FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files")); @@ -6352,6 +6366,8 @@ EditorNode::EditorNode() { editor_import_export->add_import_plugin( Ref<EditorFontImportPlugin>( memnew(EditorFontImportPlugin(this)))); editor_import_export->add_import_plugin( Ref<EditorSampleImportPlugin>( memnew(EditorSampleImportPlugin(this)))); editor_import_export->add_import_plugin( Ref<EditorTranslationImportPlugin>( memnew(EditorTranslationImportPlugin(this)))); + editor_import_export->add_import_plugin( Ref<EditorBitMaskImportPlugin>( memnew(EditorBitMaskImportPlugin(this)))); + editor_import_export->add_export_plugin( Ref<EditorTextureExportPlugin>( memnew(EditorTextureExportPlugin))); editor_import_export->add_export_plugin( Ref<EditorSampleExportPlugin>( memnew(EditorSampleExportPlugin))); @@ -6391,7 +6407,7 @@ EditorNode::EditorNode() { add_editor_plugin( memnew( TileSetEditorPlugin(this) ) ); add_editor_plugin( memnew( TileMapEditorPlugin(this) ) ); add_editor_plugin( memnew( SpriteFramesEditorPlugin(this) ) ); - add_editor_plugin( memnew( SpriteRegionEditorPlugin(this) ) ); + add_editor_plugin( memnew( TextureRegionEditorPlugin(this) ) ); add_editor_plugin( memnew( Particles2DEditorPlugin(this) ) ); add_editor_plugin( memnew( Path2DEditorPlugin(this) ) ); add_editor_plugin( memnew( PathEditorPlugin(this) ) ); @@ -6623,6 +6639,3 @@ EditorPluginList::EditorPluginList() { EditorPluginList::~EditorPluginList() { } - - - diff --git a/tools/editor/editor_scale.cpp b/tools/editor/editor_scale.cpp index ecb1e1816f..c332acc0ca 100644 --- a/tools/editor/editor_scale.cpp +++ b/tools/editor/editor_scale.cpp @@ -1,7 +1,14 @@ #include "editor_scale.h" #include "os/os.h" +static bool editor_hidpi=false; + +void editor_set_hidpi(bool p_hidpi) { + + editor_hidpi=p_hidpi; +} + bool editor_is_hidpi() { - return OS::get_singleton()->get_screen_dpi(0) > 150; + return editor_hidpi; } diff --git a/tools/editor/editor_scale.h b/tools/editor/editor_scale.h index 0f0e90595c..a60cf00f0a 100644 --- a/tools/editor/editor_scale.h +++ b/tools/editor/editor_scale.h @@ -1,7 +1,7 @@ #ifndef EDITOR_SCALE_H #define EDITOR_SCALE_H - +void editor_set_hidpi(bool p_hidpi); bool editor_is_hidpi(); #define EDSCALE (editor_is_hidpi() ? 2 : 1) diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp index 9dd00688c9..bf01e02330 100644 --- a/tools/editor/editor_settings.cpp +++ b/tools/editor/editor_settings.cpp @@ -493,6 +493,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { hints["global/editor_language"]=PropertyInfo(Variant::STRING,"global/editor_language",PROPERTY_HINT_ENUM,lang_hint,PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED); } + set("global/hidpi_mode",0); + hints["global/hidpi_mode"]=PropertyInfo(Variant::INT,"global/hidpi_mode",PROPERTY_HINT_ENUM,"Auto,LoDPI,HiDPI",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED); set("global/show_script_in_scene_tabs",false); set("global/font_size",14); hints["global/font_size"]=PropertyInfo(Variant::INT,"global/font_size",PROPERTY_HINT_RANGE,"10,40,1",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED); diff --git a/tools/editor/icons/2x/icon_button_group.png b/tools/editor/icons/2x/icon_button_group.png Binary files differnew file mode 100644 index 0000000000..050e3972d2 --- /dev/null +++ b/tools/editor/icons/2x/icon_button_group.png diff --git a/tools/editor/icons/2x/icon_canvas_layer.png b/tools/editor/icons/2x/icon_canvas_layer.png Binary files differnew file mode 100644 index 0000000000..913d14b003 --- /dev/null +++ b/tools/editor/icons/2x/icon_canvas_layer.png diff --git a/tools/editor/icons/2x/icon_container.png b/tools/editor/icons/2x/icon_container.png Binary files differnew file mode 100644 index 0000000000..b5a645ee85 --- /dev/null +++ b/tools/editor/icons/2x/icon_container.png diff --git a/tools/editor/icons/2x/icon_control_align_bottom_left.png b/tools/editor/icons/2x/icon_control_align_bottom_left.png Binary files differindex 56ace004a7..03520ca327 100644 --- a/tools/editor/icons/2x/icon_control_align_bottom_left.png +++ b/tools/editor/icons/2x/icon_control_align_bottom_left.png diff --git a/tools/editor/icons/2x/icon_control_align_bottom_right.png b/tools/editor/icons/2x/icon_control_align_bottom_right.png Binary files differindex 03520ca327..56ace004a7 100644 --- a/tools/editor/icons/2x/icon_control_align_bottom_right.png +++ b/tools/editor/icons/2x/icon_control_align_bottom_right.png diff --git a/tools/editor/icons/2x/icon_editor_plugin.png b/tools/editor/icons/2x/icon_editor_plugin.png Binary files differnew file mode 100644 index 0000000000..c0e10886a2 --- /dev/null +++ b/tools/editor/icons/2x/icon_editor_plugin.png diff --git a/tools/editor/icons/2x/icon_file.png b/tools/editor/icons/2x/icon_file.png Binary files differindex a7e135b600..a495efee09 100644 --- a/tools/editor/icons/2x/icon_file.png +++ b/tools/editor/icons/2x/icon_file.png diff --git a/tools/editor/icons/2x/icon_file_big.png b/tools/editor/icons/2x/icon_file_big.png Binary files differindex 806814d559..c5b347f71f 100644 --- a/tools/editor/icons/2x/icon_file_big.png +++ b/tools/editor/icons/2x/icon_file_big.png diff --git a/tools/editor/icons/2x/icon_folder_big.png b/tools/editor/icons/2x/icon_folder_big.png Binary files differindex bd048a7c5f..f960bb7e57 100644 --- a/tools/editor/icons/2x/icon_folder_big.png +++ b/tools/editor/icons/2x/icon_folder_big.png diff --git a/tools/editor/icons/2x/icon_graph_edit.png b/tools/editor/icons/2x/icon_graph_edit.png Binary files differnew file mode 100644 index 0000000000..3002c9e44e --- /dev/null +++ b/tools/editor/icons/2x/icon_graph_edit.png diff --git a/tools/editor/icons/2x/icon_graph_node.png b/tools/editor/icons/2x/icon_graph_node.png Binary files differnew file mode 100644 index 0000000000..203bb22c84 --- /dev/null +++ b/tools/editor/icons/2x/icon_graph_node.png diff --git a/tools/editor/icons/2x/icon_instance.png b/tools/editor/icons/2x/icon_instance.png Binary files differindex a5c1345667..1b2df0c511 100644 --- a/tools/editor/icons/2x/icon_instance.png +++ b/tools/editor/icons/2x/icon_instance.png diff --git a/tools/editor/icons/2x/icon_inverse_kinematics.png b/tools/editor/icons/2x/icon_inverse_kinematics.png Binary files differnew file mode 100644 index 0000000000..8f9e58af18 --- /dev/null +++ b/tools/editor/icons/2x/icon_inverse_kinematics.png diff --git a/tools/editor/icons/2x/icon_key_invalid.png b/tools/editor/icons/2x/icon_key_invalid.png Binary files differnew file mode 100644 index 0000000000..621764ccdd --- /dev/null +++ b/tools/editor/icons/2x/icon_key_invalid.png diff --git a/tools/editor/icons/2x/icon_multi_line.png b/tools/editor/icons/2x/icon_multi_line.png Binary files differnew file mode 100644 index 0000000000..0760b233cf --- /dev/null +++ b/tools/editor/icons/2x/icon_multi_line.png diff --git a/tools/editor/icons/2x/icon_new.png b/tools/editor/icons/2x/icon_new.png Binary files differindex a7e135b600..a495efee09 100644 --- a/tools/editor/icons/2x/icon_new.png +++ b/tools/editor/icons/2x/icon_new.png diff --git a/tools/editor/icons/2x/icon_panel_container.png b/tools/editor/icons/2x/icon_panel_container.png Binary files differnew file mode 100644 index 0000000000..dae4097050 --- /dev/null +++ b/tools/editor/icons/2x/icon_panel_container.png diff --git a/tools/editor/icons/2x/icon_parallax_background.png b/tools/editor/icons/2x/icon_parallax_background.png Binary files differnew file mode 100644 index 0000000000..7970d3e95a --- /dev/null +++ b/tools/editor/icons/2x/icon_parallax_background.png diff --git a/tools/editor/icons/2x/icon_parallax_layer.png b/tools/editor/icons/2x/icon_parallax_layer.png Binary files differnew file mode 100644 index 0000000000..4a04feb9f0 --- /dev/null +++ b/tools/editor/icons/2x/icon_parallax_layer.png diff --git a/tools/editor/icons/2x/icon_plane.png b/tools/editor/icons/2x/icon_plane.png Binary files differnew file mode 100644 index 0000000000..33f54d5e70 --- /dev/null +++ b/tools/editor/icons/2x/icon_plane.png diff --git a/tools/editor/icons/2x/icon_quat.png b/tools/editor/icons/2x/icon_quat.png Binary files differnew file mode 100644 index 0000000000..97bad80684 --- /dev/null +++ b/tools/editor/icons/2x/icon_quat.png diff --git a/tools/editor/icons/2x/icon_range.png b/tools/editor/icons/2x/icon_range.png Binary files differnew file mode 100644 index 0000000000..f0fac7c480 --- /dev/null +++ b/tools/editor/icons/2x/icon_range.png diff --git a/tools/editor/icons/2x/icon_reload_small.png b/tools/editor/icons/2x/icon_reload_small.png Binary files differnew file mode 100644 index 0000000000..3396df7069 --- /dev/null +++ b/tools/editor/icons/2x/icon_reload_small.png diff --git a/tools/editor/icons/2x/icon_save.png b/tools/editor/icons/2x/icon_save.png Binary files differindex 183515d055..9fdc4c568c 100644 --- a/tools/editor/icons/2x/icon_save.png +++ b/tools/editor/icons/2x/icon_save.png diff --git a/tools/editor/icons/2x/icon_string.png b/tools/editor/icons/2x/icon_string.png Binary files differnew file mode 100644 index 0000000000..b0bf611c51 --- /dev/null +++ b/tools/editor/icons/2x/icon_string.png diff --git a/tools/editor/icons/2x/icon_tabs.png b/tools/editor/icons/2x/icon_tabs.png Binary files differnew file mode 100644 index 0000000000..b265ba7cdf --- /dev/null +++ b/tools/editor/icons/2x/icon_tabs.png diff --git a/tools/editor/icons/2x/icon_tween.png b/tools/editor/icons/2x/icon_tween.png Binary files differnew file mode 100644 index 0000000000..62a01e819a --- /dev/null +++ b/tools/editor/icons/2x/icon_tween.png diff --git a/tools/editor/icons/2x/icon_viewport_sprite.png b/tools/editor/icons/2x/icon_viewport_sprite.png Binary files differnew file mode 100644 index 0000000000..75b3155c6e --- /dev/null +++ b/tools/editor/icons/2x/icon_viewport_sprite.png diff --git a/tools/editor/icons/icon_button_group.png b/tools/editor/icons/icon_button_group.png Binary files differnew file mode 100644 index 0000000000..2a42396fc1 --- /dev/null +++ b/tools/editor/icons/icon_button_group.png diff --git a/tools/editor/icons/icon_canvas_layer.png b/tools/editor/icons/icon_canvas_layer.png Binary files differnew file mode 100644 index 0000000000..13450c4062 --- /dev/null +++ b/tools/editor/icons/icon_canvas_layer.png diff --git a/tools/editor/icons/icon_color_pick.png b/tools/editor/icons/icon_color_pick.png Binary files differnew file mode 100644 index 0000000000..d40a8d4795 --- /dev/null +++ b/tools/editor/icons/icon_color_pick.png diff --git a/tools/editor/icons/icon_container.png b/tools/editor/icons/icon_container.png Binary files differnew file mode 100644 index 0000000000..31985c5b46 --- /dev/null +++ b/tools/editor/icons/icon_container.png diff --git a/tools/editor/icons/icon_control_align_bottom_left.png b/tools/editor/icons/icon_control_align_bottom_left.png Binary files differindex e098493415..d0b4bed896 100644 --- a/tools/editor/icons/icon_control_align_bottom_left.png +++ b/tools/editor/icons/icon_control_align_bottom_left.png diff --git a/tools/editor/icons/icon_control_align_bottom_right.png b/tools/editor/icons/icon_control_align_bottom_right.png Binary files differindex d0b4bed896..e098493415 100644 --- a/tools/editor/icons/icon_control_align_bottom_right.png +++ b/tools/editor/icons/icon_control_align_bottom_right.png diff --git a/tools/editor/icons/icon_editor_plugin.png b/tools/editor/icons/icon_editor_plugin.png Binary files differnew file mode 100644 index 0000000000..fd1405602c --- /dev/null +++ b/tools/editor/icons/icon_editor_plugin.png diff --git a/tools/editor/icons/icon_file.png b/tools/editor/icons/icon_file.png Binary files differindex 5433736869..5407b500cc 100644 --- a/tools/editor/icons/icon_file.png +++ b/tools/editor/icons/icon_file.png diff --git a/tools/editor/icons/icon_file_big.png b/tools/editor/icons/icon_file_big.png Binary files differindex e7027b59f1..9680f601fe 100644 --- a/tools/editor/icons/icon_file_big.png +++ b/tools/editor/icons/icon_file_big.png diff --git a/tools/editor/icons/icon_folder_big.png b/tools/editor/icons/icon_folder_big.png Binary files differindex 096d9c0dd0..8c39a99bd4 100644 --- a/tools/editor/icons/icon_folder_big.png +++ b/tools/editor/icons/icon_folder_big.png diff --git a/tools/editor/icons/icon_gizmo_listener.png b/tools/editor/icons/icon_gizmo_listener.png Binary files differnew file mode 100644 index 0000000000..b6267e779a --- /dev/null +++ b/tools/editor/icons/icon_gizmo_listener.png diff --git a/tools/editor/icons/icon_graph_edit.png b/tools/editor/icons/icon_graph_edit.png Binary files differnew file mode 100644 index 0000000000..3f8bd3be25 --- /dev/null +++ b/tools/editor/icons/icon_graph_edit.png diff --git a/tools/editor/icons/icon_graph_node.png b/tools/editor/icons/icon_graph_node.png Binary files differnew file mode 100644 index 0000000000..0982154201 --- /dev/null +++ b/tools/editor/icons/icon_graph_node.png diff --git a/tools/editor/icons/icon_instance.png b/tools/editor/icons/icon_instance.png Binary files differindex 2d2857e5bd..6d50ec4ecb 100644 --- a/tools/editor/icons/icon_instance.png +++ b/tools/editor/icons/icon_instance.png diff --git a/tools/editor/icons/icon_inverse_kinematics.png b/tools/editor/icons/icon_inverse_kinematics.png Binary files differnew file mode 100644 index 0000000000..30f542bf2f --- /dev/null +++ b/tools/editor/icons/icon_inverse_kinematics.png diff --git a/tools/editor/icons/icon_key_invalid.png b/tools/editor/icons/icon_key_invalid.png Binary files differindex e8e6c87180..f771ac8059 100644 --- a/tools/editor/icons/icon_key_invalid.png +++ b/tools/editor/icons/icon_key_invalid.png diff --git a/tools/editor/icons/icon_listener.png b/tools/editor/icons/icon_listener.png Binary files differnew file mode 100644 index 0000000000..1fa4cb4a9f --- /dev/null +++ b/tools/editor/icons/icon_listener.png diff --git a/tools/editor/icons/icon_multi_line.png b/tools/editor/icons/icon_multi_line.png Binary files differindex c3e77f0fbe..dfb67f522b 100644 --- a/tools/editor/icons/icon_multi_line.png +++ b/tools/editor/icons/icon_multi_line.png diff --git a/tools/editor/icons/icon_new.png b/tools/editor/icons/icon_new.png Binary files differindex 5433736869..5407b500cc 100644 --- a/tools/editor/icons/icon_new.png +++ b/tools/editor/icons/icon_new.png diff --git a/tools/editor/icons/icon_panel_container.png b/tools/editor/icons/icon_panel_container.png Binary files differnew file mode 100644 index 0000000000..991db6ae63 --- /dev/null +++ b/tools/editor/icons/icon_panel_container.png diff --git a/tools/editor/icons/icon_parallax_background.png b/tools/editor/icons/icon_parallax_background.png Binary files differnew file mode 100644 index 0000000000..6fff88a438 --- /dev/null +++ b/tools/editor/icons/icon_parallax_background.png diff --git a/tools/editor/icons/icon_parallax_layer.png b/tools/editor/icons/icon_parallax_layer.png Binary files differnew file mode 100644 index 0000000000..0b3d051cb4 --- /dev/null +++ b/tools/editor/icons/icon_parallax_layer.png diff --git a/tools/editor/icons/icon_plane.png b/tools/editor/icons/icon_plane.png Binary files differindex fbdc247e5a..e7506922f7 100644 --- a/tools/editor/icons/icon_plane.png +++ b/tools/editor/icons/icon_plane.png diff --git a/tools/editor/icons/icon_quat.png b/tools/editor/icons/icon_quat.png Binary files differindex f09d2fcaba..44a9eada98 100644 --- a/tools/editor/icons/icon_quat.png +++ b/tools/editor/icons/icon_quat.png diff --git a/tools/editor/icons/icon_range.png b/tools/editor/icons/icon_range.png Binary files differnew file mode 100644 index 0000000000..1b7141012b --- /dev/null +++ b/tools/editor/icons/icon_range.png diff --git a/tools/editor/icons/icon_reload_small.png b/tools/editor/icons/icon_reload_small.png Binary files differindex 957cdfcf4f..6809c4feab 100644 --- a/tools/editor/icons/icon_reload_small.png +++ b/tools/editor/icons/icon_reload_small.png diff --git a/tools/editor/icons/icon_save.png b/tools/editor/icons/icon_save.png Binary files differindex 1a1cae8741..77c0cccc94 100644 --- a/tools/editor/icons/icon_save.png +++ b/tools/editor/icons/icon_save.png diff --git a/tools/editor/icons/icon_string.png b/tools/editor/icons/icon_string.png Binary files differindex 4a747f7c62..8cf133c7ef 100644 --- a/tools/editor/icons/icon_string.png +++ b/tools/editor/icons/icon_string.png diff --git a/tools/editor/icons/icon_tabs.png b/tools/editor/icons/icon_tabs.png Binary files differnew file mode 100644 index 0000000000..1b56782d28 --- /dev/null +++ b/tools/editor/icons/icon_tabs.png diff --git a/tools/editor/icons/icon_tween.png b/tools/editor/icons/icon_tween.png Binary files differnew file mode 100644 index 0000000000..ce33013b36 --- /dev/null +++ b/tools/editor/icons/icon_tween.png diff --git a/tools/editor/icons/icon_viewport_sprite.png b/tools/editor/icons/icon_viewport_sprite.png Binary files differnew file mode 100644 index 0000000000..c37fcdf144 --- /dev/null +++ b/tools/editor/icons/icon_viewport_sprite.png diff --git a/tools/editor/icons/source/icon_button_group.svg b/tools/editor/icons/source/icon_button_group.svg new file mode 100644 index 0000000000..9d5df99deb --- /dev/null +++ b/tools/editor/icons/source/icon_button_group.svg @@ -0,0 +1,178 @@ +<?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/djrm/Projects/godot/tools/editor/icons/icon_button_group.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:docname="icon_button_group.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="32" + inkscape:cx="3.5392558" + inkscape:cy="8.9453899" + 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="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1"> + <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 /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-1036.3622)"> + <rect + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4172" + width="1" + height="10" + x="0" + y="1039.3622" /> + <rect + y="1039.3622" + x="15" + height="10" + width="1" + id="rect4174" + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <path + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path4176" + sodipodi:type="arc" + sodipodi:cx="1" + sodipodi:cy="1049.3622" + sodipodi:rx="1" + sodipodi:ry="1" + sodipodi:start="0" + sodipodi:end="4.712389" + d="m 2,1049.3622 a 1,1 0 0 1 -0.6173166,0.9239 1,1 0 0 1 -1.08979019,-0.2168 1,1 0 0 1 -0.21677274,-1.0898 A 1,1 0 0 1 1,1048.3622 l 0,1 z" /> + <rect + y="-15" + x="1049.3622" + height="14" + width="1" + id="rect4178" + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + transform="matrix(0,1,-1,0,0,0)" /> + <path + d="m -14,1049.3622 a 1,1 0 0 1 -0.617317,0.9239 1,1 0 0 1 -1.08979,-0.2168 1,1 0 0 1 -0.216773,-1.0898 1,1 0 0 1 0.92388,-0.6173 l 0,1 z" + sodipodi:end="4.712389" + sodipodi:start="0" + sodipodi:ry="1" + sodipodi:rx="1" + sodipodi:cy="1049.3622" + sodipodi:cx="-15" + sodipodi:type="arc" + id="path4180" + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + transform="scale(-1,1)" /> + <path + d="m 2,-1039.3622 a 1,1 0 0 1 -0.6173166,0.9239 1,1 0 0 1 -1.08979019,-0.2168 1,1 0 0 1 -0.21677274,-1.0898 A 1,1 0 0 1 1,-1040.3622 l 0,1 z" + sodipodi:end="4.712389" + sodipodi:start="0" + sodipodi:ry="1" + sodipodi:rx="1" + sodipodi:cy="-1039.3622" + sodipodi:cx="1" + sodipodi:type="arc" + id="path4182" + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + transform="scale(1,-1)" /> + <path + transform="scale(-1,-1)" + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path4184" + sodipodi:type="arc" + sodipodi:cx="-15" + sodipodi:cy="-1039.3622" + sodipodi:rx="1" + sodipodi:ry="1" + sodipodi:start="0" + sodipodi:end="4.712389" + d="m -14,-1039.3622 a 1,1 0 0 1 -0.617317,0.9239 1,1 0 0 1 -1.08979,-0.2168 1,1 0 0 1 -0.216773,-1.0898 1,1 0 0 1 0.92388,-0.6173 l 0,1 z" /> + <rect + transform="matrix(0,1,-1,0,0,0)" + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4186" + width="1" + height="14" + x="1038.3622" + y="-15" /> + <rect + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4188" + width="4" + height="6.0000172" + x="3" + y="1041.3622" /> + <rect + y="1041.3622" + x="9" + height="6.0000172" + width="4" + id="rect4190" + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <rect + y="1045.3622" + x="3" + height="1.9999998" + width="4" + id="rect4192" + style="opacity:1;fill:#98dc9f;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <rect + style="opacity:1;fill:#98dc9f;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4194" + width="4" + height="1.9999998" + x="9" + y="1045.3622" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_canvas_layer.svg b/tools/editor/icons/source/icon_canvas_layer.svg new file mode 100644 index 0000000000..a26edd7d6d --- /dev/null +++ b/tools/editor/icons/source/icon_canvas_layer.svg @@ -0,0 +1,108 @@ +<?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/djrm/Projects/godot/tools/editor/icons/icon_canvas_item.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:docname="icon_canvas_layer.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="22.627417" + inkscape:cx="-3.1074492" + inkscape:cy="10.973033" + 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="false" + inkscape:snap-object-midpoints="true" + inkscape:snap-center="true" + inkscape:window-width="1920" + inkscape:window-height="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:snap-midpoints="true" + inkscape:snap-smooth-nodes="true" + inkscape:object-nodes="true" + inkscape:snap-intersection-paths="false" + inkscape:object-paths="false"> + <inkscape:grid + type="xygrid" + id="grid3336" /> + </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 + sodipodi:nodetypes="cscsccccsssc" + inkscape:connector-curvature="0" + id="path4146" + d="m 2.920797,1046.3957 c -0.2637264,0.3 -0.4203983,0.7296 -0.4203983,1.2383 0,1.6277 -3.13814186,-0.1781 -0.337569,2.6703 0.8838207,0.899 2.6543881,0.6701 3.538224,-0.2288 0.8838352,-0.899 0.8838163,-2.3565 0,-3.2554 -1.1002211,-1.1191 -2.200058,-1.0845 -2.7802567,-0.4244 z m 2.3801743,-1.6103 2.4004918,2.4416 6.8013899,-6.9177 c 0.662863,-0.6742 0.662863,-1.7673 0,-2.4415 -0.662877,-0.6741 -1.737613,-0.6741 -2.400491,0 z" + style="fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <path + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + d="M 3 1 A 2 2 0 0 0 1 3 L 2 3 A 1.0000174 1.0000174 0 0 1 3 2 L 3 1 z " + transform="translate(0,1036.3622)" + id="path4160" /> + <rect + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4164" + width="6" + height="1" + x="3" + y="1037.3622" /> + <rect + y="-2" + x="1039.3622" + height="1" + width="6" + id="rect4166" + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + transform="matrix(0,1,-1,0,0,0)" /> + <path + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + d="m 13,1051.3622 a 2,2 0 0 0 2,-2 l 0,-6 -1,0 0,6 a 1.0000174,1.0000174 0 0 1 -1,1 l -6,0 0,1 6,0 z" + id="path4169" + inkscape:connector-curvature="0" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_container.svg b/tools/editor/icons/source/icon_container.svg new file mode 100644 index 0000000000..2d39efafee --- /dev/null +++ b/tools/editor/icons/source/icon_container.svg @@ -0,0 +1,77 @@ +<?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/djrm/Projects/godot/tools/editor/icons/icon_center_container.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:docname="icon_container.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="45.254834" + inkscape:cx="5.4993419" + inkscape:cy="7.9173851" + 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="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1"> + <inkscape:grid + type="xygrid" + id="grid3336" /> + </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:#a5efac;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + d="M 3 1 C 1.8954305 1 1 1.8954305 1 3 L 3 3 L 3 1 z M 5 1 L 5 3 L 7 3 L 7 1 L 5 1 z M 9 1 L 9 3 L 11 3 L 11 1 L 9 1 z M 13 1 L 13 3 L 15 3 C 15 1.8954305 14.104569 1 13 1 z M 1 5 L 1 7 L 3 7 L 3 5 L 1 5 z M 13 5 L 13 7 L 15 7 L 15 5 L 13 5 z M 1 9 L 1 11 L 3 11 L 3 9 L 1 9 z M 13 9 L 13 11 L 15 11 L 15 9 L 13 9 z M 1 13 C 1 14.104569 1.8954305 15 3 15 L 3 13 L 1 13 z M 5 13 L 5 15 L 7 15 L 7 13 L 5 13 z M 9 13 L 9 15 L 11 15 L 11 13 L 9 13 z M 13 13 L 13 15 C 14.104569 15 15 14.104569 15 13 L 13 13 z " + transform="translate(0,1036.3622)" + id="rect4140" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_control_align_bottom_left.svg b/tools/editor/icons/source/icon_control_align_bottom_left.svg index a4ba9a552a..e718208f37 100644 --- a/tools/editor/icons/source/icon_control_align_bottom_left.svg +++ b/tools/editor/icons/source/icon_control_align_bottom_left.svg @@ -88,7 +88,7 @@ id="rect4171" width="4" height="4.0000172" - x="10" + x="2" y="1046.3622" /> </g> </svg> diff --git a/tools/editor/icons/source/icon_control_align_bottom_right.svg b/tools/editor/icons/source/icon_control_align_bottom_right.svg index 7a234b10ad..e4c5d884eb 100644 --- a/tools/editor/icons/source/icon_control_align_bottom_right.svg +++ b/tools/editor/icons/source/icon_control_align_bottom_right.svg @@ -88,7 +88,7 @@ id="rect4171" width="4" height="4.0000172" - x="2" + x="10" y="1046.3622" /> </g> </svg> diff --git a/tools/editor/icons/source/icon_editor_plugin.svg b/tools/editor/icons/source/icon_editor_plugin.svg new file mode 100644 index 0000000000..b9460de683 --- /dev/null +++ b/tools/editor/icons/source/icon_editor_plugin.svg @@ -0,0 +1,109 @@ +<?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/djrm/Projects/godot/tools/editor/icons/icon_canvas_item.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:docname="icon_editor_plugin.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="22.627417" + inkscape:cx="-2.7705057" + inkscape:cy="8.7644499" + 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="false" + inkscape:snap-object-midpoints="true" + inkscape:snap-center="true" + inkscape:window-width="1920" + inkscape:window-height="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:snap-midpoints="true" + inkscape:snap-smooth-nodes="true" + inkscape:object-nodes="true" + inkscape:snap-intersection-paths="false" + inkscape:object-paths="false"> + <inkscape:grid + type="xygrid" + id="grid3336" /> + </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="fill:#e0e0e0;fill-opacity:0.99607843;fill-rule:evenodd;stroke:#e0e0e0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.99607843" + d="m 2,1038.3622 0,8 8,0 0,-8 z" + id="path4195" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> + <circle + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" + id="path4197" + cx="13" + cy="1042.3622" + r="2" /> + <circle + r="2" + cy="1049.3622" + cx="6" + id="circle4199" + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" /> + <rect + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" + id="rect4201" + width="2" + height="2" + x="5" + y="1046.3622" /> + <rect + y="1041.3622" + x="10" + height="2" + width="2" + id="rect4203" + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_file_big.svg b/tools/editor/icons/source/icon_file_big.svg index 2031535b19..38ad9b707a 100644 --- a/tools/editor/icons/source/icon_file_big.svg +++ b/tools/editor/icons/source/icon_file_big.svg @@ -28,9 +28,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="5.656854" - inkscape:cx="19.467688" - inkscape:cy="47.67564" + inkscape:zoom="11.313708" + inkscape:cx="32.899003" + inkscape:cy="32.88081" inkscape:document-units="px" inkscape:current-layer="layer1-8" showgrid="true" @@ -62,7 +62,7 @@ <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> + <dc:title /> </cc:Work> </rdf:RDF> </metadata> @@ -77,9 +77,11 @@ transform="translate(0,-1.6949463e-5)"> <path style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - d="M 15 5 A 5 5 0 0 0 10 10 L 10 54 A 5 5 0 0 0 15 59 L 49 59 A 5 5 0 0 0 54 54 L 54 23 L 36 23 L 36 5 L 15 5 z M 41 5 L 41 18 L 54 18 L 41 5 z " + d="m 10,5 0,54 44,0 0,-36 -18,0 0,-18 z m 31,0 0,13 13,0 z" transform="translate(0,988.36222)" - id="rect4158" /> + id="rect4158" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccccccccc" /> </g> </g> </svg> diff --git a/tools/editor/icons/source/icon_folder_big.svg b/tools/editor/icons/source/icon_folder_big.svg index 71d3940d6b..818eaa2ba3 100644 --- a/tools/editor/icons/source/icon_folder_big.svg +++ b/tools/editor/icons/source/icon_folder_big.svg @@ -15,7 +15,7 @@ id="svg2" version="1.1" inkscape:version="0.91 r13725" - inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_folder.png" + inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_folder_big.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90" sodipodi:docname="icon_folder_big.svg"> @@ -29,8 +29,8 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="8" - inkscape:cx="35.45774" - inkscape:cy="34.995782" + inkscape:cx="27.662311" + inkscape:cy="41.159533" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" @@ -64,7 +64,7 @@ <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> + <dc:title /> </cc:Work> </rdf:RDF> </metadata> @@ -87,7 +87,7 @@ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> <circle r="5.0039101" - cy="1001.3622" + cy="1005.3622" cx="13" id="circle4139" style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> @@ -119,9 +119,9 @@ x="8" y="1008.3622" /> <rect - y="1001.3622" + y="1005.3622" x="8" - height="6.9999485" + height="2.9999311" width="28" id="rect4149" style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> @@ -129,7 +129,7 @@ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" id="circle4151" cx="31" - cy="1001.3622" + cy="1005.3622" r="5.0039101" /> <rect style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" @@ -137,7 +137,7 @@ width="18" height="6.9999485" x="13" - y="996.36218" /> + y="1000.3622" /> <path style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" d="m 36,1004.3622 0,0.5 a 3.4999914,3.4999914 0 0 1 0.04102,-0.5 l -0.04102,0 z m 0,0.5 0,3.5 3.5,0 a 3.4999914,3.4999914 0 0 1 -3.5,-3.5 z m 3.5,3.5 0.5,0 0,-0.039 a 3.4999914,3.4999914 0 0 1 -0.5,0.039 z" diff --git a/tools/editor/icons/source/icon_graph_edit.svg b/tools/editor/icons/source/icon_graph_edit.svg new file mode 100644 index 0000000000..1bfba0fe30 --- /dev/null +++ b/tools/editor/icons/source/icon_graph_edit.svg @@ -0,0 +1,94 @@ +<?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/djrm/Projects/godot/tools/editor/icons/icon_canvas_item_shader_graph.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:docname="icon_graph_edit.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="45.254832" + inkscape:cx="6.9848175" + inkscape:cy="5.5849072" + 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="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1"> + <inkscape:grid + type="xygrid" + id="grid3336" /> + </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:0.99607843;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + d="M 3 1 A 2 2 0 0 0 1 3 A 2 2 0 0 0 2 4.7304688 L 2 11.271484 A 2 2 0 0 0 1 13 A 2 2 0 0 0 3 15 A 2 2 0 0 0 5 13 A 2 2 0 0 0 4 11.269531 L 4 5.4140625 L 8.7929688 10.207031 L 10.207031 8.7929688 L 5.4140625 4 L 11.271484 4 A 2 2 0 0 0 13 5 A 2 2 0 0 0 15 3 A 2 2 0 0 0 13 1 A 2 2 0 0 0 11.269531 2 L 4.7285156 2 A 2 2 0 0 0 3 1 z " + transform="translate(0,1036.3622)" + id="path4198" /> + <ellipse + r="2" + style="opacity:1;fill:#6e6e6e;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="ellipse4152" + cx="3" + cy="1039.3622" /> + <g + id="layer1-0" + inkscape:label="Layer 1" + transform="matrix(0.50000003,0,0,0.50000003,7.5,525.68107)"> + <path + sodipodi:nodetypes="ccccccccccc" + inkscape:connector-curvature="0" + id="rect4135" + d="M 1.7071068,1047.8266 1,1051.3622 l 3.5355339,-0.7071 7.7781741,-7.7782 -2.828427,-2.8284 z m 9.1923882,-9.1924 2.828427,2.8285 1.414214,-1.4142 -2.828428,-2.8285 z" + style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + </g> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_graph_node.svg b/tools/editor/icons/source/icon_graph_node.svg new file mode 100644 index 0000000000..1916e9287b --- /dev/null +++ b/tools/editor/icons/source/icon_graph_node.svg @@ -0,0 +1,89 @@ +<?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/djrm/Projects/godot/tools/editor/icons/icon_canvas_item_shader_graph.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:docname="icon_graph_node.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="45.254832" + inkscape:cx="9.5712298" + inkscape:cy="6.1223869" + 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="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1"> + <inkscape:grid + type="xygrid" + id="grid3336" /> + </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:0.99607843;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + d="M 3 1 A 2 2 0 0 0 1 3 A 2 2 0 0 0 2 4.7304688 L 2 11.271484 A 2 2 0 0 0 1 13 A 2 2 0 0 0 3 15 A 2 2 0 0 0 5 13 A 2 2 0 0 0 4 11.269531 L 4 5.4140625 L 8.7929688 10.207031 L 10.207031 8.7929688 L 5.4140625 4 L 11.271484 4 A 2 2 0 0 0 13 5 A 2 2 0 0 0 15 3 A 2 2 0 0 0 13 1 A 2 2 0 0 0 11.269531 2 L 4.7285156 2 A 2 2 0 0 0 3 1 z " + transform="translate(0,1036.3622)" + id="path4198" /> + <ellipse + r="2" + style="opacity:1;fill:#6e6e6e;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="ellipse4152" + cx="3" + cy="1039.3622" /> + <circle + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" + id="path4205" + cx="13" + cy="1049.3622" + r="2" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_instance.svg b/tools/editor/icons/source/icon_instance.svg index 3f8b627782..f12e067e7a 100644 --- a/tools/editor/icons/source/icon_instance.svg +++ b/tools/editor/icons/source/icon_instance.svg @@ -15,10 +15,10 @@ id="svg2" version="1.1" inkscape:version="0.91 r13725" - inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_packed_scene.png" + inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_instance.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90" - sodipodi:docname="icon_instance.svg"> + sodipodi:docname="icon_instance_2.svg"> <defs id="defs4" /> <sodipodi:namedview @@ -28,9 +28,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="64" - inkscape:cx="7.5785678" - inkscape:cy="4.3102984" + inkscape:zoom="16" + inkscape:cx="0.98066219" + inkscape:cy="8.8420536" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" @@ -46,7 +46,9 @@ inkscape:window-height="1016" inkscape:window-x="0" inkscape:window-y="27" - inkscape:window-maximized="1"> + inkscape:window-maximized="1" + inkscape:snap-smooth-nodes="false" + inkscape:object-nodes="false"> <inkscape:grid type="xygrid" id="grid3336" /> @@ -59,7 +61,7 @@ <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title /> + <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> @@ -69,16 +71,14 @@ id="layer1" transform="translate(0,-1036.3622)"> <path - style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - d="M 1 7 L 1 13 C 1 14.104569 1.8954305 15 3 15 L 15 15 L 15 7 L 1 7 z M 4 9 L 5 9 L 7 9 L 7 10 L 5 10 L 5 13 L 7 13 L 7 14 L 5 14 L 4 14 L 4 9 z M 10 9 L 12 9 L 13 9 L 13 14 L 12 14 L 10 14 L 10 13 L 12 13 L 12 10 L 10 10 L 10 9 z M 7 11 L 10 11 L 10 12 L 7 12 L 7 11 z " - transform="translate(0,1036.3622)" - id="rect4136" /> + style="fill:none;fill-rule:evenodd;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" + d="m 5,1047.3622 6,-6" + id="path4156" + inkscape:connector-curvature="0" /> <path - style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - d="M 0.7112932,1040.3831 1,1042.3622 l 2.2438279,-0.3273 -0.8182578,-1.9018 -1.7142769,0.25 z m 3.6933293,-0.5387 0.8182578,1.9018 1.9790524,-0.2887 -0.8182579,-1.9018 -1.9790523,0.2887 z m 3.9581047,-0.5775 0.8182579,1.9018 1.9790519,-0.2887 -0.818257,-1.9018 -1.9790528,0.2887 z m 3.9581048,-0.5774 0.818258,1.9018 1.714277,-0.25 -0.288707,-1.9791 -2.243828,0.3273 z" - id="rect4138" - inkscape:connector-curvature="0" - inkscape:transform-center-x="-6.7823301" - inkscape:transform-center-y="-2" /> + style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#e0e0e0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" + d="M 11 1 C 8.8027056 1 7 2.8027 7 5 C 7 5.3547724 7.0623287 5.6932122 7.1503906 6.0214844 L 9.5449219 3.6269531 C 9.9079388 3.2418883 10.420555 3 11 3 C 12.116414 3 13 3.8836 13 5 C 13 5.5738779 12.763331 6.0828638 12.384766 6.4453125 L 9.9804688 8.8496094 C 10.308197 8.9373587 10.64588 9 11 9 C 13.197294 9 15 7.1973 15 5 C 15 2.8027 13.197294 1 11 1 z M 5 7 C 2.8027056 7 1 8.8027 1 11 C 1 13.1973 2.8027056 15 5 15 C 7.1972944 15 9 13.1973 9 11 C 9 10.645879 8.9373589 10.308197 8.8496094 9.9804688 L 6.4453125 12.384766 C 6.0828657 12.763333 5.5738851 13 5 13 C 3.8835859 13 3 12.1164 3 11 C 3 10.420562 3.24189 9.9079407 3.6269531 9.5449219 L 6.0214844 7.1503906 C 5.6932126 7.0623289 5.3547715 7 5 7 z " + transform="translate(0,1036.3622)" + id="path4137" /> </g> </svg> diff --git a/tools/editor/icons/source/icon_inverse_kinematics.svg b/tools/editor/icons/source/icon_inverse_kinematics.svg new file mode 100644 index 0000000000..227d22f911 --- /dev/null +++ b/tools/editor/icons/source/icon_inverse_kinematics.svg @@ -0,0 +1,123 @@ +<?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/djrm/Projects/godot/tools/editor/icons/icon_camera.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:docname="icon_inverse_kinematics.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="31.999999" + inkscape:cx="2.6199443" + inkscape:cy="8.0718327" + 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="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1" + showguides="true" + inkscape:snap-smooth-nodes="true" + inkscape:object-nodes="true"> + <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="fill:none;fill-rule:evenodd;stroke:#fc9c9c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 3,1039.3622 0,12" + id="path4149" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <circle + style="opacity:1;fill:#fc9c9c;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path4151" + cx="3" + cy="1039.3622" + r="2" /> + <path + sodipodi:nodetypes="cc" + inkscape:connector-curvature="0" + id="path4153" + d="m 10,1039.3622 -7,0" + style="fill:#fc9c9c;fill-rule:evenodd;stroke:#fc9c9c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1" /> + <circle + r="2" + cy="1039.3622" + cx="11" + id="circle4155" + style="opacity:1;fill:#fc9c9c;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <rect + style="opacity:1;fill:#fc9c9c;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4161" + width="6" + height="2" + x="8" + y="1044.3622" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#fc9c9c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 11,1039.3622 0,6" + id="path4163" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:#fc9c9c;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1" + d="m 10,1046.3622 0,4 -3,-2 1,-2 z" + id="path4165" + inkscape:connector-curvature="0" /> + <path + inkscape:connector-curvature="0" + id="path4167" + d="m 12,1046.3622 0,4 3,-2 -1,-2 z" + style="fill:#fc9c9c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_key_invalid.svg b/tools/editor/icons/source/icon_key_invalid.svg new file mode 100644 index 0000000000..b6407dc178 --- /dev/null +++ b/tools/editor/icons/source/icon_key_invalid.svg @@ -0,0 +1,78 @@ +<?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="8" + height="8" + viewBox="0 0 8 8" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_key_invalid.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:docname="icon_key_invalid.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="32.000001" + inkscape:cx="0.95360267" + inkscape:cy="5.9962147" + 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="false" + inkscape:snap-object-midpoints="true" + inkscape:snap-center="true" + inkscape:window-width="1920" + inkscape:window-height="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1"> + <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 /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-1044.3622)"> + <path + style="opacity:1;fill:#ff8484;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + d="m 0.46446609,1046.2409 2.12132031,2.1213 -2.12132031,2.1213 1.41421361,1.4142 L 4,1049.7764 l 2.1213203,2.1213 1.4142136,-1.4142 -2.1213203,-2.1213 2.1213203,-2.1213 -1.4142136,-1.4142 L 4,1046.948 l -2.1213203,-2.1213 -1.41421361,1.4142 z" + id="rect4156" + inkscape:connector-curvature="0" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_multi_line.svg b/tools/editor/icons/source/icon_multi_line.svg new file mode 100644 index 0000000000..542e311286 --- /dev/null +++ b/tools/editor/icons/source/icon_multi_line.svg @@ -0,0 +1,115 @@ +<?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/djrm/Projects/godot/tools/editor/icons/icon_add_track.png" + inkscape:export-xdpi="45" + inkscape:export-ydpi="45" + sodipodi:docname="icon_multi_line.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="32.000001" + inkscape:cx="8.0670393" + inkscape:cy="9.3567993" + 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="false" + inkscape:snap-object-midpoints="true" + inkscape:snap-center="true" + inkscape:window-width="1920" + inkscape:window-height="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1"> + <inkscape:grid + type="xygrid" + id="grid3336" /> + </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)"> + <rect + style="fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect4137" + width="5" + height="1.9999478" + x="10" + y="1037.3622" /> + <rect + y="-8" + x="1037.3622" + height="7.000001" + width="2.0000174" + id="rect4158" + style="fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + transform="matrix(0,1,-1,0,0,0)" /> + <rect + y="1041.3622" + x="1" + height="1.9999478" + width="11" + id="rect4155" + style="fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <rect + style="fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect4157" + width="4" + height="1.9999478" + x="1" + y="1045.3622" /> + <rect + y="1045.3622" + x="7" + height="1.9999478" + width="8" + id="rect4159" + style="fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <rect + style="fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect4161" + width="13" + height="1.9999478" + x="1" + y="1049.3622" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_new.svg b/tools/editor/icons/source/icon_new.svg index 208ee9a6f4..a37ba1be3f 100644 --- a/tools/editor/icons/source/icon_new.svg +++ b/tools/editor/icons/source/icon_new.svg @@ -28,9 +28,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="31.999999" - inkscape:cx="7.9365607" - inkscape:cy="9.3818162" + inkscape:zoom="16" + inkscape:cx="0.22745062" + inkscape:cy="11.330333" inkscape:document-units="px" inkscape:current-layer="layer1-8" showgrid="true" @@ -46,7 +46,10 @@ inkscape:window-height="1016" inkscape:window-x="0" inkscape:window-y="27" - inkscape:window-maximized="1"> + inkscape:window-maximized="1" + inkscape:snap-smooth-nodes="true" + inkscape:object-nodes="true" + showguides="false"> <inkscape:grid type="xygrid" id="grid3336" /> @@ -76,7 +79,7 @@ sodipodi:nodetypes="ccccccccccc" inkscape:connector-curvature="0" id="rect4158" - d="m 2,1037.3622 0,14 12,0 0,-10 -4,0 0,-4 z m 9,0 0,3 3,0 z" + d="m 2,1037.3622 0,14 12,0 0,-9 -5,0 0,-5 z m 8,0 0,4 4,0 z" style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> </g> </g> diff --git a/tools/editor/icons/source/icon_panel_container.svg b/tools/editor/icons/source/icon_panel_container.svg new file mode 100644 index 0000000000..decf220705 --- /dev/null +++ b/tools/editor/icons/source/icon_panel_container.svg @@ -0,0 +1,79 @@ +<?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/djrm/Projects/godot/tools/editor/icons/icon_center_container.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:docname="icon_panel_container.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="32" + inkscape:cx="1.3105266" + inkscape:cy="8.3756827" + 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="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1"> + <inkscape:grid + type="xygrid" + id="grid3336" /> + </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:#a5efac;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + d="M 3,1 C 1.8954305,1 1,1.8954305 1,3 l 0,10 c 0,1.104569 0.8954305,2 2,2 l 10,0 c 1.104569,0 2,-0.895431 2,-2 L 15,3 C 15,1.8954305 14.104569,1 13,1 Z m 0,2 10,0 0,10 -10,0 z" + transform="translate(0,1036.3622)" + id="rect4140" + inkscape:connector-curvature="0" + sodipodi:nodetypes="sssssssssccccc" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_parallax_background.svg b/tools/editor/icons/source/icon_parallax_background.svg new file mode 100644 index 0000000000..e1b6a4fb2f --- /dev/null +++ b/tools/editor/icons/source/icon_parallax_background.svg @@ -0,0 +1,167 @@ +<?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/djrm/Projects/godot/tools/editor/icons/icon_canvas_item_shader_graph.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:docname="icon_parallax_background.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="31.999999" + inkscape:cx="5.3916748" + inkscape:cy="8.33855" + 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="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:snap-smooth-nodes="true" + inkscape:object-nodes="true"> + <inkscape:grid + type="xygrid" + id="grid3336" /> + </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)"> + <ellipse + r="2" + style="opacity:1;fill:#6e6e6e;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="ellipse4152" + cx="3" + cy="1039.3622" /> + <path + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" + id="path4232" + sodipodi:type="arc" + sodipodi:cx="2" + sodipodi:cy="1039.3622" + sodipodi:rx="1" + sodipodi:ry="1" + sodipodi:start="3.1415927" + sodipodi:end="4.712389" + d="m 1,1039.3622 a 1,1 0 0 1 1,-1 l 0,1 z" /> + <path + d="m -15,1039.3622 a 1,1 0 0 1 1,-1 l 0,1 z" + sodipodi:end="4.712389" + sodipodi:start="3.1415927" + sodipodi:ry="1" + sodipodi:rx="1" + sodipodi:cy="1039.3622" + sodipodi:cx="-14" + sodipodi:type="arc" + id="path4234" + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" + transform="scale(-1,1)" /> + <rect + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" + id="rect4236" + width="12" + height="1" + x="2" + y="1038.3622" /> + <rect + y="1049.3622" + x="2" + height="1" + width="12" + id="rect4238" + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" /> + <path + d="m 1,-1049.3622 a 1,1 0 0 1 1,-1 l 0,1 z" + sodipodi:end="4.712389" + sodipodi:start="3.1415927" + sodipodi:ry="1" + sodipodi:rx="1" + sodipodi:cy="-1049.3622" + sodipodi:cx="2" + sodipodi:type="arc" + id="path4242" + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" + transform="scale(1,-1)" /> + <path + transform="scale(-1,-1)" + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" + id="path4244" + sodipodi:type="arc" + sodipodi:cx="-14" + sodipodi:cy="-1049.3622" + sodipodi:rx="1" + sodipodi:ry="1" + sodipodi:start="3.1415927" + sodipodi:end="4.712389" + d="m -15,-1049.3622 a 1,1 0 0 1 1,-1 l 0,1 z" /> + <rect + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" + id="rect4246" + width="1" + height="10.000017" + x="1" + y="1039.3622" /> + <rect + y="1039.3622" + x="14" + height="10" + width="1" + id="rect4248" + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" /> + <path + style="fill:#e0e0e0;fill-opacity:0.99607843;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 7,1041.3622 -3,3 3,3 z" + id="path4250" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccc" /> + <path + sodipodi:nodetypes="cccc" + inkscape:connector-curvature="0" + id="path4252" + d="m 9,1041.3622 3,3 -3,3 z" + style="fill:#e0e0e0;fill-opacity:0.99607843;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_parallax_layer.svg b/tools/editor/icons/source/icon_parallax_layer.svg new file mode 100644 index 0000000000..022fdd5339 --- /dev/null +++ b/tools/editor/icons/source/icon_parallax_layer.svg @@ -0,0 +1,99 @@ +<?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/djrm/Projects/godot/tools/editor/icons/icon_canvas_item_shader_graph.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:docname="icon_parallax_layer.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="31.999999" + inkscape:cx="10.053658" + inkscape:cy="6.9687954" + 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="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:snap-smooth-nodes="true" + inkscape:object-nodes="true"> + <inkscape:grid + type="xygrid" + id="grid3336" /> + </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)"> + <ellipse + r="2" + style="opacity:1;fill:#6e6e6e;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="ellipse4152" + cx="3" + cy="1039.3622" /> + <path + style="fill:#a5b7f8;fill-opacity:0.98823529;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 7,1041.3622 -3,3 3,3 z" + id="path4250" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccc" /> + <path + sodipodi:nodetypes="cccc" + inkscape:connector-curvature="0" + id="path4252" + d="m 9,1041.3622 3,3 -3,3 z" + style="fill:#a5b7f8;fill-opacity:0.98823529;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + style="opacity:1;fill:#a5b7f8;fill-opacity:0.98823529;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + d="M 3,1 C 1.8954305,1 1,1.8954305 1,3 l 0,10 c 0,1.104569 0.8954305,2 2,2 l 10,0 c 1.104569,0 2,-0.895431 2,-2 L 15,3 C 15,1.8954305 14.104569,1 13,1 Z m 0,1 10,0 c 0.552281,9.6e-6 0.99999,0.4477192 1,1 l 0,10 c -10e-6,0.552281 -0.447719,0.99999 -1,1 L 3,14 C 2.4477192,13.99999 2.0000096,13.552281 2,13 L 2,3 c 9.6e-6,-0.5522808 0.4477192,-0.9999904 1,-1 z" + transform="translate(0,1036.3622)" + id="path4160" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccccccccccccccccc" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_plane.svg b/tools/editor/icons/source/icon_plane.svg new file mode 100644 index 0000000000..de5b5efc82 --- /dev/null +++ b/tools/editor/icons/source/icon_plane.svg @@ -0,0 +1,82 @@ +<?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" + sodipodi:docname="icon_plane.svg" + inkscape:export-ydpi="90" + inkscape:export-xdpi="90" + inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_box_shape.png" + inkscape:version="0.91 r13725" + version="1.1" + id="svg2" + viewBox="0 0 16 16" + height="16" + width="16"> + <sodipodi:namedview + inkscape:snap-smooth-nodes="false" + inkscape:object-nodes="false" + inkscape:snap-intersection-paths="false" + inkscape:object-paths="false" + inkscape:window-maximized="1" + inkscape:window-y="27" + inkscape:window-x="0" + inkscape:window-height="1016" + inkscape:window-width="1920" + inkscape:snap-center="true" + inkscape:snap-object-midpoints="true" + inkscape:snap-bbox-midpoints="true" + inkscape:snap-bbox-edge-midpoints="true" + inkscape:bbox-nodes="true" + inkscape:bbox-paths="true" + inkscape:snap-bbox="true" + units="px" + showgrid="true" + inkscape:current-layer="layer1" + inkscape:document-units="px" + inkscape:cy="8.9877784" + inkscape:cx="6.5696062" + inkscape:zoom="31.999999" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + borderopacity="1.0" + bordercolor="#666666" + pagecolor="#ffffff" + id="base"> + <inkscape:grid + id="grid3336" + type="xygrid" + empspacing="4" /> + </sodipodi:namedview> + <defs + id="defs4" /> + <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 + transform="translate(0,-1036.3622)" + id="layer1" + inkscape:groupmode="layer" + inkscape:label="Layer 1"> + <path + style="fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 1,1044.3622 7,3 7,-3 -7,-3 z" + id="path4149" + inkscape:connector-curvature="0" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_quat.svg b/tools/editor/icons/source/icon_quat.svg new file mode 100644 index 0000000000..36560d9d8f --- /dev/null +++ b/tools/editor/icons/source/icon_quat.svg @@ -0,0 +1,82 @@ +<?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/djrm/Projects/godot/tools/editor/icons/icon_add_track.png" + inkscape:export-xdpi="45" + inkscape:export-ydpi="45" + sodipodi:docname="icon_quat.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="22.627418" + inkscape:cx="2.0756935" + inkscape:cy="11.847423" + 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="false" + inkscape:snap-object-midpoints="true" + inkscape:snap-center="true" + inkscape:window-width="1920" + inkscape:window-height="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1"> + <inkscape:grid + type="xygrid" + id="grid3336" /> + </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="fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 7 1 L 7 7 L 9 7 L 9 1 L 7 1 z M 7 13 L 7 15 L 9 15 L 9 13 L 7 13 z " + transform="translate(0,1036.3622)" + id="rect4137" /> + <path + style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + d="m 11,1039.7528 0,2.0137 a 5,2.0000043 0 0 1 2,1.5957 5,2.0000043 0 0 1 -5,2 5,2.0000043 0 0 1 -5,-2 5,2.0000043 0 0 1 2,-1.5977 l 0,-2.0097 a 7,3.9999957 0 0 0 -4,3.6074 7,3.9999957 0 0 0 7,4 7,3.9999957 0 0 0 7,-4 7,3.9999957 0 0 0 -4,-3.6094 z" + id="path4190" + inkscape:connector-curvature="0" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_range.svg b/tools/editor/icons/source/icon_range.svg new file mode 100644 index 0000000000..1dd857ff32 --- /dev/null +++ b/tools/editor/icons/source/icon_range.svg @@ -0,0 +1,107 @@ +<?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/djrm/Projects/godot/tools/editor/icons/icon_center_container.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:docname="icon_range.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="45.254834" + inkscape:cx="6.7342772" + inkscape:cy="7.7859674" + 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="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1"> + <inkscape:grid + type="xygrid" + id="grid3336" /> + </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 /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-1036.3622)"> + <rect + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" + id="rect4158" + width="2" + height="10.000017" + x="1" + y="1039.3622" /> + <rect + y="1043.3622" + x="1" + height="2.0000348" + width="13" + id="rect4160" + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" /> + <rect + y="1039.3622" + x="13" + height="9.9999657" + width="2" + id="rect4162" + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" /> + <rect + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" + id="rect4137" + width="2" + height="6.0000172" + x="5" + y="1041.3622" /> + <rect + y="1041.3622" + x="9" + height="6" + width="2" + id="rect4139" + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_reload_small.svg b/tools/editor/icons/source/icon_reload_small.svg new file mode 100644 index 0000000000..2d891c2238 --- /dev/null +++ b/tools/editor/icons/source/icon_reload_small.svg @@ -0,0 +1,95 @@ +<?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="14" + height="14" + viewBox="0 0 14 14" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_tool_rotate.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:docname="icon_reload_small.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="32" + inkscape:cx="10.859062" + inkscape:cy="8.1812057" + 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="false" + inkscape:snap-object-midpoints="true" + inkscape:snap-center="true" + inkscape:window-width="1920" + inkscape:window-height="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1"> + <inkscape:grid + type="xygrid" + id="grid3336" /> + </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,-1038.3622)"> + <path + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + d="m 8,1039.3622 a 6.0000172,6.0000172 0 0 0 -6,6 l 2,0 a 4,4 0 0 1 4,-4 4,4 0 0 1 4,4 4,4 0 0 1 -4,4 l 0,2 a 6.0000172,6.0000172 0 0 0 6,-6 6.0000172,6.0000172 0 0 0 -6,-6 z" + id="path4138" + inkscape:connector-curvature="0" /> + <path + sodipodi:type="star" + style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path4142" + sodipodi:sides="3" + sodipodi:cx="3" + sodipodi:cy="1046.3622" + sodipodi:r1="2.236068" + sodipodi:r2="1.118034" + sodipodi:arg1="1.0471976" + sodipodi:arg2="2.0943951" + inkscape:flatsided="false" + inkscape:rounded="0" + inkscape:randomized="0" + d="m 4.1180339,1048.2987 -1.6770509,-0.9683 -1.67705101,-0.9682 1.67705101,-0.9683 1.6770511,-0.9682 -1e-7,1.9365 z" + inkscape:transform-center-x="0.00013164169" + transform="matrix(0,-1.1925797,1.5491989,0,-1618.0232,1050.2732)" + inkscape:transform-center-y="0.66664316" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_save.svg b/tools/editor/icons/source/icon_save.svg index 9e8ac03ad9..9307537d4b 100644 --- a/tools/editor/icons/source/icon_save.svg +++ b/tools/editor/icons/source/icon_save.svg @@ -28,9 +28,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="11.313708" - inkscape:cx="2.0254101" - inkscape:cy="14.320474" + inkscape:zoom="31.999999" + inkscape:cx="12.546235" + inkscape:cy="8.6646398" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" @@ -46,7 +46,9 @@ inkscape:window-height="1016" inkscape:window-x="0" inkscape:window-y="27" - inkscape:window-maximized="1"> + inkscape:window-maximized="1" + inkscape:snap-smooth-nodes="true" + inkscape:object-nodes="true"> <inkscape:grid type="xygrid" id="grid3336" /> @@ -59,7 +61,7 @@ <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> + <dc:title /> </cc:Work> </rdf:RDF> </metadata> @@ -70,8 +72,23 @@ transform="translate(0,-1036.3622)"> <path style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - d="M 3 1 A 2 2 0 0 0 1 3 L 1 13 A 2 2 0 0 0 3 15 L 13 15 A 2 2 0 0 0 15 13 L 15 5 L 11 1 L 3 1 z M 3 3 L 11 3 L 11 7 L 3 7 L 3 3 z M 8 9 A 2 2 0 0 1 10 11 A 2 2 0 0 1 8 13 A 2 2 0 0 1 6 11 A 2 2 0 0 1 8 9 z " + d="M 3,1 C 1.8954305,1 1,1.8954305 1,3 l 0,10 c 0,1.104569 0.8954305,2 2,2 l 10,0 c 1.104569,0 2,-0.895431 2,-2 L 15,5 11,1 Z m 0,0 8,0 0,6 -8,0 z m 5,8 c 1.1045695,0 2,0.8954305 2,2 0,1.104569 -0.8954305,2 -2,2 C 6.8954305,13 6,12.104569 6,11 6,9.8954305 6.8954305,9 8,9 Z" transform="translate(0,1036.3622)" - id="rect4135" /> + id="rect4135" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ssssssccscccccsssss" /> + <rect + style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4143" + width="3" + height="4.9999828" + x="4" + y="1037.3622" /> + <path + style="fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 11,1037.3622 1,0 3,3 0,2 -4,0 z" + id="path4145" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccccc" /> </g> </svg> diff --git a/tools/editor/icons/source/icon_string.svg b/tools/editor/icons/source/icon_string.svg new file mode 100644 index 0000000000..f32e82256f --- /dev/null +++ b/tools/editor/icons/source/icon_string.svg @@ -0,0 +1,77 @@ +<?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/djrm/Projects/godot/tools/editor/icons/icon_add_track.png" + inkscape:export-xdpi="45" + inkscape:export-ydpi="45" + sodipodi:docname="icon_string.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="32.000001" + inkscape:cx="4.1642221" + inkscape:cy="8.5720882" + 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="false" + inkscape:snap-object-midpoints="true" + inkscape:snap-center="true" + inkscape:window-width="1920" + inkscape:window-height="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1"> + <inkscape:grid + type="xygrid" + id="grid3336" /> + </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="fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 5 1 L 5 3 L 7 3 L 7 13 L 5 13 L 5 15 L 7 15 A 1 1 0 0 0 8 14 A 1 1 0 0 0 9 15 L 11 15 L 11 13 L 9 13 L 9 3 L 11 3 L 11 1 L 9 1 A 1 1 0 0 0 8 2 A 1 1 0 0 0 7 1 L 5 1 z " + transform="translate(0,1036.3622)" + id="rect4137" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_tabs.svg b/tools/editor/icons/source/icon_tabs.svg new file mode 100644 index 0000000000..1b389fc30c --- /dev/null +++ b/tools/editor/icons/source/icon_tabs.svg @@ -0,0 +1,155 @@ +<?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/djrm/Projects/godot/tools/editor/icons/icon_center_container.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:docname="icon_tabs.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="32" + inkscape:cx="3.2506704" + inkscape:cy="11.363584" + 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="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:snap-smooth-nodes="true" + inkscape:object-nodes="true" + inkscape:snap-intersection-paths="true"> + <inkscape:grid + type="xygrid" + id="grid3336" /> + </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 /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-1036.3622)"> + <rect + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4156" + width="1" + height="4.9999828" + x="1" + y="1042.3622" /> + <rect + y="-8" + x="1041.3622" + height="6" + width="1" + id="rect4159" + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + transform="matrix(0,1,-1,0,0,0)" /> + <rect + y="1042.3622" + x="8" + height="4.9999828" + width="1" + id="rect4161" + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <path + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path4163" + sodipodi:type="arc" + sodipodi:cx="2" + sodipodi:cy="1042.3622" + sodipodi:rx="1" + sodipodi:ry="1" + sodipodi:start="1.5707963" + sodipodi:end="0" + d="m 2,1043.3622 a 1,1 0 0 1 -0.9238795,-0.6173 1,1 0 0 1 0.2167727,-1.0898 1,1 0 0 1 1.0897902,-0.2168 A 1,1 0 0 1 3,1042.3622 l -1,0 z" /> + <path + d="m -8,1043.3622 a 1,1 0 0 1 -0.9238795,-0.6173 1,1 0 0 1 0.2167727,-1.0898 1,1 0 0 1 1.0897902,-0.2168 A 1,1 0 0 1 -7,1042.3622 l -1,0 z" + sodipodi:end="0" + sodipodi:start="1.5707963" + sodipodi:ry="1" + sodipodi:rx="1" + sodipodi:cy="1042.3622" + sodipodi:cx="-8" + sodipodi:type="arc" + id="path4165" + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + transform="scale(-1,1)" /> + <rect + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4167" + width="1" + height="4.9999828" + x="14" + y="1042.3622" /> + <rect + transform="matrix(0,1,-1,0,0,0)" + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4169" + width="1" + height="6" + x="1041.3622" + y="-14" /> + <path + transform="scale(-1,1)" + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path4171" + sodipodi:type="arc" + sodipodi:cx="-14" + sodipodi:cy="1042.3622" + sodipodi:rx="1" + sodipodi:ry="1" + sodipodi:start="1.5707963" + sodipodi:end="0" + d="m -14,1043.3622 a 1,1 0 0 1 -0.92388,-0.6173 1,1 0 0 1 0.216773,-1.0898 1,1 0 0 1 1.08979,-0.2168 1,1 0 0 1 0.617317,0.9239 l -1,0 z" /> + <rect + transform="matrix(0,1,-1,0,0,0)" + style="opacity:1;fill:#a5efac;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4173" + width="1" + height="13" + x="1046.3622" + y="-15" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_tween.svg b/tools/editor/icons/source/icon_tween.svg new file mode 100644 index 0000000000..5cb5cad227 --- /dev/null +++ b/tools/editor/icons/source/icon_tween.svg @@ -0,0 +1,98 @@ +<?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/djrm/Projects/godot/tools/editor/icons/icon_tween.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:docname="icon_tween.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="32" + inkscape:cx="6.0670176" + inkscape:cy="10.041334" + 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="false" + inkscape:snap-object-midpoints="true" + inkscape:snap-center="true" + inkscape:window-width="1920" + inkscape:window-height="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:snap-smooth-nodes="true" + inkscape:object-nodes="true"> + <inkscape:grid + type="xygrid" + id="grid3336" /> + </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 /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-1036.3622)"> + <path + style="fill:none;fill-rule:evenodd;stroke:#e0e0e0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 9,1050.3622 -7,0 0,-7" + id="path4138" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccc" /> + <path + sodipodi:nodetypes="ccc" + inkscape:connector-curvature="0" + id="path4140" + d="m 7,1038.3622 7,0 0,7" + style="fill:none;fill-rule:evenodd;stroke:#e0e0e0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <path + sodipodi:nodetypes="cccc" + inkscape:connector-curvature="0" + id="path4142" + d="m 6.0000002,1041.3622 4.9999998,0 0,5 z" + style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <path + inkscape:connector-curvature="0" + id="path4144" + d="m 2,1050.3622 7,-7" + style="fill:none;fill-rule:evenodd;stroke:#e0e0e0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + sodipodi:nodetypes="cc" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_viewport_sprite.svg b/tools/editor/icons/source/icon_viewport_sprite.svg new file mode 100644 index 0000000000..7e7a64144c --- /dev/null +++ b/tools/editor/icons/source/icon_viewport_sprite.svg @@ -0,0 +1,117 @@ +<?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/djrm/Projects/godot/tools/editor/icons/icon_sprite.png" + inkscape:export-xdpi="45" + inkscape:export-ydpi="45" + sodipodi:docname="icon_viewport_sprite.svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="45.254834" + inkscape:cx="3.6977136" + inkscape:cy="6.6658528" + 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="1016" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:snap-smooth-nodes="true" + inkscape:object-nodes="true" + inkscape:snap-intersection-paths="true"> + <inkscape:grid + type="xygrid" + id="grid3336" /> + </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)"> + <rect + style="opacity:1;fill:#fefeff;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" + id="rect4175" + width="1" + height="1" + x="20" + y="1042.3622" /> + <rect + y="1042.3622" + x="29" + height="1" + width="1" + id="rect4177" + style="opacity:1;fill:#fefeff;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" /> + <path + style="opacity:1;fill:#a5b7f8;fill-opacity:0.98823529;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 3,2 C 2.4695977,2.0000801 1.9609485,2.2108464 1.5859375,2.5859375 1.2108464,2.9609485 1.0000801,3.4695977 1,4 l 0,8 c 8.03e-5,0.530402 0.2108465,1.039051 0.5859375,1.414062 C 1.9609484,13.789153 2.4695976,13.99992 3,14 l 10,0 c 1.104569,0 2,-0.895431 2,-2 L 15,4 C 15,2.8954305 14.104569,2 13,2 Z m 0,1 10,0 c 0.552281,9.6e-6 0.99999,0.4477192 1,1 l 0,8 c -10e-6,0.552281 -0.447719,0.99999 -1,1 L 3,13 C 2.4477192,12.99999 2.0000096,12.552281 2,12 L 2,4 c 9.6e-6,-0.5522808 0.4477192,-0.9999904 1,-1 z" + transform="translate(0,1036.3622)" + id="rect4179" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccccsssscccccccccc" /> + <rect + style="opacity:1;fill:#a5b7f8;fill-opacity:0.98823529;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4213" + width="1" + height="1" + x="5" + y="1043.3622" /> + <rect + y="1043.3622" + x="10" + height="1" + width="1" + id="rect4215" + style="opacity:1;fill:#a5b7f8;fill-opacity:0.98823529;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <rect + y="1045.3622" + x="4" + height="1" + width="8" + id="rect4217" + style="opacity:1;fill:#a5b7f8;fill-opacity:0.98823529;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + </g> +</svg> diff --git a/tools/editor/icons/svgs_2_pngs.py b/tools/editor/icons/svgs_2_pngs.py index bfce8da53e..fd1e9017b6 100644 --- a/tools/editor/icons/svgs_2_pngs.py +++ b/tools/editor/icons/svgs_2_pngs.py @@ -6,10 +6,20 @@ import os.path from os import listdir from os.path import isfile, join import subprocess +import sys SVGS_PATH = 'source/' -OUT_DIR = '2x/' -DPI = 180 +OUT_DIR = './' +DPI = 90 + +if len(sys.argv) >= 2: + try: + scale = int(sys.argv[1]) + if scale > 1: + OUT_DIR = '%sx/' % scale + DPI *= scale + except: + pass def export_all(svgs_path=SVGS_PATH, out_dir=OUT_DIR, dpi=DPI): @@ -52,7 +62,7 @@ special_icons = { 'icon_animation_tree_player': dict( output_names=['icon_animation_tree'] ), 'icon_tool_rotate': dict( output_names=['icon_reload'] ), 'icon_multi_edit': dict( output_names=['icon_multi_node_edit'] ), - 'icon_folder': dict( output_names=['icon_load'] ), + 'icon_folder': dict( output_names=['icon_load', 'icon_open'] ), 'icon_file_list': dict( output_names=['icon_enum'] ), 'icon_collision_2d': dict( output_names=['icon_collision_polygon_2d', 'icon_polygon_2d'] ), 'icon_class_list': dict( output_names=['icon_filesystem'] ), diff --git a/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp b/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp new file mode 100644 index 0000000000..dca7d011ff --- /dev/null +++ b/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp @@ -0,0 +1,357 @@ +#include "editor_bitmask_import_plugin.h" +#include "io/image_loader.h" +#include "tools/editor/editor_file_dialog.h" +#include "tools/editor/editor_dir_dialog.h" +#include "tools/editor/editor_node.h" +#include "tools/editor/property_editor.h" +#include "io/resource_saver.h" +#include "os/file_access.h" +#include "io/marshalls.h" +#include "tools/editor/editor_settings.h" + +class _EditorBitMaskImportOptions : public Object { + + OBJ_TYPE(_EditorBitMaskImportOptions, Object); +public: + + bool _set(const StringName& p_name, const Variant& p_value) { + + return false; + } + + bool _get(const StringName& p_name, Variant &r_ret) const{ + + return false; + } + + void _get_property_list(List<PropertyInfo> *p_list) const{ + + } + + static void _bind_methods() { + + ADD_SIGNAL(MethodInfo("changed")); + } + + + _EditorBitMaskImportOptions() { + + } + +}; + +class EditorBitMaskImportDialog : public ConfirmationDialog { + + OBJ_TYPE(EditorBitMaskImportDialog, ConfirmationDialog); + + EditorBitMaskImportPlugin *plugin; + + LineEdit *import_path; + LineEdit *save_path; + EditorFileDialog *file_select; + EditorDirDialog *save_select; + ConfirmationDialog *error_dialog; + PropertyEditor *option_editor; + +public: + + void _choose_files(const Vector<String>& p_path) { + + String files; + for (int i = 0; i<p_path.size(); i++) { + + if (i>0) + files += ","; + files += p_path[i]; + } + + import_path->set_text(files); + + } + void _choose_save_dir(const String& p_path) { + + save_path->set_text(p_path); + } + + void _browse() { + + file_select->popup_centered_ratio(); + } + + void _browse_target() { + + save_select->popup_centered_ratio(); + + } + + + void popup_import(const String& p_path) { + + popup_centered(Size2(400, 100)*EDSCALE); + if (p_path != "") { + + Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(p_path); + ERR_FAIL_COND(!rimd.is_valid()); + + save_path->set_text(p_path.get_base_dir()); + + String src = ""; + for (int i = 0; i<rimd->get_source_count(); i++) { + if (i>0) + src += ","; + src += EditorImportPlugin::expand_source_path(rimd->get_source_path(i)); + } + import_path->set_text(src); + } + } + + + void _import() { + + Vector<String> bitmasks = import_path->get_text().split(","); + + if (bitmasks.size() == 0) { + error_dialog->set_text(TTR("No bit masks to import!")); + error_dialog->popup_centered(Size2(200, 100)*EDSCALE); + } + + if (save_path->get_text().strip_edges() == "") { + error_dialog->set_text(TTR("Target path is empty.")); + error_dialog->popup_centered_minsize(); + return; + } + + if (!save_path->get_text().begins_with("res://")) { + error_dialog->set_text(TTR("Target path must be a complete resource path.")); + error_dialog->popup_centered_minsize(); + return; + } + + if (!DirAccess::exists(save_path->get_text())) { + error_dialog->set_text(TTR("Target path must exist.")); + error_dialog->popup_centered_minsize(); + return; + } + + for (int i = 0; i<bitmasks.size(); i++) { + + Ref<ResourceImportMetadata> imd = memnew(ResourceImportMetadata); + + imd->add_source(EditorImportPlugin::validate_source_path(bitmasks[i])); + + String dst = save_path->get_text(); + if (dst == "") { + error_dialog->set_text(TTR("Save path is empty!")); + error_dialog->popup_centered(Size2(200, 100)*EDSCALE); + } + + dst = dst.plus_file(bitmasks[i].get_file().basename() + ".pbm"); + + Error err = plugin->import(dst, imd); + } + + hide(); + + } + + + void _notification(int p_what) { + + } + + static void _bind_methods() { + + + ObjectTypeDB::bind_method("_choose_files", &EditorBitMaskImportDialog::_choose_files); + ObjectTypeDB::bind_method("_choose_save_dir", &EditorBitMaskImportDialog::_choose_save_dir); + ObjectTypeDB::bind_method("_import", &EditorBitMaskImportDialog::_import); + ObjectTypeDB::bind_method("_browse", &EditorBitMaskImportDialog::_browse); + ObjectTypeDB::bind_method("_browse_target", &EditorBitMaskImportDialog::_browse_target); + // ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) ); + } + + EditorBitMaskImportDialog(EditorBitMaskImportPlugin *p_plugin) { + + plugin = p_plugin; + + + set_title(TTR("Import BitMasks")); + + VBoxContainer *vbc = memnew(VBoxContainer); + add_child(vbc); + set_child_rect(vbc); + + + HBoxContainer *hbc = memnew(HBoxContainer); + vbc->add_margin_child(TTR("Source Texture(s):"), hbc); + + import_path = memnew(LineEdit); + import_path->set_h_size_flags(SIZE_EXPAND_FILL); + hbc->add_child(import_path); + + Button * import_choose = memnew(Button); + import_choose->set_text(" .. "); + hbc->add_child(import_choose); + + import_choose->connect("pressed", this, "_browse"); + + hbc = memnew(HBoxContainer); + vbc->add_margin_child(TTR("Target Path:"), hbc); + + save_path = memnew(LineEdit); + save_path->set_h_size_flags(SIZE_EXPAND_FILL); + hbc->add_child(save_path); + + Button * save_choose = memnew(Button); + save_choose->set_text(" .. "); + hbc->add_child(save_choose); + + save_choose->connect("pressed", this, "_browse_target"); + + file_select = memnew(EditorFileDialog); + file_select->set_access(EditorFileDialog::ACCESS_FILESYSTEM); + add_child(file_select); + file_select->set_mode(EditorFileDialog::MODE_OPEN_FILES); + file_select->connect("files_selected", this, "_choose_files"); + + List<String> extensions; + ImageLoader::get_recognized_extensions(&extensions); + file_select->clear_filters(); + for (int i = 0; i<extensions.size(); i++) { + + file_select->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper()); + } + + save_select = memnew(EditorDirDialog); + add_child(save_select); + + // save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); + save_select->connect("dir_selected", this, "_choose_save_dir"); + + get_ok()->connect("pressed", this, "_import"); + get_ok()->set_text(TTR("Import")); + + + error_dialog = memnew(ConfirmationDialog); + add_child(error_dialog); + error_dialog->get_ok()->set_text(TTR("Accept")); + // error_dialog->get_cancel()->hide(); + + set_hide_on_ok(false); + } + + ~EditorBitMaskImportDialog() { + } + +}; + + +String EditorBitMaskImportPlugin::get_name() const { + + return "bitmask"; +} +String EditorBitMaskImportPlugin::get_visible_name() const{ + + return TTR("Bit Mask"); +} +void EditorBitMaskImportPlugin::import_dialog(const String& p_from){ + + dialog->popup_import(p_from); +} +Error EditorBitMaskImportPlugin::import(const String& p_path, const Ref<ResourceImportMetadata>& p_from){ + + ERR_FAIL_COND_V(p_from->get_source_count() != 1, ERR_INVALID_PARAMETER); + + Ref<ResourceImportMetadata> from = p_from; + + String src_path = EditorImportPlugin::expand_source_path(from->get_source_path(0)); + Ref<ImageTexture> it = ResourceLoader::load(src_path); + ERR_FAIL_COND_V(it.is_null(), ERR_CANT_OPEN); + + Ref<BitMap> target = memnew(BitMap); + target->create_from_image_alpha(it.ptr()->get_data()); + + from->set_source_md5(0, FileAccess::get_md5(src_path)); + from->set_editor(get_name()); + target->set_import_metadata(from); + + + Error err = ResourceSaver::save(p_path, target); + + return err; + +} + + +EditorBitMaskImportPlugin* EditorBitMaskImportPlugin::singleton = NULL; + + +void EditorBitMaskImportPlugin::import_from_drop(const Vector<String>& p_drop, const String &p_dest_path) { + + Vector<String> files; + + List<String> valid_extensions; + ImageLoader::get_recognized_extensions(&valid_extensions); + for(int i=0;i<p_drop.size();i++) { + + String extension=p_drop[i].extension().to_lower(); + + for (List<String>::Element *E=valid_extensions.front();E;E=E->next()) { + + if (E->get()==extension) { + files.push_back(p_drop[i]); + break; + } + } + } + + if (files.size()) { + import_dialog(); + dialog->_choose_files(files); + dialog->_choose_save_dir(p_dest_path); + } +} + +void EditorBitMaskImportPlugin::reimport_multiple_files(const Vector<String>& p_list) { + + if (p_list.size() == 0) + return; + + Vector<String> sources; + for (int i = 0; i<p_list.size(); i++) { + int idx; + EditorFileSystemDirectory *efsd = EditorFileSystem::get_singleton()->find_file(p_list[i], &idx); + if (efsd) { + for (int j = 0; j<efsd->get_source_count(idx); j++) { + String file = expand_source_path(efsd->get_source_file(idx, j)); + if (sources.find(file) == -1) { + sources.push_back(file); + } + + } + } + } + + if (sources.size()) { + + dialog->popup_import(p_list[0]); + dialog->_choose_files(sources); + dialog->_choose_save_dir(p_list[0].get_base_dir()); + } +} + +bool EditorBitMaskImportPlugin::can_reimport_multiple_files() const { + + return true; +} + +EditorBitMaskImportPlugin::EditorBitMaskImportPlugin(EditorNode* p_editor) { + + singleton = this; + dialog = memnew(EditorBitMaskImportDialog(this)); + p_editor->get_gui_base()->add_child(dialog); +} + +EditorBitMaskExportPlugin::EditorBitMaskExportPlugin() { + +} diff --git a/tools/editor/io_plugins/editor_bitmask_import_plugin.h b/tools/editor/io_plugins/editor_bitmask_import_plugin.h new file mode 100644 index 0000000000..d9ca33cd97 --- /dev/null +++ b/tools/editor/io_plugins/editor_bitmask_import_plugin.h @@ -0,0 +1,41 @@ +#ifndef EDITOR_BITMASK_IMPORT_PLUGIN_H +#define EDITOR_BITMASK_IMPORT_PLUGIN_H + +#include "tools/editor/editor_import_export.h" +#include "scene/resources/font.h" + +class EditorNode; +class EditorBitMaskImportDialog; + +class EditorBitMaskImportPlugin : public EditorImportPlugin { + + OBJ_TYPE(EditorBitMaskImportPlugin, EditorImportPlugin); + + EditorBitMaskImportDialog *dialog; +public: + + static EditorBitMaskImportPlugin *singleton; + + virtual String get_name() const; + virtual String get_visible_name() const; + virtual void import_dialog(const String& p_from = ""); + virtual Error import(const String& p_path, const Ref<ResourceImportMetadata>& p_from); + void import_from_drop(const Vector<String>& p_drop, const String &p_dest_path); + virtual void reimport_multiple_files(const Vector<String>& p_list); + virtual bool can_reimport_multiple_files() const; + + + EditorBitMaskImportPlugin(EditorNode* p_editor); +}; + +class EditorBitMaskExportPlugin : public EditorExportPlugin { + + OBJ_TYPE(EditorBitMaskExportPlugin, EditorExportPlugin); + + +public: + + EditorBitMaskExportPlugin(); +}; + +#endif // EDITOR_SAMPLE_IMPORT_PLUGIN_H diff --git a/tools/editor/io_plugins/editor_import_collada.cpp b/tools/editor/io_plugins/editor_import_collada.cpp index f008c4a736..f0aec113d1 100644 --- a/tools/editor/io_plugins/editor_import_collada.cpp +++ b/tools/editor/io_plugins/editor_import_collada.cpp @@ -355,6 +355,10 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Spatial *p_parent) { p_parent->add_child(node); node->set_owner(scene); + if (p_node->empty_draw_type!="") { + node->set_meta("empty_draw_type", Variant(p_node->empty_draw_type)); + } + for(int i=0;i<p_node->children.size();i++) { Error err = _create_scene(p_node->children[i],node); diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.cpp b/tools/editor/io_plugins/editor_scene_import_plugin.cpp index 594d3f5bcd..f346306f61 100644 --- a/tools/editor/io_plugins/editor_scene_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_scene_import_plugin.cpp @@ -41,6 +41,10 @@ #include "scene/3d/physics_body.h" #include "scene/3d/portal.h" #include "scene/3d/vehicle_body.h" +#include "scene/resources/sphere_shape.h" +#include <scene/resources/box_shape.h> +#include <scene/resources/ray_shape.h> +#include <scene/resources/plane_shape.h> #include "tools/editor/create_dialog.h" #include "os/os.h" @@ -1685,28 +1689,61 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh> mi->set_baked_light_texture_id(layer); } - if (p_flags&SCENE_FLAG_CREATE_COLLISIONS && _teststr(name,"colonly") && p_node->cast_to<MeshInstance>()) { + if (p_flags&SCENE_FLAG_CREATE_COLLISIONS && _teststr(name,"colonly")) { if (isroot) return p_node; - - MeshInstance *mi = p_node->cast_to<MeshInstance>(); - Node * col = mi->create_trimesh_collision_node(); - ERR_FAIL_COND_V(!col,NULL); - - col->set_name(_fixstr(name,"colonly")); - col->cast_to<Spatial>()->set_transform(mi->get_transform()); - p_node->replace_by(col); - memdelete(p_node); - p_node=col; - - StaticBody *sb = col->cast_to<StaticBody>(); - CollisionShape *colshape = memnew( CollisionShape); - colshape->set_shape(sb->get_shape(0)); - colshape->set_name("shape"); - sb->add_child(colshape); - colshape->set_owner(p_node->get_owner()); - + + if (p_node->cast_to<MeshInstance>()) { + MeshInstance *mi = p_node->cast_to<MeshInstance>(); + Node * col = mi->create_trimesh_collision_node(); + ERR_FAIL_COND_V(!col,NULL); + + col->set_name(_fixstr(name,"colonly")); + col->cast_to<Spatial>()->set_transform(mi->get_transform()); + p_node->replace_by(col); + memdelete(p_node); + p_node=col; + + StaticBody *sb = col->cast_to<StaticBody>(); + CollisionShape *colshape = memnew( CollisionShape); + colshape->set_shape(sb->get_shape(0)); + colshape->set_name("shape"); + sb->add_child(colshape); + colshape->set_owner(p_node->get_owner()); + } else if (p_node->has_meta("empty_draw_type")) { + String empty_draw_type = String(p_node->get_meta("empty_draw_type")); + print_line(empty_draw_type); + StaticBody *sb = memnew( StaticBody); + sb->set_name(_fixstr(name,"colonly")); + sb->cast_to<Spatial>()->set_transform(p_node->cast_to<Spatial>()->get_transform()); + p_node->replace_by(sb); + memdelete(p_node); + CollisionShape *colshape = memnew( CollisionShape); + if (empty_draw_type == "CUBE") { + BoxShape *boxShape = memnew( BoxShape); + boxShape->set_extents(Vector3(1, 1, 1)); + colshape->set_shape(boxShape); + colshape->set_name("BoxShape"); + } else if (empty_draw_type == "SINGLE_ARROW") { + RayShape *rayShape = memnew( RayShape); + rayShape->set_length(1); + colshape->set_shape(rayShape); + colshape->set_name("RayShape"); + sb->cast_to<Spatial>()->rotate_x(Math_PI / 2); + } else if (empty_draw_type == "IMAGE") { + PlaneShape *planeShape = memnew( PlaneShape); + colshape->set_shape(planeShape); + colshape->set_name("PlaneShape"); + } else { + SphereShape *sphereShape = memnew( SphereShape); + sphereShape->set_radius(1); + colshape->set_shape(sphereShape); + colshape->set_name("SphereShape"); + } + sb->add_child(colshape); + colshape->set_owner(sb->get_owner()); + } } else if (p_flags&SCENE_FLAG_CREATE_COLLISIONS &&_teststr(name,"col") && p_node->cast_to<MeshInstance>()) { diff --git a/tools/editor/plugins/sprite_region_editor_plugin.cpp b/tools/editor/plugins/texture_region_editor_plugin.cpp index 802a12eedd..b69b0d7a9b 100644 --- a/tools/editor/plugins/sprite_region_editor_plugin.cpp +++ b/tools/editor/plugins/texture_region_editor_plugin.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* sprite_region_editor_plugin.cpp */ +/* texture_region_editor_plugin.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -29,14 +29,20 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "sprite_region_editor_plugin.h" +#include "texture_region_editor_plugin.h" #include "scene/gui/check_box.h" #include "os/input.h" #include "os/keyboard.h" -void SpriteRegionEditor::_region_draw() +void TextureRegionEditor::_region_draw() { - Ref<Texture> base_tex = node->get_texture(); + Ref<Texture> base_tex = NULL; + if(node_type == "Sprite" && node_sprite) + base_tex = node_sprite->get_texture(); + else if(node_type == "Patch9Frame" && node_patch9) + base_tex = node_patch9->get_texture(); + else if(node_type == "StyleBoxTexture" && obj_styleBox) + base_tex = obj_styleBox->get_texture(); if (base_tex.is_null()) return; @@ -87,7 +93,9 @@ void SpriteRegionEditor::_region_draw() mtx.basis_xform(rect.pos+rect.size), mtx.basis_xform(rect.pos+Vector2(0,rect.size.y)) }; - + Color color(0.9,0.5,0.5); + if(this->editing_region == REGION_PATCH_MARGIN) + color = Color(0.21, 0.79, 0.31); for(int i=0;i<4;i++) { int prev = (i+3)%4; @@ -96,7 +104,7 @@ void SpriteRegionEditor::_region_draw() Vector2 ofs = ((endpoints[i] - endpoints[prev]).normalized() + ((endpoints[i] - endpoints[next]).normalized())).normalized(); ofs*=1.4144*(select_handle->get_size().width/2); - edit_draw->draw_line(endpoints[i]-draw_ofs, endpoints[next]-draw_ofs, Color(0.9,0.5,0.5), 2); + edit_draw->draw_line(endpoints[i]-draw_ofs, endpoints[next]-draw_ofs, color , 2); edit_draw->draw_texture(select_handle,(endpoints[i]+ofs-(select_handle->get_size()/2)).floor()-draw_ofs); @@ -124,7 +132,7 @@ void SpriteRegionEditor::_region_draw() updating_scroll=false; } -void SpriteRegionEditor::_region_input(const InputEvent& p_input) +void TextureRegionEditor::_region_input(const InputEvent& p_input) { Matrix32 mtx; mtx.elements[2]=-draw_ofs; @@ -154,7 +162,12 @@ void SpriteRegionEditor::_region_input(const InputEvent& p_input) drag_from=mtx.affine_inverse().xform(Vector2(mb.x,mb.y)); drag_from=snap_point(drag_from); drag=true; - rect_prev=node->get_region_rect(); + if(node_type == "Sprite" && node_sprite ) + rect_prev=node_sprite->get_region_rect(); + else if(node_type == "Patch9Frame" && node_patch9) + rect_prev=node_patch9->get_region_rect(); + else if(node_type == "StyleBoxTexture" && obj_styleBox) + rect_prev=obj_styleBox->get_region_rect(); drag_index=-1; for(int i=0;i<8;i++) { @@ -172,14 +185,20 @@ void SpriteRegionEditor::_region_input(const InputEvent& p_input) } } else if (drag) { - - undo_redo->create_action(TTR("Set region_rect")); - undo_redo->add_do_method(node,"set_region_rect",node->get_region_rect()); - undo_redo->add_undo_method(node,"set_region_rect",rect_prev); - undo_redo->add_do_method(edit_draw,"update"); - undo_redo->add_undo_method(edit_draw,"update"); - undo_redo->commit_action(); - + if(editing_region == REGION_TEXTURE_REGION) { + undo_redo->create_action("Set region_rect"); + if(node_type == "Sprite" && node_sprite ){ + undo_redo->add_do_method(node_sprite ,"set_region_rect",node_sprite->get_region_rect()); + undo_redo->add_undo_method(node_sprite,"set_region_rect",rect_prev); + } + else if(node_type == "Patch9Frame" && node_patch9){ + undo_redo->add_do_method(node_patch9 ,"set_region_rect",node_patch9->get_region_rect()); + undo_redo->add_undo_method(node_patch9,"set_region_rect",rect_prev); + } + undo_redo->add_do_method(edit_draw,"update"); + undo_redo->add_undo_method(edit_draw,"update"); + undo_redo->commit_action(); + } drag=false; } @@ -187,7 +206,7 @@ void SpriteRegionEditor::_region_input(const InputEvent& p_input) if (drag) { drag=false; - node->set_region_rect(rect_prev); + apply_rect(rect_prev); rect=rect_prev; edit_draw->update(); } @@ -218,60 +237,60 @@ void SpriteRegionEditor::_region_input(const InputEvent& p_input) if (creating) { rect = Rect2(drag_from,Size2()); rect.expand_to(new_pos); - node->set_region_rect(rect); + apply_rect(rect); edit_draw->update(); return; } switch(drag_index) { case 0: { - Vector2 p=rect_prev.pos+rect_prev.size; - rect = Rect2(p,Size2()); - rect.expand_to(new_pos); - node->set_region_rect(rect); - } break; + Vector2 p=rect_prev.pos+rect_prev.size; + rect = Rect2(p,Size2()); + rect.expand_to(new_pos); + apply_rect(rect); + } break; case 1: { - Vector2 p=rect_prev.pos+Vector2(0,rect_prev.size.y); - rect = Rect2(p,Size2(rect_prev.size.x,0)); - rect.expand_to(new_pos); - node->set_region_rect(rect); - } break; + Vector2 p=rect_prev.pos+Vector2(0,rect_prev.size.y); + rect = Rect2(p,Size2(rect_prev.size.x,0)); + rect.expand_to(new_pos); + apply_rect(rect); + } break; case 2: { - Vector2 p=rect_prev.pos+Vector2(0,rect_prev.size.y); - rect = Rect2(p,Size2()); - rect.expand_to(new_pos); - node->set_region_rect(rect); - } break; + Vector2 p=rect_prev.pos+Vector2(0,rect_prev.size.y); + rect = Rect2(p,Size2()); + rect.expand_to(new_pos); + apply_rect(rect); + } break; case 3: { - Vector2 p=rect_prev.pos; - rect = Rect2(p,Size2(0,rect_prev.size.y)); - rect.expand_to(new_pos); - node->set_region_rect(rect); - } break; + Vector2 p=rect_prev.pos; + rect = Rect2(p,Size2(0,rect_prev.size.y)); + rect.expand_to(new_pos); + apply_rect(rect); + } break; case 4: { - Vector2 p=rect_prev.pos; - rect = Rect2(p,Size2()); - rect.expand_to(new_pos); - node->set_region_rect(rect); - } break; + Vector2 p=rect_prev.pos; + rect = Rect2(p,Size2()); + rect.expand_to(new_pos); + apply_rect(rect); + } break; case 5: { - Vector2 p=rect_prev.pos; - rect = Rect2(p,Size2(rect_prev.size.x,0)); - rect.expand_to(new_pos); - node->set_region_rect(rect); - } break; + Vector2 p=rect_prev.pos; + rect = Rect2(p,Size2(rect_prev.size.x,0)); + rect.expand_to(new_pos); + apply_rect(rect); + } break; case 6: { - Vector2 p=rect_prev.pos+Vector2(rect_prev.size.x,0); - rect = Rect2(p,Size2()); - rect.expand_to(new_pos); - node->set_region_rect(rect); - } break; + Vector2 p=rect_prev.pos+Vector2(rect_prev.size.x,0); + rect = Rect2(p,Size2()); + rect.expand_to(new_pos); + apply_rect(rect); + } break; case 7: { - Vector2 p=rect_prev.pos+Vector2(rect_prev.size.x,0); - rect = Rect2(p,Size2(0,rect_prev.size.y)); - rect.expand_to(new_pos); - node->set_region_rect(rect); - } break; + Vector2 p=rect_prev.pos+Vector2(rect_prev.size.x,0); + rect = Rect2(p,Size2(0,rect_prev.size.y)); + rect.expand_to(new_pos); + apply_rect(rect); + } break; } edit_draw->update(); @@ -280,7 +299,7 @@ void SpriteRegionEditor::_region_input(const InputEvent& p_input) } } -void SpriteRegionEditor::_scroll_changed(float) +void TextureRegionEditor::_scroll_changed(float) { if (updating_scroll) return; @@ -292,47 +311,73 @@ void SpriteRegionEditor::_scroll_changed(float) edit_draw->update(); } -void SpriteRegionEditor::_set_use_snap(bool p_use) +void TextureRegionEditor::_set_use_snap(bool p_use) { use_snap=p_use; } -void SpriteRegionEditor::_set_show_grid(bool p_show) +void TextureRegionEditor::_set_show_grid(bool p_show) { snap_show_grid=p_show; edit_draw->update(); } -void SpriteRegionEditor::_set_snap_off_x(float p_val) +void TextureRegionEditor::_set_snap_off_x(float p_val) { snap_offset.x=p_val; edit_draw->update(); } -void SpriteRegionEditor::_set_snap_off_y(float p_val) +void TextureRegionEditor::_set_snap_off_y(float p_val) { snap_offset.y=p_val; edit_draw->update(); } -void SpriteRegionEditor::_set_snap_step_x(float p_val) +void TextureRegionEditor::_set_snap_step_x(float p_val) { snap_step.x=p_val; edit_draw->update(); } -void SpriteRegionEditor::_set_snap_step_y(float p_val) +void TextureRegionEditor::_set_snap_step_y(float p_val) { snap_step.y=p_val; edit_draw->update(); } -void SpriteRegionEditor::_notification(int p_what) +void TextureRegionEditor::apply_rect(const Rect2& rect){ + + if(this->editing_region == REGION_TEXTURE_REGION) { + if(node_sprite) + node_sprite->set_region_rect(rect); + else if(node_patch9) + node_patch9->set_region_rect(rect); + else if(obj_styleBox) + obj_styleBox->set_region_rect(rect); + } + else if(this->editing_region == REGION_PATCH_MARGIN) { + if(node_patch9) { + node_patch9->set_patch_margin(MARGIN_LEFT, rect.pos.x - tex_region.pos.x); + node_patch9->set_patch_margin(MARGIN_RIGHT, tex_region.pos.x+tex_region.size.width-(rect.pos.x+rect.size.width)); + node_patch9->set_patch_margin(MARGIN_TOP, rect.pos.y - tex_region.pos.y); + node_patch9->set_patch_margin(MARGIN_BOTTOM, tex_region.pos.y+tex_region.size.height-(rect.pos.y+rect.size.height)); + } + else if(obj_styleBox) { + obj_styleBox->set_margin_size(MARGIN_LEFT, rect.pos.x - tex_region.pos.x); + obj_styleBox->set_margin_size(MARGIN_RIGHT, tex_region.pos.x+tex_region.size.width-(rect.pos.x+rect.size.width)); + obj_styleBox->set_margin_size(MARGIN_TOP, rect.pos.y - tex_region.pos.y); + obj_styleBox->set_margin_size(MARGIN_BOTTOM, tex_region.pos.y+tex_region.size.height-(rect.pos.y+rect.size.height)); + } + } +} + +void TextureRegionEditor::_notification(int p_what) { switch(p_what) { - - case NOTIFICATION_READY: { - edit_node->set_icon( get_icon("RegionEdit","EditorIcons")); + case NOTIFICATION_READY: { + region_button->set_icon( get_icon("RegionEdit","EditorIcons")); + margin_button->set_icon( get_icon("Patch9Frame", "EditorIcons")); b_snap_grid->set_icon( get_icon("Grid", "EditorIcons")); b_snap_enable->set_icon( get_icon("Snap", "EditorIcons")); icon_zoom->set_texture( get_icon("Zoom", "EditorIcons")); @@ -340,60 +385,129 @@ void SpriteRegionEditor::_notification(int p_what) } } -void SpriteRegionEditor::_node_removed(Node *p_node) +void TextureRegionEditor::_node_removed(Object *p_obj) { - if(p_node==node) { - node=NULL; + if(p_obj == node_sprite || p_obj == node_patch9 || p_obj == obj_styleBox) { + node_patch9 = NULL; + node_sprite = NULL; + obj_styleBox = NULL; hide(); } } -void SpriteRegionEditor::_bind_methods() +void TextureRegionEditor::_bind_methods() { - ObjectTypeDB::bind_method(_MD("_edit_node"),&SpriteRegionEditor::_edit_node); - ObjectTypeDB::bind_method(_MD("_region_draw"),&SpriteRegionEditor::_region_draw); - ObjectTypeDB::bind_method(_MD("_region_input"),&SpriteRegionEditor::_region_input); - ObjectTypeDB::bind_method(_MD("_scroll_changed"),&SpriteRegionEditor::_scroll_changed); - ObjectTypeDB::bind_method(_MD("_node_removed"),&SpriteRegionEditor::_node_removed); - ObjectTypeDB::bind_method(_MD("_set_use_snap"),&SpriteRegionEditor::_set_use_snap); - ObjectTypeDB::bind_method(_MD("_set_show_grid"),&SpriteRegionEditor::_set_show_grid); - ObjectTypeDB::bind_method(_MD("_set_snap_off_x"),&SpriteRegionEditor::_set_snap_off_x); - ObjectTypeDB::bind_method(_MD("_set_snap_off_y"),&SpriteRegionEditor::_set_snap_off_y); - ObjectTypeDB::bind_method(_MD("_set_snap_step_x"),&SpriteRegionEditor::_set_snap_step_x); - ObjectTypeDB::bind_method(_MD("_set_snap_step_y"),&SpriteRegionEditor::_set_snap_step_y); + ObjectTypeDB::bind_method(_MD("_edit_node"),&TextureRegionEditor::_edit_node); + ObjectTypeDB::bind_method(_MD("_edit_region"),&TextureRegionEditor::_edit_region); + ObjectTypeDB::bind_method(_MD("_edit_margin"),&TextureRegionEditor::_edit_margin); + ObjectTypeDB::bind_method(_MD("_region_draw"),&TextureRegionEditor::_region_draw); + ObjectTypeDB::bind_method(_MD("_region_input"),&TextureRegionEditor::_region_input); + ObjectTypeDB::bind_method(_MD("_scroll_changed"),&TextureRegionEditor::_scroll_changed); + ObjectTypeDB::bind_method(_MD("_node_removed"),&TextureRegionEditor::_node_removed); + ObjectTypeDB::bind_method(_MD("_set_use_snap"),&TextureRegionEditor::_set_use_snap); + ObjectTypeDB::bind_method(_MD("_set_show_grid"),&TextureRegionEditor::_set_show_grid); + ObjectTypeDB::bind_method(_MD("_set_snap_off_x"),&TextureRegionEditor::_set_snap_off_x); + ObjectTypeDB::bind_method(_MD("_set_snap_off_y"),&TextureRegionEditor::_set_snap_off_y); + ObjectTypeDB::bind_method(_MD("_set_snap_step_x"),&TextureRegionEditor::_set_snap_step_x); + ObjectTypeDB::bind_method(_MD("_set_snap_step_y"),&TextureRegionEditor::_set_snap_step_y); } -void SpriteRegionEditor::edit(Node *p_sprite) +void TextureRegionEditor::edit(Object *p_obj) { - if (p_sprite) { - node=p_sprite->cast_to<Sprite>(); - node->connect("exit_tree",this,"_node_removed",varray(p_sprite),CONNECT_ONESHOT); + if (p_obj) { + margin_button->hide(); + node_type = p_obj->get_type(); + if(node_type == "Sprite"){ + node_sprite = p_obj->cast_to<Sprite>(); + node_patch9 = NULL; + obj_styleBox = NULL; + } + else if(node_type == "Patch9Frame") { + node_patch9 = p_obj->cast_to<Patch9Frame>(); + node_sprite = NULL; + obj_styleBox = NULL; + margin_button->show(); + } + else if(node_type == "StyleBoxTexture") { + obj_styleBox = p_obj->cast_to<StyleBoxTexture>(); + node_sprite = NULL; + node_patch9 = NULL; + margin_button->show(); + } + p_obj->connect("exit_tree",this,"_node_removed",varray(p_obj),CONNECT_ONESHOT); } else { - if (node) - node->disconnect("exit_tree",this,"_node_removed"); - node=NULL; + if(node_sprite) + node_sprite->disconnect("exit_tree",this,"_node_removed"); + else if(node_patch9) + node_patch9->disconnect("exit_tree",this,"_node_removed"); + else if(obj_styleBox) + obj_styleBox->disconnect("exit_tree",this,"_node_removed"); + node_sprite = NULL; + node_patch9 = NULL; + obj_styleBox = NULL; } +} +void TextureRegionEditor::_edit_region() +{ + this->_edit_node(REGION_TEXTURE_REGION); + dlg_editor->set_title(TTR("Texture Region Editor")); } -void SpriteRegionEditor::_edit_node() + +void TextureRegionEditor::_edit_margin() { - if (node->get_texture().is_null()) { + this->_edit_node(REGION_PATCH_MARGIN); + dlg_editor->set_title(TTR("Scale Region Editor")); +} - error->set_text("No texture in this sprite.\nSet a texture to be able to edit Region."); +void TextureRegionEditor::_edit_node(int region) +{ + Ref<Texture> texture = NULL; + if(node_type == "Sprite" && node_sprite ) + texture = node_sprite->get_texture(); + else if(node_type == "Patch9Frame" && node_patch9 ) + texture = node_patch9->get_texture(); + else if(node_type == "StyleBoxTexture" && obj_styleBox) + texture = obj_styleBox->get_texture(); + + if (texture.is_null()) { + error->set_text(TTR("No texture in this node.\nSet a texture to be able to edit region.")); error->popup_centered_minsize(); return; } - rect=node->get_region_rect(); + if(node_type == "Sprite" && node_sprite ) + tex_region = node_sprite->get_region_rect(); + else if(node_type == "Patch9Frame" && node_patch9 ) + tex_region = node_patch9->get_region_rect(); + else if(node_type == "StyleBoxTexture" && obj_styleBox) + tex_region = obj_styleBox->get_region_rect(); + rect = tex_region; + + if(region == REGION_PATCH_MARGIN) { + if(node_patch9){ + Patch9Frame *node = node_patch9; + rect.pos += Point2(node->get_patch_margin(MARGIN_LEFT),node->get_patch_margin(MARGIN_TOP)); + rect.size -= Size2(node->get_patch_margin(MARGIN_RIGHT)+node->get_patch_margin(MARGIN_LEFT), node->get_patch_margin(MARGIN_BOTTOM)+node->get_patch_margin(MARGIN_TOP)); + } + else if(obj_styleBox) { + StyleBoxTexture * node = obj_styleBox; + rect.pos += Point2(node->get_margin_size(MARGIN_LEFT),node->get_margin_size(MARGIN_TOP)); + rect.size -= Size2(node->get_margin_size(MARGIN_RIGHT)+node->get_margin_size(MARGIN_LEFT), node->get_margin_size(MARGIN_BOTTOM)+node->get_margin_size(MARGIN_TOP)); + } + } + dlg_editor->popup_centered_ratio(0.85); dlg_editor->get_ok()->release_focus(); + + editing_region = region; } inline float _snap_scalar(float p_offset, float p_step, float p_target) { return p_step != 0 ? Math::stepify(p_target - p_offset, p_step) + p_offset : p_target; } -Vector2 SpriteRegionEditor::snap_point(Vector2 p_target) const { +Vector2 TextureRegionEditor::snap_point(Vector2 p_target) const { if (use_snap) { p_target.x = _snap_scalar(snap_offset.x, snap_step.x, p_target.x); p_target.y = _snap_scalar(snap_offset.y, snap_step.y, p_target.y); @@ -403,9 +517,10 @@ Vector2 SpriteRegionEditor::snap_point(Vector2 p_target) const { return p_target; } -SpriteRegionEditor::SpriteRegionEditor(EditorNode* p_editor) +TextureRegionEditor::TextureRegionEditor(EditorNode* p_editor) { - node=NULL; + node_sprite = NULL; + node_patch9 = NULL; editor=p_editor; undo_redo = editor->get_undo_redo(); @@ -415,14 +530,18 @@ SpriteRegionEditor::SpriteRegionEditor(EditorNode* p_editor) drag=false; add_child( memnew( VSeparator )); - edit_node = memnew( ToolButton ); - add_child(edit_node); - edit_node->set_tooltip(TTR("Sprite Region Editor")); - edit_node->connect("pressed",this,"_edit_node"); + region_button = memnew( ToolButton ); + add_child(region_button); + region_button->set_tooltip(TTR("Texture Region Editor")); + region_button->connect("pressed",this,"_edit_region"); + + margin_button = memnew( ToolButton ); + add_child(margin_button); + margin_button->set_tooltip(TTR("Scale Region Editor")); + margin_button->connect("pressed",this,"_edit_margin"); dlg_editor = memnew( AcceptDialog ); add_child(dlg_editor); - dlg_editor->set_title(TTR("Sprite Region Editor")); dlg_editor->set_self_opacity(0.9); VBoxContainer *main_vb = memnew( VBoxContainer ); @@ -535,17 +654,17 @@ SpriteRegionEditor::SpriteRegionEditor(EditorNode* p_editor) } -void SpriteRegionEditorPlugin::edit(Object *p_node) +void TextureRegionEditorPlugin::edit(Object *p_node) { - region_editor->edit(p_node->cast_to<Node>()); + region_editor->edit(p_node); } -bool SpriteRegionEditorPlugin::handles(Object *p_node) const +bool TextureRegionEditorPlugin::handles(Object *p_obj) const { - return p_node->is_type("Sprite"); + return p_obj->is_type("Sprite") || p_obj->is_type("Patch9Frame") || p_obj->is_type("StyleBoxTexture"); } -void SpriteRegionEditorPlugin::make_visible(bool p_visible) +void TextureRegionEditorPlugin::make_visible(bool p_visible) { if (p_visible) { region_editor->show(); @@ -556,7 +675,7 @@ void SpriteRegionEditorPlugin::make_visible(bool p_visible) } -Dictionary SpriteRegionEditorPlugin::get_state() const { +Dictionary TextureRegionEditorPlugin::get_state() const { Dictionary state; state["zoom"]=region_editor->zoom->get_val(); @@ -567,7 +686,7 @@ Dictionary SpriteRegionEditorPlugin::get_state() const { return state; } -void SpriteRegionEditorPlugin::set_state(const Dictionary& p_state){ +void TextureRegionEditorPlugin::set_state(const Dictionary& p_state){ Dictionary state=p_state; if (state.has("zoom")) { @@ -599,12 +718,11 @@ void SpriteRegionEditorPlugin::set_state(const Dictionary& p_state){ } } -SpriteRegionEditorPlugin::SpriteRegionEditorPlugin(EditorNode *p_node) +TextureRegionEditorPlugin::TextureRegionEditorPlugin(EditorNode *p_node) { editor = p_node; - region_editor= memnew ( SpriteRegionEditor(p_node) ); + region_editor= memnew ( TextureRegionEditor(p_node) ); CanvasItemEditor::get_singleton()->add_control_to_menu_panel(region_editor); region_editor->hide(); } - diff --git a/tools/editor/plugins/sprite_region_editor_plugin.h b/tools/editor/plugins/texture_region_editor_plugin.h index 47cb210863..951b11e1e6 100644 --- a/tools/editor/plugins/sprite_region_editor_plugin.h +++ b/tools/editor/plugins/texture_region_editor_plugin.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* sprite_region_editor_plugin.h */ +/* texture_region_editor_plugin.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -29,22 +29,27 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef SPRITE_REGION_EDITOR_PLUGIN_H -#define SPRITE_REGION_EDITOR_PLUGIN_H +#ifndef TEXTURE_REGION_EDITOR_PLUGIN_H +#define TEXTURE_REGION_EDITOR_PLUGIN_H #include "canvas_item_editor_plugin.h" #include "tools/editor/editor_plugin.h" #include "tools/editor/editor_node.h" #include "scene/2d/sprite.h" +#include "scene/gui/patch_9_frame.h" +#include "scene/resources/style_box.h" -class SpriteRegionEditor : public HBoxContainer { +class TextureRegionEditor : public HBoxContainer { - OBJ_TYPE(SpriteRegionEditor, HBoxContainer ); + OBJ_TYPE(TextureRegionEditor, HBoxContainer ); + enum RegionType { + REGION_TEXTURE_REGION, + REGION_PATCH_MARGIN + }; - friend class SpriteRegionEditorPlugin; - - ToolButton *edit_node; -// Button *use_region; + friend class TextureRegionEditorPlugin; + ToolButton *region_button; + ToolButton *margin_button; ToolButton *b_snap_enable; ToolButton *b_snap_grid; TextureFrame *icon_zoom; @@ -59,7 +64,6 @@ class SpriteRegionEditor : public HBoxContainer { VScrollBar *vscroll; HScrollBar *hscroll; - Sprite *node; EditorNode *editor; AcceptDialog *dlg_editor; UndoRedo* undo_redo; @@ -73,8 +77,17 @@ class SpriteRegionEditor : public HBoxContainer { Vector2 snap_offset; Vector2 snap_step; + + String node_type; + Patch9Frame *node_patch9; + Sprite *node_sprite; + StyleBoxTexture *obj_styleBox; + + int editing_region; Rect2 rect; Rect2 rect_prev; + Rect2 tex_region; + bool drag; bool creating; Vector2 drag_from; @@ -88,34 +101,34 @@ class SpriteRegionEditor : public HBoxContainer { void _set_snap_off_y(float p_val); void _set_snap_step_x(float p_val); void _set_snap_step_y(float p_val); - + void apply_rect(const Rect2& rect); protected: void _notification(int p_what); - void _node_removed(Node *p_node); + void _node_removed(Object *p_obj); static void _bind_methods(); Vector2 snap_point(Vector2 p_target) const; public: - void edit(); - void _edit_node(); + void _edit_node(int tex_region); + void _edit_region(); + void _edit_margin(); void _region_draw(); void _region_input(const InputEvent &p_input); void _scroll_changed(float); - void edit(Node *p_sprite); - SpriteRegionEditor(EditorNode* p_editor); + void edit(Object *p_obj); + TextureRegionEditor(EditorNode* p_editor); }; -class SpriteRegionEditorPlugin : public EditorPlugin +class TextureRegionEditorPlugin : public EditorPlugin { + OBJ_TYPE( TextureRegionEditorPlugin, EditorPlugin ); - OBJ_TYPE( SpriteRegionEditorPlugin, EditorPlugin ); - - SpriteRegionEditor *region_editor; + TextureRegionEditor *region_editor; EditorNode *editor; public: @@ -127,7 +140,7 @@ public: void set_state(const Dictionary &p_state); Dictionary get_state() const; - SpriteRegionEditorPlugin(EditorNode *p_node); + TextureRegionEditorPlugin(EditorNode *p_node); }; -#endif // SPRITE_REGION_EDITOR_PLUGIN_H +#endif // TEXTURE_REGION_EDITOR_PLUGIN_H diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp index af57d5264e..84d6a87688 100644 --- a/tools/editor/project_manager.cpp +++ b/tools/editor/project_manager.cpp @@ -45,8 +45,9 @@ #include "io/resource_saver.h" #include "editor_icons.h" +#include "editor_fonts.h" - +#include "editor_scale.h" class NewProjectDialog : public ConfirmationDialog { @@ -829,6 +830,17 @@ ProjectManager::ProjectManager() { if (!EditorSettings::get_singleton()) EditorSettings::create(); + { + int dpi_mode = EditorSettings::get_singleton()->get("global/hidpi_mode"); + if (dpi_mode==0) { + editor_set_hidpi( OS::get_singleton()->get_screen_dpi(0) > 150 ); + } else if (dpi_mode==2) { + editor_set_hidpi(true); + } else { + editor_set_hidpi(false); + } + } + FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files")); set_area_as_parent_rect(); @@ -836,6 +848,7 @@ ProjectManager::ProjectManager() { Ref<Theme> theme = Ref<Theme>( memnew( Theme ) ); set_theme(theme); editor_register_icons(theme); + editor_register_fonts(theme); String global_font = EditorSettings::get_singleton()->get("global/font"); if (global_font!="") { diff --git a/tools/editor/project_settings.cpp b/tools/editor/project_settings.cpp index 86f1ae6f9f..6822e50b73 100644 --- a/tools/editor/project_settings.cpp +++ b/tools/editor/project_settings.cpp @@ -834,35 +834,104 @@ void ProjectSettings::_autoload_edited() { return; TreeItem *ti = autoload_list->get_edited(); - if (!ti || autoload_list->get_edited_column()!=2) + int column = autoload_list->get_edited_column(); + + if (!ti || (column != 0 && column != 2)) return; - updating_autoload=true; - bool checked=ti->is_checked(2); + if (column == 0) { + String name = ti->get_text(0); + String old_name = selected_autoload.substr(selected_autoload.find("/")+1,selected_autoload.length()); - String base="autoload/"+ti->get_text(0); + if (!name.is_valid_identifier()) { + ti->set_text(0,old_name); + message->set_text(TTR("Invalid name.")+"\n"+TTR("Valid characters:")+" a-z, A-Z, 0-9 or _"); + message->popup_centered(Size2(300,100)); + return; + } - String path = Globals::get_singleton()->get(base); - int order = Globals::get_singleton()->get_order(base); + if (ObjectTypeDB::type_exists(name)) { + ti->set_text(0,old_name); + message->set_text(TTR("Invalid name. Must not collide with an existing engine class name.")); + message->popup_centered(Size2(400,100)); + return; + } - if (path.begins_with("*")) - path=path.substr(1,path.length()); + for(int i=0;i<Variant::VARIANT_MAX;i++) { + if (Variant::get_type_name(Variant::Type(i))==name) { + ti->set_text(0,old_name); + message->set_text(TTR("Invalid name. Must not collide with an existing buit-in type name.")); + message->popup_centered(Size2(400,100)); + return; + } + } - if (checked) - path="*"+path; + for(int i=0;i<GlobalConstants::get_global_constant_count();i++) { + if (GlobalConstants::get_global_constant_name(i)==name) { + ti->set_text(0,old_name); + message->set_text(TTR("Invalid name. Must not collide with an existing global constant name.")); + message->popup_centered(Size2(400,100)); + return; + } + } - undo_redo->create_action(TTR("Toggle AutoLoad Globals")); - undo_redo->add_do_property(Globals::get_singleton(),base,path); - undo_redo->add_undo_property(Globals::get_singleton(),base,Globals::get_singleton()->get(base)); - undo_redo->add_do_method(Globals::get_singleton(),"set_order",base,order); // keep order, as config order matters for these - undo_redo->add_undo_method(Globals::get_singleton(),"set_order",base,order); - undo_redo->add_do_method(this,"_update_autoload"); - undo_redo->add_undo_method(this,"_update_autoload"); - undo_redo->add_do_method(this,"_settings_changed"); - undo_redo->add_undo_method(this,"_settings_changed"); - undo_redo->commit_action(); - updating_autoload=false; + if (Globals::get_singleton()->has("autoload/"+name)) { + ti->set_text(0,old_name); + message->set_text(vformat(TTR("Autoload '%s' already exists!"),name)); + message->popup_centered(Size2(300,100)); + return; + } + + updating_autoload = true; + + name = "autoload/"+name; + String path = Globals::get_singleton()->get(selected_autoload); + bool is_persisting = Globals::get_singleton()->is_persisting(selected_autoload); + int order = Globals::get_singleton()->get_order(selected_autoload); + + undo_redo->create_action(TTR("Rename Autoload")); + undo_redo->add_do_property(Globals::get_singleton(),name,path); + undo_redo->add_do_method(Globals::get_singleton(),"set_persisting",name,is_persisting); + undo_redo->add_do_method(Globals::get_singleton(),"set_order",name,order); + undo_redo->add_do_method(Globals::get_singleton(),"clear",selected_autoload); + undo_redo->add_undo_property(Globals::get_singleton(),selected_autoload,path); + undo_redo->add_undo_method(Globals::get_singleton(),"set_persisting",selected_autoload,is_persisting); + undo_redo->add_undo_method(Globals::get_singleton(),"set_order",selected_autoload,order); + undo_redo->add_undo_method(Globals::get_singleton(),"clear",name); + undo_redo->add_do_method(this,"_update_autoload"); + undo_redo->add_undo_method(this,"_update_autoload"); + undo_redo->add_do_method(this,"_settings_changed"); + undo_redo->add_undo_method(this,"_settings_changed"); + undo_redo->commit_action(); + + selected_autoload = name; + } else if (column == 2) { + updating_autoload = true; + bool checked = ti->is_checked(2); + String base = "autoload/"+ti->get_text(0); + String path = Globals::get_singleton()->get(base); + int order = Globals::get_singleton()->get_order(base); + + if (path.begins_with("*")) + path = path.substr(1,path.length()); + + if (checked) + path = "*" + path; + + undo_redo->create_action(TTR("Toggle AutoLoad Globals")); + undo_redo->add_do_property(Globals::get_singleton(),base,path); + undo_redo->add_undo_property(Globals::get_singleton(),base,Globals::get_singleton()->get(base)); + undo_redo->add_do_method(Globals::get_singleton(),"set_order",base,order); // keep order, as config order matters for these + undo_redo->add_undo_method(Globals::get_singleton(),"set_order",base,order); + undo_redo->add_do_method(this,"_update_autoload"); + undo_redo->add_undo_method(this,"_update_autoload"); + undo_redo->add_do_method(this,"_settings_changed"); + undo_redo->add_undo_method(this,"_settings_changed"); + undo_redo->commit_action(); + } + + updating_autoload = false; } void ProjectSettings::_autoload_add() { @@ -990,6 +1059,14 @@ void ProjectSettings::_autoload_delete(Object *p_item,int p_column, int p_button } +void ProjectSettings::_autoload_selected() { + TreeItem *ti = autoload_list->get_selected(); + + if (!ti) + return; + + selected_autoload = "autoload/"+ti->get_text(0); +} void ProjectSettings::_translation_delete(Object *p_item,int p_column, int p_button) { @@ -1348,6 +1425,7 @@ void ProjectSettings::_update_autoload() { } TreeItem *t = autoload_list->create_item(root); t->set_text(0,name); + t->set_editable(0,true); t->set_text(1,path); t->set_cell_mode(2,TreeItem::CELL_MODE_CHECK); t->set_editable(2,true); @@ -1436,6 +1514,7 @@ void ProjectSettings::_bind_methods() { ObjectTypeDB::bind_method(_MD("_update_autoload"),&ProjectSettings::_update_autoload); ObjectTypeDB::bind_method(_MD("_autoload_delete"),&ProjectSettings::_autoload_delete); ObjectTypeDB::bind_method(_MD("_autoload_edited"),&ProjectSettings::_autoload_edited); + ObjectTypeDB::bind_method(_MD("_autoload_selected"),&ProjectSettings::_autoload_selected); ObjectTypeDB::bind_method(_MD("_clear_search_box"),&ProjectSettings::_clear_search_box); ObjectTypeDB::bind_method(_MD("_toggle_search_bar"),&ProjectSettings::_toggle_search_bar); @@ -1838,6 +1917,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) { autoload_list->connect("button_pressed",this,"_autoload_delete"); autoload_list->connect("item_edited",this,"_autoload_edited"); + autoload_list->connect("cell_selected", this, "_autoload_selected"); updating_autoload=false; diff --git a/tools/editor/project_settings.h b/tools/editor/project_settings.h index 113cc49b7c..5108378ff7 100644 --- a/tools/editor/project_settings.h +++ b/tools/editor/project_settings.h @@ -91,6 +91,7 @@ class ProjectSettings : public AcceptDialog { Tree *autoload_list; + String selected_autoload; EditorFileDialog *autoload_file_open; LineEdit *autoload_add_name; LineEdit *autoload_add_path; @@ -104,6 +105,7 @@ class ProjectSettings : public AcceptDialog { void _autoload_edited(); void _autoload_file_open(); void _autoload_delete(Object *p_item,int p_column, int p_button); + void _autoload_selected(); bool updating_autoload; diff --git a/tools/editor/spatial_editor_gizmos.cpp b/tools/editor/spatial_editor_gizmos.cpp index c32e3a2116..1ca62d3a63 100644 --- a/tools/editor/spatial_editor_gizmos.cpp +++ b/tools/editor/spatial_editor_gizmos.cpp @@ -1024,6 +1024,28 @@ LightSpatialGizmo::LightSpatialGizmo(Light* p_light){ set_spatial_node(p_light); } +////// + +void ListenerSpatialGizmo::redraw() { + + clear(); + + add_unscaled_billboard(SpatialEditorGizmos::singleton->listener_icon, 0.05); + + add_mesh(SpatialEditorGizmos::singleton->listener_line_mesh); + Vector<Vector3> cursor_points; + cursor_points.push_back(Vector3(0, 0, 0)); + cursor_points.push_back(Vector3(0, 0, -1.0)); + add_collision_segments(cursor_points); + +} + +ListenerSpatialGizmo::ListenerSpatialGizmo(Listener* p_listener){ + + set_spatial_node(p_listener); + listener = p_listener; +} + ////// @@ -2907,6 +2929,12 @@ Ref<SpatialEditorGizmo> SpatialEditorGizmos::get_gizmo(Spatial *p_spatial) { return lsg; } + if (p_spatial->cast_to<Listener>()) { + + Ref<ListenerSpatialGizmo> misg = memnew(ListenerSpatialGizmo(p_spatial->cast_to<Listener>())); + return misg; + } + if (p_spatial->cast_to<Camera>()) { Ref<CameraSpatialGizmo> lsg = memnew( CameraSpatialGizmo(p_spatial->cast_to<Camera>()) ); @@ -3141,6 +3169,29 @@ SpatialEditorGizmos::SpatialEditorGizmos() { pos3d_mesh->surface_set_material(0,mat); } + listener_line_mesh = Ref<Mesh>(memnew(Mesh)); + { + + DVector<Vector3> cursor_points; + DVector<Color> cursor_colors; + cursor_points.push_back(Vector3(0, 0, 0)); + cursor_points.push_back(Vector3(0, 0, -1.0)); + cursor_colors.push_back(Color(0.5, 0.5, 0.5, 0.7)); + cursor_colors.push_back(Color(0.5, 0.5, 0.5, 0.7)); + + Ref<FixedMaterial> mat = memnew(FixedMaterial); + mat->set_flag(Material::FLAG_UNSHADED, true); + mat->set_fixed_flag(FixedMaterial::FLAG_USE_COLOR_ARRAY, true); + mat->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true); + mat->set_line_width(3); + Array d; + d.resize(VS::ARRAY_MAX); + d[Mesh::ARRAY_VERTEX] = cursor_points; + d[Mesh::ARRAY_COLOR] = cursor_colors; + listener_line_mesh->add_surface(Mesh::PRIMITIVE_LINES, d); + listener_line_mesh->surface_set_material(0, mat); + } + sample_player_icon = Ref<FixedMaterial>( memnew( FixedMaterial )); sample_player_icon->set_flag(Material::FLAG_UNSHADED, true); @@ -3173,6 +3224,14 @@ SpatialEditorGizmos::SpatialEditorGizmos() { visibility_notifier_icon->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1,0.9)); visibility_notifier_icon->set_texture(FixedMaterial::PARAM_DIFFUSE,SpatialEditor::get_singleton()->get_icon("Visible","EditorIcons")); + listener_icon = Ref<FixedMaterial>(memnew(FixedMaterial)); + listener_icon->set_flag(Material::FLAG_UNSHADED, true); + listener_icon->set_flag(Material::FLAG_DOUBLE_SIDED, true); + listener_icon->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER); + listener_icon->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true); + listener_icon->set_parameter(FixedMaterial::PARAM_DIFFUSE, Color(1, 1, 1, 0.9)); + listener_icon->set_texture(FixedMaterial::PARAM_DIFFUSE, SpatialEditor::get_singleton()->get_icon("GizmoListener", "EditorIcons")); + { DVector<Vector3> vertices; diff --git a/tools/editor/spatial_editor_gizmos.h b/tools/editor/spatial_editor_gizmos.h index 0162bcbf79..3d7272f522 100644 --- a/tools/editor/spatial_editor_gizmos.h +++ b/tools/editor/spatial_editor_gizmos.h @@ -32,6 +32,7 @@ #include "tools/editor/plugins/spatial_editor_plugin.h" #include "scene/3d/light.h" +#include "scene/3d/listener.h" #include "scene/3d/camera.h" #include "scene/3d/position_3d.h" #include "scene/3d/spatial_sample_player.h" @@ -143,6 +144,19 @@ public: }; +class ListenerSpatialGizmo : public EditorSpatialGizmo { + + OBJ_TYPE(ListenerSpatialGizmo, EditorSpatialGizmo); + + Listener* listener; + +public: + + void redraw(); + ListenerSpatialGizmo(Listener* p_listener = NULL); + +}; + class CameraSpatialGizmo : public EditorSpatialGizmo { OBJ_TYPE(CameraSpatialGizmo,EditorSpatialGizmo); @@ -471,6 +485,7 @@ public: Ref<FixedMaterial> navmesh_edge_material_disabled; Ref<FixedMaterial> navmesh_solid_material_disabled; + Ref<FixedMaterial> listener_icon; Ref<FixedMaterial> sample_player_icon; Ref<FixedMaterial> stream_player_icon; @@ -480,6 +495,7 @@ public: Ref<Texture> handle_t; Ref<Mesh> pos3d_mesh; + Ref<Mesh> listener_line_mesh; static SpatialEditorGizmos *singleton; Ref<TriangleMesh> test_cube_tm; diff --git a/tools/export/blender25/io_scene_dae/export_dae.py b/tools/export/blender25/io_scene_dae/export_dae.py index cdd845e384..3bb440ffe5 100644 --- a/tools/export/blender25/io_scene_dae/export_dae.py +++ b/tools/export/blender25/io_scene_dae/export_dae.py @@ -1104,6 +1104,14 @@ class DaeExporter: self.writel(S_NODES,il,'<instance_light url="#'+lightid+'"/>') + def export_empty_node(self,node,il): + + self.writel(S_NODES,4,'<extra>') + self.writel(S_NODES,5,'<technique profile="GODOT">') + self.writel(S_NODES,6,'<empty_draw_type>'+node.empty_draw_type+'</empty_draw_type>') + self.writel(S_NODES,5,'</technique>') + self.writel(S_NODES,4,'</extra>') + def export_curve(self,curve): @@ -1264,6 +1272,8 @@ class DaeExporter: self.export_camera_node(node,il) elif (node.type=="LAMP"): self.export_lamp_node(node,il) + elif (node.type=="EMPTY"): + self.export_empty_node(node,il) for x in node.children: self.export_node(x,il) diff --git a/tools/translations/ko.po b/tools/translations/ko.po index e886a9cd4f..e402504a1a 100644 --- a/tools/translations/ko.po +++ b/tools/translations/ko.po @@ -39,9 +39,9 @@ msgid "" "CollisionObject2D derived node. Please only use it as a child of Area2D, " "StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape." msgstr "" -"CollisionPolygon2D는 CollisionObject2D에 충돌 모양을 지정하는 데에만 사용됩니" -"다. Area2D, StaticBody2D, RigidBody2D, KinematicBody2D 등에 자식 노드로 추가" -"하여 사용합니다." +"CollisionPolygon2D는 CollisionObject2D에 충돌 모양을 지정하기 위해서만 사용됩" +"니다. Area2D, StaticBody2D, RigidBody2D, KinematicBody2D 등에 자식 노드로 추" +"가하여 사용합니다." #: scene/2d/collision_polygon_2d.cpp msgid "An empty CollisionPolygon2D has no effect on collision." @@ -53,7 +53,7 @@ msgid "" "CollisionObject2D derived node. Please only use it as a child of Area2D, " "StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape." msgstr "" -"CollisionShape2D는 CollisionObject2D에 충돌 모양을 지정하는 데에만 사용됩니" +"CollisionShape2D는 CollisionObject2D에 충돌 모양을 지정하기 위해서만 사용됩니" "다. Area2D, StaticBody2D, RigidBody2D, KinematicBody2D 등에 자식 노드로 추가" "하여 사용합니다." @@ -153,7 +153,7 @@ msgid "" "derived node. Please only use it as a child of Area, StaticBody, RigidBody, " "KinematicBody, etc. to give them a shape." msgstr "" -"CollisionShape은 CollisionObject에 충돌 모양을 지정하는 데에만 사용됩니다. " +"CollisionShape은 CollisionObject에 충돌 모양을 지정하기 위해서만 사용됩니다. " "Area, StaticBody, RigidBody, KinematicBody 등에 자식 노드로 추가하여 사용합니" "다." @@ -171,9 +171,9 @@ msgid "" "CollisionObject derived node. Please only use it as a child of Area, " "StaticBody, RigidBody, KinematicBody, etc. to give them a shape." msgstr "" -"CollisionPolygon은 CollisionObject에 충돌 모양을 지정하는 데에만 사용됩니다. " -"Area, StaticBody, RigidBody, KinematicBody 등에 자식 노드로 추가하여 사용합니" -"다." +"CollisionPolygon은 CollisionObject에 충돌 모양을 지정하기 위해서만 사용됩니" +"다. Area, StaticBody, RigidBody, KinematicBody 등에 자식 노드로 추가하여 사용" +"합니다." #: scene/3d/collision_polygon.cpp msgid "An empty CollisionPolygon has no effect on collision." @@ -1382,7 +1382,7 @@ msgstr "종료" #: tools/editor/editor_node.cpp msgid "Exit the editor?" -msgstr "데이터를 종료하시겠습니까?" +msgstr "에디터를 종료하시겠습니까?" #: tools/editor/editor_node.cpp msgid "Current scene not saved. Open anyway?" @@ -3677,7 +3677,7 @@ msgstr "파일" #: tools/editor/plugins/script_editor_plugin.cpp #: tools/editor/property_editor.cpp msgid "New" -msgstr "새 파일" +msgstr "새로운" #: tools/editor/plugins/script_editor_plugin.cpp msgid "Save All" @@ -4001,11 +4001,11 @@ msgstr "그래프 노드 연결 해제" #: tools/editor/plugins/shader_graph_editor_plugin.cpp msgid "Remove Shader Graph Node" -msgstr "쉐이더 그래프 노드 삭제" +msgstr "셰이더 그래프 노드 삭제" #: tools/editor/plugins/shader_graph_editor_plugin.cpp msgid "Move Shader Graph Node" -msgstr "쉐이더 그래프 노드 이동" +msgstr "셰이더 그래프 노드 이동" #: tools/editor/plugins/shader_graph_editor_plugin.cpp msgid "Duplicate Graph Node(s)" @@ -4013,7 +4013,7 @@ msgstr "그래프 노드 복제" #: tools/editor/plugins/shader_graph_editor_plugin.cpp msgid "Delete Shader Graph Node(s)" -msgstr "쉐이더 그래프 노드 삭제" +msgstr "셰이더 그래프 노드 삭제" #: tools/editor/plugins/shader_graph_editor_plugin.cpp msgid "Error: Cyclic Connection Link" @@ -4025,7 +4025,7 @@ msgstr "에러: 입력 연결 누락" #: tools/editor/plugins/shader_graph_editor_plugin.cpp msgid "Add Shader Graph Node" -msgstr "쉐이더 그래프 노드 추가" +msgstr "셰이더 그래프 노드 추가" #: tools/editor/plugins/spatial_editor_plugin.cpp msgid "Orthogonal" @@ -5310,7 +5310,7 @@ msgstr "속성:" #: tools/editor/property_editor.cpp msgid "Global" -msgstr "글로벌" +msgstr "" #: tools/editor/property_editor.cpp msgid "Sections:" |