diff options
40 files changed, 668 insertions, 200 deletions
diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp index 2a9dff86f8..306e7d8c9d 100644 --- a/core/io/stream_peer.cpp +++ b/core/io/stream_peer.cpp @@ -357,7 +357,6 @@ String StreamPeer::get_string(int p_bytes){ String StreamPeer::get_utf8_string(int p_bytes){ ERR_FAIL_COND_V(p_bytes<0,String()); - ERR_FAIL_COND_V(p_bytes<0,String()); Vector<uint8_t> buf; buf.resize(p_bytes); diff --git a/core/os/input.cpp b/core/os/input.cpp index a766ef87fc..005a248aac 100644 --- a/core/os/input.cpp +++ b/core/os/input.cpp @@ -59,6 +59,10 @@ void Input::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_joy_axis","device","axis"),&Input::get_joy_axis); ObjectTypeDB::bind_method(_MD("get_joy_name","device"),&Input::get_joy_name); ObjectTypeDB::bind_method(_MD("get_joy_guid","device"),&Input::get_joy_guid); + ObjectTypeDB::bind_method(_MD("get_joy_vibration_strength", "device"), &Input::get_joy_vibration_strength); + ObjectTypeDB::bind_method(_MD("get_joy_vibration_duration", "device"), &Input::get_joy_vibration_duration); + ObjectTypeDB::bind_method(_MD("start_joy_vibration", "device", "weak_magnitude", "strong_magnitude", "duration"), &Input::start_joy_vibration); + ObjectTypeDB::bind_method(_MD("stop_joy_vibration", "device"), &Input::stop_joy_vibration); ObjectTypeDB::bind_method(_MD("get_accelerometer"),&Input::get_accelerometer); ObjectTypeDB::bind_method(_MD("get_magnetometer"),&Input::get_magnetometer); //ObjectTypeDB::bind_method(_MD("get_mouse_pos"),&Input::get_mouse_pos); - this is not the function you want diff --git a/core/os/input.h b/core/os/input.h index 46edb30aa1..6364d597b0 100644 --- a/core/os/input.h +++ b/core/os/input.h @@ -67,6 +67,11 @@ public: virtual void remove_joy_mapping(String p_guid)=0; virtual bool is_joy_known(int p_device)=0; virtual String get_joy_guid(int p_device) const=0; + virtual Vector2 get_joy_vibration_strength(int p_device)=0; + virtual float get_joy_vibration_duration(int p_device)=0; + virtual uint64_t get_joy_vibration_timestamp(int p_device)=0; + virtual void start_joy_vibration(int p_device, float p_weak_magnitude, float p_strong_magnitude, float p_duration)=0; + virtual void stop_joy_vibration(int p_device)=0; virtual Point2 get_mouse_pos() const=0; virtual Point2 get_mouse_speed() const=0; diff --git a/core/variant_call.cpp b/core/variant_call.cpp index 94ab93d55c..c1a58dff75 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -1290,7 +1290,7 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl ADDFUNC0(STRING,STRING,String,extension,varray()); ADDFUNC0(STRING,STRING,String,basename,varray()); ADDFUNC1(STRING,STRING,String,plus_file,STRING,"file",varray()); - ADDFUNC1(STRING,STRING,String,ord_at,INT,"at",varray()); + ADDFUNC1(STRING,INT,String,ord_at,INT,"at",varray()); ADDFUNC2(STRING,NIL,String,erase,INT,"pos",INT,"chars", varray()); ADDFUNC0(STRING,INT,String,hash,varray()); ADDFUNC0(STRING,STRING,String,md5_text,varray()); @@ -1437,9 +1437,9 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl ADDFUNC0(DICTIONARY,INT,Dictionary,size,varray()); ADDFUNC0(DICTIONARY,BOOL,Dictionary,empty,varray()); ADDFUNC0(DICTIONARY,NIL,Dictionary,clear,varray()); - ADDFUNC1(DICTIONARY,BOOL,Dictionary,has,NIL,"value",varray()); - ADDFUNC1(DICTIONARY,BOOL,Dictionary,has_all,ARRAY,"values",varray()); - ADDFUNC1(DICTIONARY,NIL,Dictionary,erase,NIL,"value",varray()); + ADDFUNC1(DICTIONARY,BOOL,Dictionary,has,NIL,"key",varray()); + ADDFUNC1(DICTIONARY,BOOL,Dictionary,has_all,ARRAY,"keys",varray()); + ADDFUNC1(DICTIONARY,NIL,Dictionary,erase,NIL,"key",varray()); ADDFUNC0(DICTIONARY,INT,Dictionary,hash,varray()); ADDFUNC0(DICTIONARY,ARRAY,Dictionary,keys,varray()); ADDFUNC0(DICTIONARY,ARRAY,Dictionary,values,varray()); diff --git a/doc/base/classes.xml b/doc/base/classes.xml index 0d8f7eecdd..4db81f487c 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -1829,6 +1829,8 @@ </constant> <constant name="PROPERTY_USAGE_RESTART_IF_CHANGED" value="4096"> </constant> + <constant name="PROPERTY_USAGE_SCRIPT_VARIABLE" value="8192"> + </constant> <constant name="PROPERTY_USAGE_DEFAULT" value="7"> Default usage (storage and editor). </constant> @@ -2392,7 +2394,35 @@ </description> </method> <method name="get_sprite_frames" qualifiers="const"> - <return type="Texture"> + <return type="SpriteFrames"> + </return> + <description> + </description> + </method> + <method name="set_animation"> + <argument index="0" name="animation" type="String"> + </argument> + <description> + </description> + </method> + <method name="get_animation" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="play"> + <argument index="0" name="anim" type="String" default=""""> + </argument> + <description> + </description> + </method> + <method name="stop"> + <description> + </description> + </method> + <method name="is_playing" qualifiers="const"> + <return type="bool"> </return> <description> </description> @@ -4474,9 +4504,11 @@ </description> </method> <method name="rfind"> + <return type="int"> + </return> <argument index="0" name="what" type="var"> </argument> - <argument index="1" name="from" type="int"> + <argument index="1" name="from" type="int" default="-1"> </argument> <description> Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. @@ -10408,7 +10440,7 @@ This approximation makes straight segments between each point, then subdivides t </description> </method> <method name="erase"> - <argument index="0" name="value" type="var"> + <argument index="0" name="key" type="var"> </argument> <description> Erase a dictionary key/value pair by key. @@ -10417,7 +10449,7 @@ This approximation makes straight segments between each point, then subdivides t <method name="has"> <return type="bool"> </return> - <argument index="0" name="value" type="var"> + <argument index="0" name="key" type="var"> </argument> <description> Return true if the dictionary has a given key. @@ -10426,7 +10458,7 @@ This approximation makes straight segments between each point, then subdivides t <method name="has_all"> <return type="bool"> </return> - <argument index="0" name="values" type="Array"> + <argument index="0" name="keys" type="Array"> </argument> <description> Return true if the dictionary has all of the keys in the given array. @@ -15788,6 +15820,23 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) Returns a SDL2 compatible device guid on platforms that use gamepad remapping. Returns "Default Gamepad" otherwise. </description> </method> + <method name="get_joy_vibration_strength"> + <return type="Vector2"> + </return> + <argument index="0" name="device" type="int"> + </argument> + <description> + Returns the strength of the joystick vibration: x is the strength of the weak motor, and y is the strength of the strong motor. + </description> + </method> + <method name="get_joy_vibration_duration"> + <return type="float"> + </return> + <argument index="0" name="device" type="int"> + </argument> + <description> + Returns the duration of the current vibration effect in seconds. + </description> <method name="get_accelerometer"> <return type="Vector3"> </return> @@ -15830,6 +15879,26 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) Return the mouse mode. See the constants for more information. </description> </method> + <method name="start_joy_vibration"> + <argument index="0" name="device" type="int"> + </argument> + <argument index="1" name="weak_magnitude" type="float"> + </argument> + <argument index="2" name="strong_magnitude" type="float"> + </argument> + <argument index="3" name="duration" type="float"> + </argument> + <description> + Starts to vibrate the joystick. Joysticks usually come with two rumble motors, a strong and a weak one. weak_magnitude is the strength of the weak motor (between 0 and 1) and strong_magnitude is the strength of the strong motor (between 0 and 1). duration is the duration of the effect in seconds (a duration of 0 will play the vibration indefinitely). + </description> + </method> + <method name="stop_joy_vibration"> + <argument index="0" name="device" type="int"> + </argument> + <description> + Stops the vibration of the joystick. + </description> + </method> <method name="warp_mouse_pos"> <argument index="0" name="to" type="Vector2"> </argument> @@ -17315,25 +17384,13 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) <description> </description> </method> - <method name="set_min_icon_size"> + <method name="set_fixed_icon_size"> <argument index="0" name="size" type="Vector2"> </argument> <description> </description> </method> - <method name="get_min_icon_size" qualifiers="const"> - <return type="Vector2"> - </return> - <description> - </description> - </method> - <method name="set_max_icon_size"> - <argument index="0" name="size" type="Vector2"> - </argument> - <description> - </description> - </method> - <method name="get_max_icon_size" qualifiers="const"> + <method name="get_fixed_icon_size" qualifiers="const"> <return type="Vector2"> </return> <description> @@ -25353,8 +25410,6 @@ This method controls whether the position between two cached points is interpola </description> </method> <method name="shape_get_data" qualifiers="const"> - <return type="Variant"> - </return> <argument index="0" name="shape" type="RID"> </argument> <description> @@ -25579,8 +25634,6 @@ This method controls whether the position between two cached points is interpola </description> </method> <method name="area_get_param" qualifiers="const"> - <return type="Variant"> - </return> <argument index="0" name="area" type="RID"> </argument> <argument index="1" name="param" type="int"> @@ -25755,8 +25808,6 @@ This method controls whether the position between two cached points is interpola </description> </method> <method name="body_get_shape_metadata" qualifiers="const"> - <return type="Variant"> - </return> <argument index="0" name="body" type="RID"> </argument> <argument index="1" name="shape_idx" type="int"> @@ -25910,8 +25961,6 @@ This method controls whether the position between two cached points is interpola </description> </method> <method name="body_get_state" qualifiers="const"> - <return type="Variant"> - </return> <argument index="0" name="body" type="RID"> </argument> <argument index="1" name="state" type="int"> @@ -26336,15 +26385,6 @@ This method controls whether the position between two cached points is interpola <constant name="JOINT_DAMPED_SPRING" value="2"> Constant to create damped spring joints. </constant> - <constant name="JOINT_PARAM_BIAS" value="0"> - Constant to set/get the solver bias for a joint. - </constant> - <constant name="JOINT_PARAM_MAX_BIAS" value="1"> - Constant to set/get the maximum speed at which a joint can correct its bodies. - </constant> - <constant name="JOINT_PARAM_MAX_FORCE" value="2"> - Constant to set the maximum force a joint can exert on its bodies. - </constant> <constant name="DAMPED_STRING_REST_LENGTH" value="0"> Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. </constant> @@ -36641,150 +36681,175 @@ This method controls whether the position between two cached points is interpola <return type="int"> </return> <description> + Return the amount of bytes this [StreamPeer] has available. </description> </method> <method name="set_big_endian"> <argument index="0" name="enable" type="bool"> </argument> <description> + Set this [StreamPeer] to use big-endian format. Default is false. </description> </method> <method name="is_big_endian_enabled" qualifiers="const"> <return type="bool"> </return> <description> + Return whether this [StreamPeer] is using big-endian format. </description> </method> <method name="put_8"> <argument index="0" name="val" type="int"> </argument> <description> + Put a signed byte into the stream. </description> </method> <method name="put_u8"> <argument index="0" name="val" type="int"> </argument> <description> + Put an unsigned byte into the stream. </description> </method> <method name="put_16"> <argument index="0" name="val" type="int"> </argument> <description> + Put a signed 16 bit value into the stream. </description> </method> <method name="put_u16"> <argument index="0" name="val" type="int"> </argument> <description> + Put an unsigned 16 bit value into the stream. </description> </method> <method name="put_32"> <argument index="0" name="val" type="int"> </argument> <description> + Put a signed 32 bit value into the stream. </description> </method> <method name="put_u32"> <argument index="0" name="val" type="int"> </argument> <description> + Put an unsigned 32 bit value into the stream. </description> </method> <method name="put_64"> <argument index="0" name="val" type="int"> </argument> <description> + Put a signed 64 bit value into the stream. </description> </method> <method name="put_u64"> <argument index="0" name="val" type="int"> </argument> <description> + Put an unsigned 64 bit value into the stream. </description> </method> <method name="put_float"> <argument index="0" name="val" type="float"> </argument> <description> + Put a single-precision float into the stream. </description> </method> <method name="put_double"> <argument index="0" name="val" type="float"> </argument> <description> + Put a double-precision float into the stream. </description> </method> <method name="put_utf8_string"> <argument index="0" name="val" type="String"> </argument> <description> + Put a zero-terminated utf8 string into the stream. </description> </method> <method name="put_var"> <argument index="0" name="val" type="Variant"> </argument> <description> + Put a variable into the stream. </description> </method> <method name="get_8"> <return type="int"> </return> <description> + Get a signed byte from the stream. </description> </method> <method name="get_u8"> <return type="int"> </return> <description> + Get an unsigned byte from the stream. </description> </method> <method name="get_16"> <return type="int"> </return> <description> + Get a signed 16 bit value from the stream. </description> </method> <method name="get_u16"> <return type="int"> </return> <description> + Get an unsigned 16 bit value from the stream. </description> </method> <method name="get_32"> <return type="int"> </return> <description> + Get a signed 32 bit value from the stream. </description> </method> <method name="get_u32"> <return type="int"> </return> <description> + Get an unsigned 32 bit value from the stream. </description> </method> <method name="get_64"> <return type="int"> </return> <description> + Get a signed 64 bit value from the stream. </description> </method> <method name="get_u64"> <return type="int"> </return> <description> + Get an unsigned 16 bit value from the stream. </description> </method> <method name="get_float"> <return type="float"> </return> <description> + Get a single-precision float from the stream. </description> </method> <method name="get_double"> <return type="float"> </return> <description> + Get a double-precision float from the stream. </description> </method> <method name="get_string"> @@ -36793,6 +36858,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="bytes" type="int"> </argument> <description> + Get a string with byte-length "bytes" from the stream. </description> </method> <method name="get_utf8_string"> @@ -36801,12 +36867,14 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="bytes" type="int"> </argument> <description> + Get an utf8 string with byte-length "bytes" from the stream (this decodes the string sent as utf8). </description> </method> <method name="get_var"> <return type="Variant"> </return> <description> + Get a variable from the stream. </description> </method> </methods> @@ -36815,8 +36883,10 @@ This method controls whether the position between two cached points is interpola </class> <class name="StreamPeerSSL" inherits="StreamPeer" category="Core"> <brief_description> + SSL Stream peer. </brief_description> <description> + SSL Stream peer. This object can be used to connect to SSL servers. </description> <methods> <method name="accept"> @@ -36837,27 +36907,34 @@ This method controls whether the position between two cached points is interpola <argument index="2" name="for_hostname" type="String" default=""""> </argument> <description> + Connect to a peer using an underlying [StreamPeer] "stream", when "validate_certs" is true, [StreamPeerSSL] will validate that the certificate presented by the peer matches the "for_hostname". </description> </method> <method name="get_status" qualifiers="const"> <return type="int"> </return> <description> + Return the status of the connection, one of STATUS_* enum. </description> </method> <method name="disconnect"> <description> + Disconnect from host. </description> </method> </methods> <constants> <constant name="STATUS_DISCONNECTED" value="0"> + A status representing a [StreamPeerSSL] that is disconnected. </constant> <constant name="STATUS_CONNECTED" value="1"> + A status representing a [StreamPeerSSL] that is connected to a host. </constant> <constant name="STATUS_ERROR_NO_CERTIFICATE" value="2"> + An errot status that shows the peer did not present a SSL certificate and validation was requested. </constant> <constant name="STATUS_ERROR_HOSTNAME_MISMATCH" value="3"> + An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation. </constant> </constants> </class> @@ -36877,45 +36954,55 @@ This method controls whether the position between two cached points is interpola <argument index="1" name="port" type="int"> </argument> <description> + Connect to the specified IP:port pair. Returns [OK] on success or [FAILED] on failure. </description> </method> <method name="is_connected" qualifiers="const"> <return type="bool"> </return> <description> + Return whether this peer is connected. Returns true while connecting and connected. </description> </method> <method name="get_status" qualifiers="const"> <return type="int"> </return> <description> + Return the status of the connection, one of STATUS_* enum. </description> </method> <method name="get_connected_host" qualifiers="const"> <return type="String"> </return> <description> + Return the IP of this peer. </description> </method> <method name="get_connected_port" qualifiers="const"> <return type="int"> </return> <description> + Return the port of this peer. </description> </method> <method name="disconnect"> <description> + Disconnect from host. </description> </method> </methods> <constants> <constant name="STATUS_NONE" value="0"> + The initial status of the [StreamPeerTCP], also the status after a disconnect. </constant> <constant name="STATUS_CONNECTING" value="1"> + A status representing a [StreamPeerTCP] that is connecting to a host. </constant> <constant name="STATUS_CONNECTED" value="2"> + A status representing a [StreamPeerTCP] that is connected to a host. </constant> <constant name="STATUS_ERROR" value="3"> + A staus representing a [StreamPeerTCP] in error state. </constant> </constants> </class> @@ -37385,7 +37472,7 @@ This method controls whether the position between two cached points is interpola </description> </method> <method name="ord_at"> - <return type="String"> + <return type="int"> </return> <argument index="0" name="at" type="int"> </argument> @@ -39140,6 +39227,10 @@ This method controls whether the position between two cached points is interpola </constant> <constant name="STRETCH_KEEP_CENTERED" value="4"> </constant> + <constant name="STRETCH_KEEP_ASPECT" value="5"> + </constant> + <constant name="STRETCH_KEEP_ASPECT_CENTERED" value="6"> + </constant> </constants> </class> <class name="TextureProgress" inherits="Range" category="Core"> diff --git a/main/input_default.cpp b/main/input_default.cpp index e36306727d..a6f14ae1f5 100644 --- a/main/input_default.cpp +++ b/main/input_default.cpp @@ -137,6 +137,30 @@ String InputDefault::get_joy_name(int p_idx) { return joy_names[p_idx].name; }; +Vector2 InputDefault::get_joy_vibration_strength(int p_device) { + if (joy_vibration.has(p_device)) { + return Vector2(joy_vibration[p_device].weak_magnitude, joy_vibration[p_device].strong_magnitude); + } else { + return Vector2(0, 0); + } +} + +uint64_t InputDefault::get_joy_vibration_timestamp(int p_device) { + if (joy_vibration.has(p_device)) { + return joy_vibration[p_device].timestamp; + } else { + return 0; + } +} + +float InputDefault::get_joy_vibration_duration(int p_device) { + if (joy_vibration.has(p_device)) { + return joy_vibration[p_device].duration; + } else { + return 0.f; + } +} + static String _hex_str(uint8_t p_byte) { static const char* dict = "0123456789abcdef"; @@ -294,6 +318,29 @@ void InputDefault::set_joy_axis(int p_device,int p_axis,float p_value) { _joy_axis[c]=p_value; } +void InputDefault::start_joy_vibration(int p_device, float p_weak_magnitude, float p_strong_magnitude, float p_duration) { + _THREAD_SAFE_METHOD_ + if (p_weak_magnitude < 0.f || p_weak_magnitude > 1.f || p_strong_magnitude < 0.f || p_strong_magnitude > 1.f) { + return; + } + VibrationInfo vibration; + vibration.weak_magnitude = p_weak_magnitude; + vibration.strong_magnitude = p_strong_magnitude; + vibration.duration = p_duration; + vibration.timestamp = OS::get_singleton()->get_unix_time(); + joy_vibration[p_device] = vibration; +} + +void InputDefault::stop_joy_vibration(int p_device) { + _THREAD_SAFE_METHOD_ + VibrationInfo vibration; + vibration.weak_magnitude = 0; + vibration.strong_magnitude = 0; + vibration.duration = 0; + vibration.timestamp = OS::get_singleton()->get_unix_time(); + joy_vibration[p_device] = vibration; +} + void InputDefault::set_accelerometer(const Vector3& p_accel) { _THREAD_SAFE_METHOD_ diff --git a/main/input_default.h b/main/input_default.h index 8f6a430436..01b813f3ca 100644 --- a/main/input_default.h +++ b/main/input_default.h @@ -3,6 +3,7 @@ #include "os/input.h" + class InputDefault : public Input { OBJ_TYPE( InputDefault, Input ); @@ -19,6 +20,16 @@ class InputDefault : public Input { MainLoop *main_loop; bool emulate_touch; + + struct VibrationInfo { + float weak_magnitude; + float strong_magnitude; + float duration; // Duration in seconds + uint64_t timestamp; + }; + + Map<int, VibrationInfo> joy_vibration; + struct SpeedTrack { uint64_t last_tick; @@ -129,6 +140,9 @@ public: virtual float get_joy_axis(int p_device,int p_axis); String get_joy_name(int p_idx); + virtual Vector2 get_joy_vibration_strength(int p_device); + virtual float get_joy_vibration_duration(int p_device); + virtual uint64_t get_joy_vibration_timestamp(int p_device); void joy_connection_changed(int p_idx, bool p_connected, String p_name, String p_guid = ""); void parse_joystick_mapping(String p_mapping, bool p_update_existing); @@ -147,6 +161,9 @@ public: void set_magnetometer(const Vector3& p_magnetometer); void set_joy_axis(int p_device,int p_axis,float p_value); + virtual void start_joy_vibration(int p_device, float p_weak_magnitude, float p_strong_magnitude, float p_duration); + virtual void stop_joy_vibration(int p_device); + void set_main_loop(MainLoop *main_loop); void set_mouse_pos(const Point2& p_posf); diff --git a/methods.py b/methods.py index 730558a064..7128b334ec 100755 --- a/methods.py +++ b/methods.py @@ -1343,7 +1343,7 @@ def android_add_to_attributes(self,file): def disable_module(self): self.disabled_modules.append(self.current_module) -def use_windows_spawn_fix(self): +def use_windows_spawn_fix(self, platform=None): if (os.name!="nt"): return #not needed, only for windows @@ -1353,10 +1353,13 @@ def use_windows_spawn_fix(self): import subprocess def mySubProcess(cmdline,env): - #print "SPAWNED : " + cmdline + prefix = "" + if(platform == 'javascript'): + prefix = "python.exe " + startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW - proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE, + proc = subprocess.Popen(prefix + cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, startupinfo=startupinfo, shell = False, env = env) data, err = proc.communicate() rv = proc.wait() diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index ae33a43f0d..d76a20bea7 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -44,6 +44,9 @@ def get_flags(): def configure(env): + env['ENV'] = os.environ; + env.use_windows_spawn_fix('javascript') + env.Append(CPPPATH=['#platform/javascript']) em_path=os.environ["EMSCRIPTEN_ROOT"] diff --git a/platform/x11/joystick_linux.cpp b/platform/x11/joystick_linux.cpp index 2793cc5734..5ce0219df7 100644 --- a/platform/x11/joystick_linux.cpp +++ b/platform/x11/joystick_linux.cpp @@ -316,13 +316,21 @@ void joystick_linux::setup_joystick_properties(int p_id) { } } } -} + joy->force_feedback = false; + joy->ff_effect_timestamp = 0; + unsigned long ffbit[NBITS(FF_CNT)]; + if (ioctl(joy->fd, EVIOCGBIT(EV_FF, sizeof(ffbit)), ffbit) != -1) { + if (test_bit(FF_RUMBLE, ffbit)) { + joy->force_feedback = true; + } + } +} void joystick_linux::open_joystick(const char *p_path) { int joy_num = get_free_joy_slot(); - int fd = open(p_path, O_RDONLY | O_NONBLOCK); + int fd = open(p_path, O_RDWR | O_NONBLOCK); if (fd != -1 && joy_num != -1) { unsigned long evbit[NBITS(EV_MAX)] = { 0 }; @@ -392,6 +400,55 @@ void joystick_linux::open_joystick(const char *p_path) { } } +void joystick_linux::joystick_vibration_start(int p_id, float p_weak_magnitude, float p_strong_magnitude, float p_duration, uint64_t p_timestamp) +{ + Joystick& joy = joysticks[p_id]; + if (!joy.force_feedback || joy.fd == -1 || p_weak_magnitude < 0.f || p_weak_magnitude > 1.f || p_strong_magnitude < 0.f || p_strong_magnitude > 1.f) { + return; + } + if (joy.ff_effect_id != -1) { + joystick_vibration_stop(p_id, p_timestamp); + } + + struct ff_effect effect; + effect.type = FF_RUMBLE; + effect.id = -1; + effect.u.rumble.weak_magnitude = floor(p_weak_magnitude * (float)0xffff); + effect.u.rumble.strong_magnitude = floor(p_strong_magnitude * (float)0xffff); + effect.replay.length = floor(p_duration * 1000); + effect.replay.delay = 0; + + if (ioctl(joy.fd, EVIOCSFF, &effect) < 0) { + return; + } + + struct input_event play; + play.type = EV_FF; + play.code = effect.id; + play.value = 1; + write(joy.fd, (const void*)&play, sizeof(play)); + + joy.ff_effect_id = effect.id; + joy.ff_effect_timestamp = p_timestamp; +} + +void joystick_linux::joystick_vibration_stop(int p_id, uint64_t p_timestamp) +{ + Joystick& joy = joysticks[p_id]; + if (!joy.force_feedback || joy.fd == -1 || joy.ff_effect_id == -1) { + return; + } + + struct input_event stop; + stop.type = EV_FF; + stop.code = joy.ff_effect_id; + stop.value = 0; + write(joy.fd, (const void*)&stop, sizeof(stop)); + + joy.ff_effect_id = -1; + joy.ff_effect_timestamp = p_timestamp; +} + InputDefault::JoyAxis joystick_linux::axis_correct(const input_absinfo *p_abs, int p_value) const { int min = p_abs->minimum; @@ -485,6 +542,19 @@ uint32_t joystick_linux::process_joysticks(uint32_t p_event_id) { if (len == 0 || (len < 0 && errno != EAGAIN)) { close_joystick(i); }; + + if (joy->force_feedback) { + uint64_t timestamp = input->get_joy_vibration_timestamp(i); + if (timestamp > joy->ff_effect_timestamp) { + Vector2 strength = input->get_joy_vibration_strength(i); + float duration = input->get_joy_vibration_duration(i); + if (strength.x == 0 && strength.y == 0) { + joystick_vibration_stop(i, timestamp); + } else { + joystick_vibration_start(i, strength.x, strength.y, duration, timestamp); + } + } + } } joy_mutex->unlock(); return p_event_id; diff --git a/platform/x11/joystick_linux.h b/platform/x11/joystick_linux.h index 4f0533721b..7ea2664ebb 100644 --- a/platform/x11/joystick_linux.h +++ b/platform/x11/joystick_linux.h @@ -61,6 +61,10 @@ private: String devpath; input_absinfo *abs_info[MAX_ABS]; + bool force_feedback; + int ff_effect_id; + uint64_t ff_effect_timestamp; + Joystick(); ~Joystick(); void reset(); @@ -88,6 +92,9 @@ private: void run_joystick_thread(); void open_joystick(const char* path); + void joystick_vibration_start(int p_id, float p_weak_magnitude, float p_strong_magnitude, float p_duration, uint64_t p_timestamp); + void joystick_vibration_stop(int p_id, uint64_t p_timestamp); + InputDefault::JoyAxis axis_correct(const input_absinfo *abs, int value) const; }; diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp index 211c5961b0..0f7ed1cb29 100644 --- a/scene/animation/animation_tree_player.cpp +++ b/scene/animation/animation_tree_player.cpp @@ -669,7 +669,7 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode } tsn->seek_pos=-1; - return _process_node(tsn->inputs[0].node,r_prev_anim,p_weight,p_time,p_seek); + return _process_node(tsn->inputs[0].node,r_prev_anim,p_weight,p_time,p_seek, p_filter, p_reverse_weight); } break; case NODE_TRANSITION: { diff --git a/tools/Godot.app/Contents/Info.plist b/tools/Godot.app/Contents/Info.plist index 2b58162ae8..37c80fc8a3 100755 --- a/tools/Godot.app/Contents/Info.plist +++ b/tools/Godot.app/Contents/Info.plist @@ -34,7 +34,7 @@ <string>10.6.0</string> </dict> <key>NSHighResolutionCapable</key> - <false/> + <true/> <key>CFBundleDocumentTypes</key> <array> <dict> diff --git a/tools/editor/icons/2x/icon_capsule_shape_2d.png b/tools/editor/icons/2x/icon_capsule_shape_2d.png Binary files differnew file mode 100644 index 0000000000..7f4734618b --- /dev/null +++ b/tools/editor/icons/2x/icon_capsule_shape_2d.png diff --git a/tools/editor/icons/2x/icon_circle_shape_2d.png b/tools/editor/icons/2x/icon_circle_shape_2d.png Binary files differnew file mode 100644 index 0000000000..5975c90f91 --- /dev/null +++ b/tools/editor/icons/2x/icon_circle_shape_2d.png diff --git a/tools/editor/icons/2x/icon_concave_polygon_shape_2d.png b/tools/editor/icons/2x/icon_concave_polygon_shape_2d.png Binary files differnew file mode 100644 index 0000000000..39e4d888af --- /dev/null +++ b/tools/editor/icons/2x/icon_concave_polygon_shape_2d.png diff --git a/tools/editor/icons/2x/icon_convex_polygon_shape_2d.png b/tools/editor/icons/2x/icon_convex_polygon_shape_2d.png Binary files differnew file mode 100644 index 0000000000..38ed87089d --- /dev/null +++ b/tools/editor/icons/2x/icon_convex_polygon_shape_2d.png diff --git a/tools/editor/icons/2x/icon_line_shape_2d.png b/tools/editor/icons/2x/icon_line_shape_2d.png Binary files differnew file mode 100644 index 0000000000..5ec406ea1f --- /dev/null +++ b/tools/editor/icons/2x/icon_line_shape_2d.png diff --git a/tools/editor/icons/2x/icon_ray_shape_2d.png b/tools/editor/icons/2x/icon_ray_shape_2d.png Binary files differnew file mode 100644 index 0000000000..37eedfb7de --- /dev/null +++ b/tools/editor/icons/2x/icon_ray_shape_2d.png diff --git a/tools/editor/icons/2x/icon_rectangle_shape_2d.png b/tools/editor/icons/2x/icon_rectangle_shape_2d.png Binary files differnew file mode 100644 index 0000000000..a2754e6880 --- /dev/null +++ b/tools/editor/icons/2x/icon_rectangle_shape_2d.png diff --git a/tools/editor/icons/2x/icon_segment_shape_2d.png b/tools/editor/icons/2x/icon_segment_shape_2d.png Binary files differnew file mode 100644 index 0000000000..11b28d81df --- /dev/null +++ b/tools/editor/icons/2x/icon_segment_shape_2d.png diff --git a/tools/editor/icons/icon_capsule_shape_2d.png b/tools/editor/icons/icon_capsule_shape_2d.png Binary files differnew file mode 100644 index 0000000000..f4f990f72f --- /dev/null +++ b/tools/editor/icons/icon_capsule_shape_2d.png diff --git a/tools/editor/icons/icon_circle_shape_2d.png b/tools/editor/icons/icon_circle_shape_2d.png Binary files differnew file mode 100644 index 0000000000..281658b062 --- /dev/null +++ b/tools/editor/icons/icon_circle_shape_2d.png diff --git a/tools/editor/icons/icon_concave_polygon_shape_2d.png b/tools/editor/icons/icon_concave_polygon_shape_2d.png Binary files differnew file mode 100644 index 0000000000..71d8e62dbc --- /dev/null +++ b/tools/editor/icons/icon_concave_polygon_shape_2d.png diff --git a/tools/editor/icons/icon_convex_polygon_shape_2d.png b/tools/editor/icons/icon_convex_polygon_shape_2d.png Binary files differnew file mode 100644 index 0000000000..283bc68786 --- /dev/null +++ b/tools/editor/icons/icon_convex_polygon_shape_2d.png diff --git a/tools/editor/icons/icon_line_shape_2d.png b/tools/editor/icons/icon_line_shape_2d.png Binary files differnew file mode 100644 index 0000000000..a4fb049f3f --- /dev/null +++ b/tools/editor/icons/icon_line_shape_2d.png diff --git a/tools/editor/icons/icon_ray_shape_2d.png b/tools/editor/icons/icon_ray_shape_2d.png Binary files differnew file mode 100644 index 0000000000..2f102bbb91 --- /dev/null +++ b/tools/editor/icons/icon_ray_shape_2d.png diff --git a/tools/editor/icons/icon_rectangle_shape_2d.png b/tools/editor/icons/icon_rectangle_shape_2d.png Binary files differnew file mode 100644 index 0000000000..eb123c6f6a --- /dev/null +++ b/tools/editor/icons/icon_rectangle_shape_2d.png diff --git a/tools/editor/icons/icon_segment_shape_2d.png b/tools/editor/icons/icon_segment_shape_2d.png Binary files differnew file mode 100644 index 0000000000..c90255a405 --- /dev/null +++ b/tools/editor/icons/icon_segment_shape_2d.png diff --git a/tools/editor/icons/source/icon_capsule_shape_2d.svg b/tools/editor/icons/source/icon_capsule_shape_2d.svg new file mode 100644 index 0000000000..03ac3f8255 --- /dev/null +++ b/tools/editor/icons/source/icon_capsule_shape_2d.svg @@ -0,0 +1,81 @@ +<?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_capsule_shape_2d.svg" + inkscape:export-ydpi="90" + inkscape:export-xdpi="90" + inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_capsule_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="10.812487" + inkscape:cx="8.3752367" + 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" /> + </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 /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + transform="translate(0,-1036.3622)" + id="layer1" + inkscape:groupmode="layer" + inkscape:label="Layer 1"> + <path + style="opacity:1;fill:#a5b7f4;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" + d="M 8 1 A 4 4 0 0 0 4 5 L 4 11 A 4 4 0 0 0 8 15 A 4 4 0 0 0 12 11 L 12 5 A 4 4 0 0 0 8 1 z M 8 3 A 2.0000174 2.0000174 0 0 1 10 5 L 10 11 A 2.0000174 2.0000174 0 0 1 8 13 A 2.0000174 2.0000174 0 0 1 6 11 L 6 5 A 2.0000174 2.0000174 0 0 1 8 3 z " + transform="translate(0,1036.3622)" + id="path4135" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_circle_shape_2d.svg b/tools/editor/icons/source/icon_circle_shape_2d.svg new file mode 100644 index 0000000000..4f81ae0e62 --- /dev/null +++ b/tools/editor/icons/source/icon_circle_shape_2d.svg @@ -0,0 +1,21 @@ +<?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_circle_shape_2d.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="0" inkscape:window-x="0" inkscape:window-height="1055" 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="11.031037" inkscape:cx="-1.7366522" inkscape:zoom="22.627416" 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="opacity:1;fill:none;fill-opacity:1;stroke:#a5b7f3;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.98823529" d="m 8,1038.3622 a 6,6 0 0 0 -6,6 6,6 0 0 0 6,6 6,6 0 0 0 6,-6 6,6 0 0 0 -6,-6 z" id="path4157" inkscape:connector-curvature="0" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_concave_polygon_shape_2d.svg b/tools/editor/icons/source/icon_concave_polygon_shape_2d.svg new file mode 100644 index 0000000000..79e71425f7 --- /dev/null +++ b/tools/editor/icons/source/icon_concave_polygon_shape_2d.svg @@ -0,0 +1,21 @@ +<?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_collision_shape_2d.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90" sodipodi:docname="icon_concave_polygon_shape_2d.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.627416" inkscape:cx="-0.53108971" inkscape:cy="10.128279" 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="1055" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:object-paths="true" inkscape:snap-intersection-paths="true" inkscape:object-nodes="true" inkscape:snap-smooth-nodes="true" inkscape:snap-midpoints="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)"> + <path style="fill:none;fill-rule:evenodd;stroke:#a5b7f3;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.98823529" d="m 14,1050.3622 -12,0 0,-12 6,6 6,-6 z" id="path4139" inkscape:connector-curvature="0" sodipodi:nodetypes="cccccc" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_convex_polygon_shape_2d.svg b/tools/editor/icons/source/icon_convex_polygon_shape_2d.svg new file mode 100644 index 0000000000..fc84cf931b --- /dev/null +++ b/tools/editor/icons/source/icon_convex_polygon_shape_2d.svg @@ -0,0 +1,21 @@ +<?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_collision_shape_2d.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90" sodipodi:docname="icon_convex_polygon_shape_2d.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.627416" inkscape:cx="-0.53108971" inkscape:cy="10.128279" 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="1055" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:object-paths="true" inkscape:snap-intersection-paths="true" inkscape:object-nodes="true" inkscape:snap-smooth-nodes="true" inkscape:snap-midpoints="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)"> + <path style="fill:none;fill-rule:evenodd;stroke:#a5b7f3;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.98823529" d="m 14,1050.3622 -12,0 0,-6 6,-6 6,6 z" id="path4139" inkscape:connector-curvature="0" sodipodi:nodetypes="cccccc" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_line_shape_2d.svg b/tools/editor/icons/source/icon_line_shape_2d.svg new file mode 100644 index 0000000000..551439b4f3 --- /dev/null +++ b/tools/editor/icons/source/icon_line_shape_2d.svg @@ -0,0 +1,23 @@ +<?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_collision_shape_2d.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90" sodipodi:docname="icon_line_shape_2d.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.627416" inkscape:cx="-0.53108971" inkscape:cy="10.128279" 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="1055" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:object-paths="true" inkscape:snap-intersection-paths="true" inkscape:object-nodes="true" inkscape:snap-smooth-nodes="true" inkscape:snap-midpoints="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)"> + <path style="fill:none;fill-rule:evenodd;stroke:#a5b7f3;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.39215687" d="m 1,1037.3622 14,14" id="path4139" inkscape:connector-curvature="0" sodipodi:nodetypes="cc" /> + <path sodipodi:nodetypes="cc" inkscape:connector-curvature="0" id="path4201" d="m 3,1039.3622 10,10" style="fill:none;fill-rule:evenodd;stroke:#a5b7f3;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.58823532" /> + <path style="fill:none;fill-rule:evenodd;stroke:#a5b7f3;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.98823529" d="m 5,1041.3622 6,6" id="path4203" inkscape:connector-curvature="0" sodipodi:nodetypes="cc" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_ray_shape_2d.svg b/tools/editor/icons/source/icon_ray_shape_2d.svg new file mode 100644 index 0000000000..e6ac9c40fa --- /dev/null +++ b/tools/editor/icons/source/icon_ray_shape_2d.svg @@ -0,0 +1,22 @@ +<?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_collision_shape_2d.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90" sodipodi:docname="icon_ray_shape_2d.svg"> + <defs id="defs4" /> + <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1" inkscape:cx="-0.53108971" inkscape:cy="10.128279" 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="1055" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:object-paths="true" inkscape:snap-intersection-paths="true" inkscape:object-nodes="true" inkscape:snap-smooth-nodes="true" inkscape:snap-midpoints="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)"> + <path style="fill:none;fill-rule:evenodd;stroke:#a5b7f3;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.98823529" d="m 8,1038.3622 0,12" id="path4203" inkscape:connector-curvature="0" sodipodi:nodetypes="cc" /> + <path sodipodi:nodetypes="ccc" inkscape:connector-curvature="0" id="path4224" d="m 5,1047.3622 3,3 3,-3" style="fill:none;fill-rule:evenodd;stroke:#a5b7f3;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.98823529" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_rectangle_shape_2d.svg b/tools/editor/icons/source/icon_rectangle_shape_2d.svg new file mode 100644 index 0000000000..dd0941fe85 --- /dev/null +++ b/tools/editor/icons/source/icon_rectangle_shape_2d.svg @@ -0,0 +1,21 @@ +<?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_collision_shape_2d.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90" sodipodi:docname="icon_rectangle_shape_2d.svg"> + <defs id="defs4" /> + <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="52.6875" inkscape:cx="8" inkscape:cy="8" 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="1055" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:object-paths="true" inkscape:snap-intersection-paths="true" inkscape:object-nodes="true" inkscape:snap-smooth-nodes="true" inkscape:snap-midpoints="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="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:0.98823529;fill-rule:evenodd;stroke:#a5b7f3;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:0.98823529;marker:none;enable-background:accumulate" id="rect4226" width="12" height="7.9999824" x="2" y="1040.3622" rx="1.7382812e-05" ry="1.7382812e-05" /> + </g> +</svg> diff --git a/tools/editor/icons/source/icon_segment_shape_2d.svg b/tools/editor/icons/source/icon_segment_shape_2d.svg new file mode 100644 index 0000000000..99c8f80e9b --- /dev/null +++ b/tools/editor/icons/source/icon_segment_shape_2d.svg @@ -0,0 +1,21 @@ +<?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_collision_shape_2d.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90" sodipodi:docname="icon_segment_shape_2d.svg"> + <defs id="defs4" /> + <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="52.6875" inkscape:cx="8" inkscape:cy="8" 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="1055" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:object-paths="true" inkscape:snap-intersection-paths="true" inkscape:object-nodes="true" inkscape:snap-smooth-nodes="true" inkscape:snap-midpoints="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)"> + <path style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#a4b6f2;fill-opacity:1;fill-rule:evenodd;stroke:#a5b7f4;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:0.98823529;marker:none;enable-background:accumulate" d="m 2,1050.3622 12,-12" id="path4268" inkscape:connector-curvature="0" /> + </g> +</svg> diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 4ab5dddef6..a313b0053a 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -2620,72 +2620,72 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { file_menu = memnew( MenuButton ); menu_hb->add_child(file_menu); file_menu->set_text(TTR("File")); - file_menu->get_popup()->add_item(TTR("New"),FILE_NEW); - file_menu->get_popup()->add_item(TTR("Open"),FILE_OPEN); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/new", TTR("New")), FILE_NEW); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/open", TTR("Open")), FILE_OPEN); file_menu->get_popup()->add_separator(); - file_menu->get_popup()->add_item(TTR("Save"),FILE_SAVE,KEY_MASK_ALT|KEY_MASK_CMD|KEY_S); - file_menu->get_popup()->add_item(TTR("Save As.."),FILE_SAVE_AS); - file_menu->get_popup()->add_item(TTR("Save All"),FILE_SAVE_ALL,KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_S); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save", TTR("Save"), KEY_MASK_ALT|KEY_MASK_CMD|KEY_S), FILE_SAVE); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save_as", TTR("Save As..")), FILE_SAVE_AS); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save_all", TTR("Save All"), KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_S), FILE_SAVE_ALL); file_menu->get_popup()->add_separator(); - file_menu->get_popup()->add_item(TTR("History Prev"),WINDOW_PREV,KEY_MASK_CTRL|KEY_MASK_ALT|KEY_LEFT); - file_menu->get_popup()->add_item(TTR("History Next"),WINDOW_NEXT,KEY_MASK_CTRL|KEY_MASK_ALT|KEY_RIGHT); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/history_previous", TTR("History Prev"), KEY_MASK_CTRL|KEY_MASK_ALT|KEY_LEFT), WINDOW_PREV); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/history_next", TTR("History Next"), KEY_MASK_CTRL|KEY_MASK_ALT|KEY_RIGHT), WINDOW_NEXT); file_menu->get_popup()->add_separator(); - file_menu->get_popup()->add_item(TTR("Import Theme"), FILE_IMPORT_THEME); - file_menu->get_popup()->add_item(TTR("Reload Theme"), FILE_RELOAD_THEME); - file_menu->get_popup()->add_item(TTR("Save Theme"), FILE_SAVE_THEME); - file_menu->get_popup()->add_item(TTR("Save Theme As"), FILE_SAVE_THEME_AS); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/import_theme", TTR("Import Theme")), FILE_IMPORT_THEME); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/reload_theme", TTR("Reload Theme")), FILE_RELOAD_THEME); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save_theme", TTR("Save Theme")), FILE_SAVE_THEME); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save_theme_as", TTR("Save Theme As")), FILE_SAVE_THEME_AS); file_menu->get_popup()->add_separator(); - file_menu->get_popup()->add_item(TTR("Close"),FILE_CLOSE,KEY_MASK_CMD|KEY_W); + file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_file", TTR("Close"), KEY_MASK_CMD|KEY_W), FILE_CLOSE); file_menu->get_popup()->connect("item_pressed", this,"_menu_option"); edit_menu = memnew( MenuButton ); menu_hb->add_child(edit_menu); edit_menu->set_text(TTR("Edit")); - edit_menu->get_popup()->add_item(TTR("Undo"),EDIT_UNDO,KEY_MASK_CMD|KEY_Z); - edit_menu->get_popup()->add_item(TTR("Redo"),EDIT_REDO,KEY_MASK_CMD|KEY_Y); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/undo", TTR("Undo"), KEY_MASK_CMD|KEY_Z), EDIT_UNDO); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/redo", TTR("Redo"), KEY_MASK_CMD|KEY_Y), EDIT_REDO); edit_menu->get_popup()->add_separator(); - edit_menu->get_popup()->add_item(TTR("Cut"),EDIT_CUT,KEY_MASK_CMD|KEY_X); - edit_menu->get_popup()->add_item(TTR("Copy"),EDIT_COPY,KEY_MASK_CMD|KEY_C); - edit_menu->get_popup()->add_item(TTR("Paste"),EDIT_PASTE,KEY_MASK_CMD|KEY_V); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/cut", TTR("Cut"), KEY_MASK_CMD|KEY_X), EDIT_CUT); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/copy", TTR("Copy"), KEY_MASK_CMD|KEY_C), EDIT_COPY); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/paste", TTR("Paste"), KEY_MASK_CMD|KEY_V), EDIT_PASTE); edit_menu->get_popup()->add_separator(); - edit_menu->get_popup()->add_item(TTR("Select All"),EDIT_SELECT_ALL,KEY_MASK_CMD|KEY_A); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/select_all", TTR("Select All"), KEY_MASK_CMD|KEY_A), EDIT_SELECT_ALL); edit_menu->get_popup()->add_separator(); - edit_menu->get_popup()->add_item(TTR("Move Up"),EDIT_MOVE_LINE_UP,KEY_MASK_ALT|KEY_UP); - edit_menu->get_popup()->add_item(TTR("Move Down"),EDIT_MOVE_LINE_DOWN,KEY_MASK_ALT|KEY_DOWN); - edit_menu->get_popup()->add_item(TTR("Indent Left"),EDIT_INDENT_LEFT,KEY_MASK_ALT|KEY_LEFT); - edit_menu->get_popup()->add_item(TTR("Indent Right"),EDIT_INDENT_RIGHT,KEY_MASK_ALT|KEY_RIGHT); - edit_menu->get_popup()->add_item(TTR("Toggle Comment"),EDIT_TOGGLE_COMMENT,KEY_MASK_CMD|KEY_K); - edit_menu->get_popup()->add_item(TTR("Clone Down"),EDIT_CLONE_DOWN,KEY_MASK_CMD|KEY_B); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/move_up", TTR("Move Up"), KEY_MASK_ALT|KEY_UP), EDIT_MOVE_LINE_UP); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/move_down", TTR("Move Down"), KEY_MASK_ALT|KEY_DOWN), EDIT_MOVE_LINE_DOWN); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/indent_left", TTR("Indent Left"), KEY_MASK_ALT|KEY_LEFT), EDIT_INDENT_LEFT); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/indent_right", TTR("Indent Right"), KEY_MASK_ALT|KEY_RIGHT), EDIT_INDENT_RIGHT); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/toggle_comment", TTR("Toggle Comment"), KEY_MASK_CMD|KEY_K), EDIT_TOGGLE_COMMENT); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/clone_down", TTR("Clone Down"), KEY_MASK_CMD|KEY_B), EDIT_CLONE_DOWN); edit_menu->get_popup()->add_separator(); #ifdef OSX_ENABLED - edit_menu->get_popup()->add_item(TTR("Complete Symbol"),EDIT_COMPLETE,KEY_MASK_CTRL|KEY_SPACE); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/complete_symbol", TTR("Complete Symbol"), KEY_MASK_CTRL|KEY_SPACE), EDIT_COMPLETE); #else - edit_menu->get_popup()->add_item(TTR("Complete Symbol"),EDIT_COMPLETE,KEY_MASK_CMD|KEY_SPACE); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/complete_symbol", TTR("Complete Symbol"), KEY_MASK_CMD|KEY_SPACE), EDIT_COMPLETE); #endif - edit_menu->get_popup()->add_item(TTR("Trim Trailing Whitespace"), EDIT_TRIM_TRAILING_WHITESAPCE, KEY_MASK_CTRL|KEY_MASK_ALT|KEY_T); - edit_menu->get_popup()->add_item(TTR("Auto Indent"),EDIT_AUTO_INDENT,KEY_MASK_CMD|KEY_I); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/trim_trailing_whitespace", TTR("Trim Trailing Whitespace"), KEY_MASK_CTRL|KEY_MASK_ALT|KEY_T), EDIT_TRIM_TRAILING_WHITESAPCE); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/auto_indent", TTR("Auto Indent"), KEY_MASK_CMD|KEY_I), EDIT_AUTO_INDENT); edit_menu->get_popup()->connect("item_pressed", this,"_menu_option"); edit_menu->get_popup()->add_separator(); - edit_menu->get_popup()->add_item(TTR("Soft Reload Script"),FILE_TOOL_RELOAD_SOFT,KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_R); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/reload_script_soft", TTR("Soft Reload Script"), KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_R), FILE_TOOL_RELOAD_SOFT); search_menu = memnew( MenuButton ); menu_hb->add_child(search_menu); search_menu->set_text(TTR("Search")); - search_menu->get_popup()->add_item(TTR("Find.."),SEARCH_FIND,KEY_MASK_CMD|KEY_F); - search_menu->get_popup()->add_item(TTR("Find Next"),SEARCH_FIND_NEXT,KEY_F3); - search_menu->get_popup()->add_item(TTR("Find Previous"),SEARCH_FIND_PREV,KEY_MASK_SHIFT|KEY_F3); - search_menu->get_popup()->add_item(TTR("Replace.."),SEARCH_REPLACE,KEY_MASK_CMD|KEY_R); + search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find", TTR("Find.."), KEY_MASK_CMD|KEY_F), SEARCH_FIND); + search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_next", TTR("Find Next"), KEY_F3), SEARCH_FIND_NEXT); + search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_previous", TTR("Find Previous"), KEY_MASK_SHIFT|KEY_F3), SEARCH_FIND_PREV); + search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/replace", TTR("Replace.."), KEY_MASK_CMD|KEY_R), SEARCH_REPLACE); search_menu->get_popup()->add_separator(); - search_menu->get_popup()->add_item(TTR("Goto Function.."),SEARCH_LOCATE_FUNCTION,KEY_MASK_SHIFT|KEY_MASK_CMD|KEY_F); - search_menu->get_popup()->add_item(TTR("Goto Line.."),SEARCH_GOTO_LINE,KEY_MASK_CMD|KEY_L); + search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/goto_function", TTR("Goto Function.."), KEY_MASK_SHIFT|KEY_MASK_CMD|KEY_F), SEARCH_LOCATE_FUNCTION); + search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/goto_line", TTR("Goto Line.."), KEY_MASK_CMD|KEY_L), SEARCH_GOTO_LINE); search_menu->get_popup()->connect("item_pressed", this,"_menu_option"); script_search_menu = memnew( MenuButton ); menu_hb->add_child(script_search_menu); script_search_menu->set_text(TTR("Search")); - script_search_menu->get_popup()->add_item(TTR("Find.."),SEARCH_FIND,KEY_MASK_CMD|KEY_F); - script_search_menu->get_popup()->add_item(TTR("Find Next"),SEARCH_FIND_NEXT,KEY_F3); + script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find", TTR("Find.."), KEY_MASK_CMD|KEY_F), SEARCH_FIND); + script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_next", TTR("Find Next"), KEY_F3), SEARCH_FIND_NEXT); script_search_menu->get_popup()->connect("item_pressed", this,"_menu_option"); script_search_menu->hide(); @@ -2693,19 +2693,19 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { debug_menu = memnew( MenuButton ); menu_hb->add_child(debug_menu); debug_menu->set_text(TTR("Debug")); - debug_menu->get_popup()->add_item(TTR("Toggle Breakpoint"),DEBUG_TOGGLE_BREAKPOINT,KEY_F9); - debug_menu->get_popup()->add_item(TTR("Remove All Breakpoints"), DEBUG_REMOVE_ALL_BREAKPOINTS, KEY_MASK_CTRL|KEY_MASK_SHIFT|KEY_F9); - debug_menu->get_popup()->add_item(TTR("Goto Next Breakpoint"), DEBUG_GOTO_NEXT_BREAKPOINT, KEY_MASK_CTRL|KEY_PERIOD); - debug_menu->get_popup()->add_item(TTR("Goto Previous Breakpoint"), DEBUG_GOTO_PREV_BREAKPOINT, KEY_MASK_CTRL|KEY_COMMA); + debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/toggle_breakpoint", TTR("Toggle Breakpoint"), KEY_F9), DEBUG_TOGGLE_BREAKPOINT); + debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/remove_all_breakpoints", TTR("Remove All Breakpoints"), KEY_MASK_CTRL|KEY_MASK_SHIFT|KEY_F9), DEBUG_REMOVE_ALL_BREAKPOINTS); + debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/goto_next_breakpoint", TTR("Goto Next Breakpoint"), KEY_MASK_CTRL|KEY_PERIOD), DEBUG_GOTO_NEXT_BREAKPOINT); + debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/goto_previous_breakpoint", TTR("Goto Previous Breakpoint"), KEY_MASK_CTRL|KEY_COMMA), DEBUG_GOTO_PREV_BREAKPOINT); debug_menu->get_popup()->add_separator(); - debug_menu->get_popup()->add_item(TTR("Step Over"),DEBUG_NEXT,KEY_F10); - debug_menu->get_popup()->add_item(TTR("Step Into"),DEBUG_STEP,KEY_F11); + debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/step_over", TTR("Step Over"), KEY_F10), DEBUG_NEXT); + debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/step_into", TTR("Step Into"), KEY_F11), DEBUG_STEP); debug_menu->get_popup()->add_separator(); - debug_menu->get_popup()->add_item(TTR("Break"),DEBUG_BREAK); - debug_menu->get_popup()->add_item(TTR("Continue"),DEBUG_CONTINUE); + debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/break", TTR("Break")), DEBUG_BREAK); + debug_menu->get_popup()->add_shortcut(ED_SHORTCUT("debugger/continue", TTR("Continue")), DEBUG_CONTINUE); debug_menu->get_popup()->add_separator(); //debug_menu->get_popup()->add_check_item("Show Debugger",DEBUG_SHOW); - debug_menu->get_popup()->add_check_item(TTR("Keep Debugger Open"),DEBUG_SHOW_KEEP_OPEN); + debug_menu->get_popup()->add_check_shortcut(ED_SHORTCUT("debugger/keep_debugger_open", TTR("Keep Debugger Open")), DEBUG_SHOW_KEEP_OPEN); debug_menu->get_popup()->connect("item_pressed", this,"_menu_option"); debug_menu->get_popup()->set_item_disabled( debug_menu->get_popup()->get_item_index(DEBUG_NEXT), true); @@ -2730,7 +2730,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { help_menu = memnew( MenuButton ); menu_hb->add_child(help_menu); help_menu->set_text(TTR("Help")); - help_menu->get_popup()->add_item(TTR("Contextual"), HELP_CONTEXTUAL, KEY_MASK_SHIFT|KEY_F1); + help_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/Contextual", TTR("Contextual Help"), KEY_MASK_SHIFT|KEY_F1), HELP_CONTEXTUAL); help_menu->get_popup()->connect("item_pressed", this,"_menu_option"); menu_hb->add_spacer(); diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp index 61dde9a9ef..f4b294daa5 100644 --- a/tools/editor/plugins/shader_editor_plugin.cpp +++ b/tools/editor/plugins/shader_editor_plugin.cpp @@ -496,14 +496,14 @@ ShaderEditor::ShaderEditor() { add_child(edit_menu); edit_menu->set_pos(Point2(5,-1)); edit_menu->set_text(TTR("Edit")); - edit_menu->get_popup()->add_item(TTR("Undo"),EDIT_UNDO,KEY_MASK_CMD|KEY_Z); - edit_menu->get_popup()->add_item(TTR("Redo"),EDIT_REDO,KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_Z); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/undo", TTR("Undo"), KEY_MASK_CMD|KEY_Z), EDIT_UNDO); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/redo", TTR("Redo"), KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_Z), EDIT_REDO); edit_menu->get_popup()->add_separator(); - edit_menu->get_popup()->add_item(TTR("Cut"),EDIT_CUT,KEY_MASK_CMD|KEY_X); - edit_menu->get_popup()->add_item(TTR("Copy"),EDIT_COPY,KEY_MASK_CMD|KEY_C); - edit_menu->get_popup()->add_item(TTR("Paste"),EDIT_PASTE,KEY_MASK_CMD|KEY_V); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/cut", TTR("Cut"), KEY_MASK_CMD|KEY_X), EDIT_CUT); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/copy", TTR("Copy"), KEY_MASK_CMD|KEY_C), EDIT_COPY); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/paste", TTR("Paste"), KEY_MASK_CMD|KEY_V), EDIT_PASTE); edit_menu->get_popup()->add_separator(); - edit_menu->get_popup()->add_item(TTR("Select All"),EDIT_SELECT_ALL,KEY_MASK_CMD|KEY_A); + edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/select_all", TTR("Select All"), KEY_MASK_CMD|KEY_A), EDIT_SELECT_ALL); edit_menu->get_popup()->connect("item_pressed", this,"_menu_option"); @@ -511,13 +511,13 @@ ShaderEditor::ShaderEditor() { add_child(search_menu); search_menu->set_pos(Point2(38,-1)); search_menu->set_text(TTR("Search")); - search_menu->get_popup()->add_item(TTR("Find.."),SEARCH_FIND,KEY_MASK_CMD|KEY_F); - search_menu->get_popup()->add_item(TTR("Find Next"),SEARCH_FIND_NEXT,KEY_F3); - search_menu->get_popup()->add_item(TTR("Find Previous"),SEARCH_FIND_PREV,KEY_MASK_SHIFT|KEY_F3); - search_menu->get_popup()->add_item(TTR("Replace.."),SEARCH_REPLACE,KEY_MASK_CMD|KEY_R); + search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find", TTR("Find.."), KEY_MASK_CMD|KEY_F), SEARCH_FIND); + search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_next", TTR("Find Next"), KEY_F3), SEARCH_FIND_NEXT); + search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_previous", TTR("Find Previous"), KEY_MASK_SHIFT|KEY_F3), SEARCH_FIND_PREV); + search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/replace", TTR("Replace.."), KEY_MASK_CMD|KEY_R), SEARCH_REPLACE); search_menu->get_popup()->add_separator(); // search_menu->get_popup()->add_item("Locate Symbol..",SEARCH_LOCATE_SYMBOL,KEY_MASK_CMD|KEY_K); - search_menu->get_popup()->add_item(TTR("Goto Line.."),SEARCH_GOTO_LINE,KEY_MASK_CMD|KEY_G); + search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/goto_line", TTR("Goto Line.."), KEY_MASK_CMD|KEY_G), SEARCH_GOTO_LINE); search_menu->get_popup()->connect("item_pressed", this,"_menu_option"); diff --git a/tools/translations/ru.po b/tools/translations/ru.po index aa98be2767..138aa2c858 100644 --- a/tools/translations/ru.po +++ b/tools/translations/ru.po @@ -26,7 +26,7 @@ msgid "" "order for AnimatedSprite to display frames." msgstr "" "Чтобы AnimatedSprite отображал кадры, пожалуйста установите или создайте " -"ресурс SpriteFrames в параметре 'Frames'" +"ресурс SpriteFrames в параметре 'Frames'." #: scene/2d/canvas_modulate.cpp msgid "" @@ -218,13 +218,12 @@ msgstr "" "ресурс SampleLibrary в параметре 'samples'." #: scene/3d/sprite_3d.cpp -#, fuzzy msgid "" "A SpriteFrames resource must be created or set in the 'Frames' property in " "order for AnimatedSprite3D to display frames." msgstr "" -"Чтобы AnimatedSprite отображал кадры, пожалуйста установите или создайте " -"ресурс SpriteFrames в параметре 'Frames'" +"Чтобы AnimatedSprite3D отображал кадры, пожалуйста установите или создайте " +"ресурс SpriteFrames в параметре 'Frames'." #: scene/gui/dialogs.cpp tools/editor/io_plugins/editor_scene_import_plugin.cpp msgid "Cancel" @@ -262,24 +261,20 @@ msgid "Open" msgstr "Открыть" #: scene/gui/file_dialog.cpp -#, fuzzy msgid "Open a File" -msgstr "Открыть сэмпл(ы)" +msgstr "Открыть файл" #: scene/gui/file_dialog.cpp -#, fuzzy msgid "Open File(s)" -msgstr "Открыть сэмпл(ы)" +msgstr "Открыть файл(ы)" #: scene/gui/file_dialog.cpp -#, fuzzy msgid "Open a Directory" -msgstr "Выбрать каталог" +msgstr "Открыть каталог" #: scene/gui/file_dialog.cpp -#, fuzzy msgid "Open a File or Directory" -msgstr "Выбрать каталог" +msgstr "Открыть каталог или файл" #: scene/gui/file_dialog.cpp tools/editor/editor_file_dialog.cpp #: tools/editor/editor_node.cpp @@ -343,7 +338,7 @@ msgstr "Alt+" #: scene/gui/input_action.cpp msgid "Ctrl+" -msgstr "" +msgstr "Ctrl+" #: scene/gui/input_action.cpp tools/editor/project_settings.cpp #: tools/editor/settings_config_dialog.cpp @@ -715,7 +710,7 @@ msgstr "Включить индивидуальное редактировани #: tools/editor/animation_editor.cpp msgid "Anim. Optimizer" -msgstr "Оптимизатор анимации." +msgstr "Оптимизатор анимации" #: tools/editor/animation_editor.cpp msgid "Max. Linear Error:" @@ -810,22 +805,20 @@ msgid "Site:" msgstr "Сайт:" #: tools/editor/asset_library_editor_plugin.cpp -#, fuzzy msgid "Support.." -msgstr "Экспортировать.." +msgstr "Поддержка.." #: tools/editor/asset_library_editor_plugin.cpp msgid "Official" -msgstr "" +msgstr "Официально" #: tools/editor/asset_library_editor_plugin.cpp msgid "Community" -msgstr "" +msgstr "Сообщество" #: tools/editor/asset_library_editor_plugin.cpp -#, fuzzy msgid "Testing" -msgstr "Настройки" +msgstr "Тестируемые" #: tools/editor/asset_library_editor_plugin.cpp msgid "Assets ZIP File" @@ -1018,9 +1011,8 @@ msgid "Disconnect" msgstr "Отсоединить" #: tools/editor/connections_dialog.cpp tools/editor/node_dock.cpp -#, fuzzy msgid "Signals" -msgstr "Сигналы:" +msgstr "Сигналы" #: tools/editor/create_dialog.cpp msgid "Create New" @@ -1245,7 +1237,7 @@ msgstr "Описание методов:" #: tools/editor/editor_help.cpp msgid "Search Text" -msgstr "Искать текст:" +msgstr "Искать текст" #: tools/editor/editor_import_export.cpp msgid "Added:" @@ -1280,9 +1272,8 @@ msgid "Setting Up.." msgstr "Настройка.." #: tools/editor/editor_log.cpp -#, fuzzy msgid " Output:" -msgstr "Вывод" +msgstr " Вывод:" #: tools/editor/editor_node.cpp tools/editor/editor_reimport_dialog.cpp msgid "Re-Importing" @@ -1396,9 +1387,8 @@ msgid "Copy Params" msgstr "Копировать параметры" #: tools/editor/editor_node.cpp -#, fuzzy msgid "Paste Params" -msgstr "Вставить кадр" +msgstr "Вставить параметры" #: tools/editor/editor_node.cpp #: tools/editor/plugins/resource_preloader_editor_plugin.cpp @@ -1418,9 +1408,8 @@ msgid "Make Sub-Resources Unique" msgstr "Сделать вложенные ресурсы уникальными" #: tools/editor/editor_node.cpp -#, fuzzy msgid "Open in Help" -msgstr "Открыть сцену" +msgstr "Открыть в справке" #: tools/editor/editor_node.cpp msgid "There is no defined scene to run." @@ -1431,6 +1420,9 @@ msgid "" "No main scene has ever been defined.\n" "Select one from \"Project Settings\" under the 'application' category." msgstr "" +"Не назначена главная сцена.\n" +"Укажите её в параметре \"main_scene\" расположенном\n" +"в \"Настройки проекта - Основное - application\"." #: tools/editor/editor_node.cpp msgid "Current scene was never saved, please save it prior to running." @@ -1550,9 +1542,8 @@ msgid "Save Layout" msgstr "Сохранить макет" #: tools/editor/editor_node.cpp -#, fuzzy msgid "Load Layout" -msgstr "Сохранить макет" +msgstr "Загрузить макет" #: tools/editor/editor_node.cpp tools/editor/project_export.cpp msgid "Default" @@ -1616,9 +1607,8 @@ msgid "Open Recent" msgstr "Открыть последнее" #: tools/editor/editor_node.cpp -#, fuzzy msgid "Quick Filter Files.." -msgstr "Быстрый поиск файлов.." +msgstr "Быстро отсортировать файлы.." #: tools/editor/editor_node.cpp msgid "Convert To.." @@ -1690,9 +1680,8 @@ msgid "Export" msgstr "Экспорт" #: tools/editor/editor_node.cpp -#, fuzzy msgid "Play the project." -msgstr "Запустить проект (F5)." +msgstr "Запустить проект." #: tools/editor/editor_node.cpp #: tools/editor/plugins/sample_library_editor_plugin.cpp @@ -1704,14 +1693,12 @@ msgid "Pause the scene" msgstr "Приостановить сцену" #: tools/editor/editor_node.cpp -#, fuzzy msgid "Pause Scene" msgstr "Приостановить сцену" #: tools/editor/editor_node.cpp -#, fuzzy msgid "Stop the scene." -msgstr "Остановить проект (F8)." +msgstr "Остановить сцену." #: tools/editor/editor_node.cpp #: tools/editor/plugins/sample_library_editor_plugin.cpp @@ -1719,14 +1706,12 @@ msgid "Stop" msgstr "Остановить" #: tools/editor/editor_node.cpp -#, fuzzy msgid "Play the edited scene." -msgstr "Запустить текущую сцену (F6)." +msgstr "Запустить текущую сцену." #: tools/editor/editor_node.cpp -#, fuzzy msgid "Play Scene" -msgstr "Сохранить сцену" +msgstr "Запустить сцену" #: tools/editor/editor_node.cpp msgid "Play custom scene" @@ -1737,19 +1722,20 @@ msgid "Debug options" msgstr "Параметры отладки" #: tools/editor/editor_node.cpp -#, fuzzy msgid "Deploy with Remote Debug" -msgstr "Развернуть удалённую отладку" +msgstr "Развернуть с удалённой отладкой" #: tools/editor/editor_node.cpp msgid "" "When exporting or deploying, the resulting executable will attempt to connect " "to the IP of this computer in order to be debugged." msgstr "" +"При экспорте или развёртывании, полученный исполняемый файл будет пытаться " +"подключиться к IP этого компьютера с целью отладки." #: tools/editor/editor_node.cpp msgid "Small Deploy with Network FS" -msgstr "" +msgstr "Небольшое развёртывание через сеть" #: tools/editor/editor_node.cpp msgid "" @@ -1760,6 +1746,11 @@ msgid "" "On Android, deploy will use the USB cable for faster performance. This option " "speeds up testing for games with a large footprint." msgstr "" +"Когда эта опция включена, экспорт или развёртывание будет создавать " +"минимальный исполняемый файл.\n" +"Файловая система проекта будет предоставляться редактором через сеть.\n" +"На Android развёртывание будет быстрее при подключении через USB.\n" +"Эта опция ускоряет тестирование больших проектов." #: tools/editor/editor_node.cpp msgid "Visible Collision Shapes" @@ -1770,6 +1761,8 @@ msgid "" "Collision shapes and raycast nodes (for 2D and 3D) will be visible on the " "running game if this option is turned on." msgstr "" +"Когда эта опция включена, области соприкосновений и ноды Raycast(в 2D и 3D) " +"будут видимыми в запущенной игре." #: tools/editor/editor_node.cpp msgid "Visible Navigation" @@ -1780,10 +1773,12 @@ msgid "" "Navigation meshes and polygons will be visible on the running game if this " "option is turned on." msgstr "" +"Когда эта опция включена, навигационные полисетки и полигоны будут видимыми " +"в запущенной игре." #: tools/editor/editor_node.cpp msgid "Sync Scene Changes" -msgstr "" +msgstr "Синхронизация изменений на сцене" #: tools/editor/editor_node.cpp msgid "" @@ -1792,11 +1787,14 @@ msgid "" "When used remotely on a device, this is more efficient with network " "filesystem." msgstr "" +"Когда эта опция включена, все изменения, внесённые на сцену, в редакторе " +"будут перенесены в запущенную игру.\n" +"При удалённом использовании на устройстве, это работает более эффективно с " +"сетевой файловой системой." #: tools/editor/editor_node.cpp -#, fuzzy msgid "Sync Script Changes" -msgstr "Обновлять при изменениях" +msgstr "Синхронизация изменений в скриптах" #: tools/editor/editor_node.cpp msgid "" @@ -1805,6 +1803,10 @@ msgid "" "When used remotely on a device, this is more efficient with network " "filesystem." msgstr "" +"Когда эта опция включена, любой сохранённый скрипт будет перезагружен в " +"запущенную игру.\n" +"При удалённом использовании на устройстве, это работает более эффективно с " +"сетевой файловой системой." #: tools/editor/editor_node.cpp tools/editor/plugins/spatial_editor_plugin.cpp msgid "Settings" @@ -2068,9 +2070,8 @@ msgid "Imported Resources" msgstr "Импортированные ресурсы" #: tools/editor/io_plugins/editor_bitmask_import_plugin.cpp -#, fuzzy msgid "No bit masks to import!" -msgstr "Нет элементов для импорта!" +msgstr "Нет битовой маски для импорта!" #: tools/editor/io_plugins/editor_bitmask_import_plugin.cpp #: tools/editor/io_plugins/editor_sample_import_plugin.cpp @@ -2100,9 +2101,8 @@ msgid "Save path is empty!" msgstr "Путь сохранения пуст!" #: tools/editor/io_plugins/editor_bitmask_import_plugin.cpp -#, fuzzy msgid "Import BitMasks" -msgstr "Импорт текстур" +msgstr "Импорт битовой маски" #: tools/editor/io_plugins/editor_bitmask_import_plugin.cpp #: tools/editor/io_plugins/editor_texture_import_plugin.cpp @@ -2129,7 +2129,7 @@ msgstr "Принять" #: tools/editor/io_plugins/editor_bitmask_import_plugin.cpp msgid "Bit Mask" -msgstr "" +msgstr "Битовая маска" #: tools/editor/io_plugins/editor_font_import_plugin.cpp msgid "No source font file!" @@ -2164,7 +2164,7 @@ msgid "The quick brown fox jumps over the lazy dog." msgstr "" "Съешь ещё этих мягких французских булок да выпей чаю. \n" "The quick brown fox jumps over the lazy dog.\n" -"0123456789`!@#$%^&*()_+-=\\/" +"0123456789`!@#$%^&*()_+-=\\/." #: tools/editor/io_plugins/editor_font_import_plugin.cpp msgid "Test:" @@ -2646,18 +2646,18 @@ msgid "MultiNode Set" msgstr "Мульти нодовый набор" #: tools/editor/node_dock.cpp -#, fuzzy msgid "Node" -msgstr "Mix Node" +msgstr "Нод" #: tools/editor/node_dock.cpp -#, fuzzy msgid "Groups" -msgstr "Группы:" +msgstr "Группы" #: tools/editor/node_dock.cpp msgid "Select a Node to edit Signals and Groups." msgstr "" +"Выберите нод для редактирования\n" +"сигналов и групп." #: tools/editor/plugins/animation_player_editor_plugin.cpp msgid "Toggle Autoplay" @@ -2774,7 +2774,7 @@ msgstr "Загрузить анимацию с диска." #: tools/editor/plugins/animation_player_editor_plugin.cpp msgid "Save the current animation" -msgstr "Сохранить текущую анимацию." +msgstr "Сохранить текущую анимацию" #: tools/editor/plugins/animation_player_editor_plugin.cpp msgid "Display list of animations in player." @@ -2925,39 +2925,39 @@ msgstr "Дерево анимации не действительно." #: tools/editor/plugins/animation_tree_editor_plugin.cpp msgid "Animation Node" -msgstr "Animation Node" +msgstr "Animation нод" #: tools/editor/plugins/animation_tree_editor_plugin.cpp msgid "OneShot Node" -msgstr "OneShot Node" +msgstr "OneShot нод" #: tools/editor/plugins/animation_tree_editor_plugin.cpp msgid "Mix Node" -msgstr "Mix Node" +msgstr "Mix нод" #: tools/editor/plugins/animation_tree_editor_plugin.cpp msgid "Blend2 Node" -msgstr "Blend2 Node" +msgstr "Blend2 нод" #: tools/editor/plugins/animation_tree_editor_plugin.cpp msgid "Blend3 Node" -msgstr "Blend3 Node" +msgstr "Blend3 нод" #: tools/editor/plugins/animation_tree_editor_plugin.cpp msgid "Blend4 Node" -msgstr "Blend4 Node" +msgstr "Blend4 нод" #: tools/editor/plugins/animation_tree_editor_plugin.cpp msgid "TimeScale Node" -msgstr "TimeScale Node" +msgstr "TimeScale нод" #: tools/editor/plugins/animation_tree_editor_plugin.cpp msgid "TimeSeek Node" -msgstr "TimeSeek Node" +msgstr "TimeSeek нод" #: tools/editor/plugins/animation_tree_editor_plugin.cpp msgid "Transition Node" -msgstr "Transition Node" +msgstr "Transition нод" #: tools/editor/plugins/animation_tree_editor_plugin.cpp msgid "Import Animations.." @@ -3971,14 +3971,12 @@ msgid "Auto Indent" msgstr "Автоотступ" #: tools/editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Reload Tool Script" -msgstr "Перезагрузить скрипты" +msgstr "Перезагрузить инструм. скрипт" #: tools/editor/plugins/script_editor_plugin.cpp -#, fuzzy msgid "Reload Tool Script (Soft)" -msgstr "Перезагрузить скрипты" +msgstr "Перезагрузить инструм. скрипт (мягко)" #: tools/editor/plugins/script_editor_plugin.cpp #: tools/editor/plugins/shader_editor_plugin.cpp @@ -4635,20 +4633,20 @@ msgid "StyleBox Preview:" msgstr "StyleBox предпросмотр:" #: tools/editor/plugins/texture_region_editor_plugin.cpp -#, fuzzy msgid "Texture Region Editor" -msgstr "Редактор Области Спрайта" +msgstr "Редактор области текстуры" #: tools/editor/plugins/texture_region_editor_plugin.cpp -#, fuzzy msgid "Scale Region Editor" -msgstr "Редактор Области Спрайта" +msgstr "Редактор масштабируемой области текстуры" #: tools/editor/plugins/texture_region_editor_plugin.cpp msgid "" "No texture in this node.\n" "Set a texture to be able to edit region." msgstr "" +"В этом ноде нет текстуры.\n" +"Выберите текстуру, чтобы редактировать область." #: tools/editor/plugins/theme_editor_plugin.cpp msgid "Can't save theme to file:" @@ -5171,14 +5169,12 @@ msgid "Remove project from the list? (Folder contents will not be modified)" msgstr "Удалить проект из списка? (Содержимое папки не будет изменено)" #: tools/editor/project_manager.cpp -#, fuzzy msgid "Project Manager" -msgstr "Название проекта:" +msgstr "Менеджер проектов" #: tools/editor/project_manager.cpp -#, fuzzy msgid "Project List" -msgstr "Выйти в список проектов" +msgstr "Список проектов" #: tools/editor/project_manager.cpp msgid "Run" @@ -5198,7 +5194,7 @@ msgstr "Выход" #: tools/editor/project_settings.cpp msgid "Key " -msgstr "Кнопка" +msgstr "Кнопка " #: tools/editor/project_settings.cpp msgid "Joy Button" @@ -5334,14 +5330,12 @@ msgstr "" "константы." #: tools/editor/project_settings.cpp -#, fuzzy msgid "Autoload '%s' already exists!" -msgstr "Действие '%s' уже существует!" +msgstr "Автозагрузка '%s' уже существует!" #: tools/editor/project_settings.cpp -#, fuzzy msgid "Rename Autoload" -msgstr "Удалена автозагрузка" +msgstr "Переименовать автозагрузку" #: tools/editor/project_settings.cpp msgid "Toggle AutoLoad Globals" @@ -5691,9 +5685,7 @@ msgstr "Не могу работать с нодами из внешней сц #: tools/editor/scene_tree_dock.cpp msgid "Can't operate on nodes the current scene inherits from!" -msgstr "" -"Не могу работать с нодами текущей сцены, наследуемой откуда-то!\n" -"Очистите наследование, чтобы продолжить работу с ними." +msgstr "Невозможно работать с нодами текущей сцены, наследуемой откуда-то!" #: tools/editor/scene_tree_dock.cpp msgid "Remove Node(s)" @@ -5861,7 +5853,7 @@ msgstr "Файлы не выбраны!" #: tools/editor/scenes_dock.cpp msgid "Instance" -msgstr "Экземпляр" +msgstr "Добавить экземпляр" #: tools/editor/scenes_dock.cpp msgid "Edit Dependencies.." @@ -5872,9 +5864,8 @@ msgid "View Owners.." msgstr "Просмотреть владельцев.." #: tools/editor/scenes_dock.cpp -#, fuzzy msgid "Copy Path" -msgstr "Копировать параметры" +msgstr "Копировать путь" #: tools/editor/scenes_dock.cpp msgid "Rename or Move.." @@ -6050,7 +6041,7 @@ msgstr "Дерево сцены в реальном времени:" #: tools/editor/script_editor_debugger.cpp msgid "Remote Object Properties: " -msgstr "Параметры объекта:" +msgstr "Параметры объекта: " #: tools/editor/script_editor_debugger.cpp msgid "Profiler" @@ -6114,7 +6105,7 @@ msgstr "Установить из дерева нодов" #: tools/editor/settings_config_dialog.cpp msgid "Shortcuts" -msgstr "" +msgstr "Горячие клавиши" #: tools/editor/spatial_editor_gizmos.cpp msgid "Change Light Radius" |