diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-09-06 18:32:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-06 18:32:48 +0200 |
commit | 0c4d578bdf0630d81ab4ef13a8e596c6980b3df9 (patch) | |
tree | 3390ebab0ed61a65972d8eb3daa6d217541fb34c /editor | |
parent | 5fb84e5702d7fbfc011c05304500c0b61ef2ef92 (diff) | |
parent | 8949386382320bc1055ee1d8eb3e86dc94c0ad8e (diff) |
Merge pull request #65194 from Mickeon/rename-one-shot
Diffstat (limited to 'editor')
-rw-r--r-- | editor/connections_dialog.cpp | 18 | ||||
-rw-r--r-- | editor/connections_dialog.h | 4 | ||||
-rw-r--r-- | editor/project_converter_3_to_4.cpp | 6 |
3 files changed, 17 insertions, 11 deletions
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index dce9ca2b93..7de308fca8 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -289,8 +289,8 @@ bool ConnectDialog::get_deferred() const { return deferred->is_pressed(); } -bool ConnectDialog::get_oneshot() const { - return oneshot->is_pressed(); +bool ConnectDialog::get_one_shot() const { + return one_shot->is_pressed(); } /* @@ -325,7 +325,7 @@ void ConnectDialog::init(ConnectionData p_cd, bool p_edit) { bool b_oneshot = (p_cd.flags & CONNECT_ONESHOT) == CONNECT_ONESHOT; deferred->set_pressed(b_deferred); - oneshot->set_pressed(b_oneshot); + one_shot->set_pressed(b_oneshot); MethodInfo r_signal; Ref<Script> source_script = source->get_script(); @@ -484,11 +484,11 @@ ConnectDialog::ConnectDialog() { deferred->set_tooltip_text(TTR("Defers the signal, storing it in a queue and only firing it at idle time.")); vbc_right->add_child(deferred); - oneshot = memnew(CheckBox); - oneshot->set_h_size_flags(0); - oneshot->set_text(TTR("Oneshot")); - oneshot->set_tooltip_text(TTR("Disconnects the signal after its first emission.")); - vbc_right->add_child(oneshot); + one_shot = memnew(CheckBox); + one_shot->set_h_size_flags(0); + one_shot->set_text(TTR("Oneshot")); + one_shot->set_tooltip_text(TTR("Disconnects the signal after its first emission.")); + vbc_right->add_child(one_shot); cdbinds = memnew(ConnectDialogBinds); @@ -564,7 +564,7 @@ void ConnectionsDock::_make_or_edit_connection() { cd.binds = connect_dialog->get_binds(); } bool b_deferred = connect_dialog->get_deferred(); - bool b_oneshot = connect_dialog->get_oneshot(); + bool b_oneshot = connect_dialog->get_one_shot(); cd.flags = CONNECT_PERSIST | (b_deferred ? CONNECT_DEFERRED : 0) | (b_oneshot ? CONNECT_ONESHOT : 0); // Conditions to add function: must have a script and must not have the method already diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h index 352c5c99d6..e37246e7a0 100644 --- a/editor/connections_dialog.h +++ b/editor/connections_dialog.h @@ -121,7 +121,7 @@ private: EditorInspector *bind_editor = nullptr; OptionButton *type_list = nullptr; CheckBox *deferred = nullptr; - CheckBox *oneshot = nullptr; + CheckBox *one_shot = nullptr; CheckButton *advanced = nullptr; Vector<Control *> bind_controls; @@ -153,7 +153,7 @@ public: Vector<Variant> get_binds() const; bool get_deferred() const; - bool get_oneshot() const; + bool get_one_shot() const; bool is_editing() const; void init(ConnectionData p_cd, bool p_edit = false); diff --git a/editor/project_converter_3_to_4.cpp b/editor/project_converter_3_to_4.cpp index 4a78c04b03..367764120f 100644 --- a/editor/project_converter_3_to_4.cpp +++ b/editor/project_converter_3_to_4.cpp @@ -331,6 +331,7 @@ static const char *gdscript_function_renames[][2] = { { "get_network_peer", "get_multiplayer_peer" }, // Multiplayer API { "get_network_unique_id", "get_unique_id" }, // Multiplayer API { "get_ok", "get_ok_button" }, // AcceptDialog + { "get_oneshot", "get_one_shot" }, // AnimatedTexture { "get_option_visibility", "_get_option_visibility" }, // EditorImportPlugin { "get_parameter_default_value", "_get_parameter_default_value" }, // AnimationNode { "get_parameter_list", "_get_parameter_list" }, // AnimationNode @@ -506,6 +507,7 @@ static const char *gdscript_function_renames[][2] = { { "set_mid_height", "set_height" }, // CapsuleMesh { "set_network_master", "set_multiplayer_authority" }, // Node { "set_network_peer", "set_multiplayer_peer" }, // Multiplayer API + { "set_oneshot", "set_one_shot" }, // AnimatedTexture { "set_pause_mode", "set_process_mode" }, // Node { "set_physical_scancode", "set_physical_keycode" }, // InputEventKey { "set_refuse_new_network_connections", "set_refuse_new_connections" }, // Multiplayer API @@ -752,6 +754,7 @@ static const char *csharp_function_renames[][2] = { { "GetNetworkMaster", "GetMultiplayerAuthority" }, // Node { "GetNetworkPeer", "GetMultiplayerPeer" }, // Multiplayer API { "GetNetworkUniqueId", "GetUniqueId" }, // Multiplayer API + { "GetOneshot", "GetOneShot" }, // AnimatedTexture { "GetOk", "GetOkButton" }, // AcceptDialog { "GetOptionVisibility", "_GetOptionVisibility" }, // EditorImportPlugin { "GetParameterDefaultValue", "_GetParameterDefaultValue" }, // AnimationNode @@ -918,6 +921,7 @@ static const char *csharp_function_renames[][2] = { { "SetMidHeight", "SetHeight" }, // CapsuleMesh { "SetNetworkMaster", "SetMultiplayerAuthority" }, // Node { "SetNetworkPeer", "SetMultiplayerPeer" }, // Multiplayer API + { "SetOneshot", "SetOneShot" }, // AnimatedTexture { "SetPhysicalScancode", "SetPhysicalKeycode" }, // InputEventKey { "SetRefuseNewNetworkConnections", "SetRefuseNewConnections" }, // Multiplayer API { "SetRegion", "SetRegionEnabled" }, // Sprite2D, Sprite broke AtlasTexture @@ -1062,6 +1066,7 @@ static const char *gdscript_properties_renames[][2] = { { "offset_h", "drag_horizontal_offset" }, // Camera2D { "offset_v", "drag_vertical_offset" }, // Camera2D { "ofs", "offset" }, // Theme + { "oneshot", "one_shot" }, // AnimatedTexture { "out_of_range_mode", "max_polyphony" }, // AudioStreamPlayer3D { "pause_mode", "process_mode" }, // Node { "physical_scancode", "physical_keycode" }, // InputEventKey @@ -1155,6 +1160,7 @@ static const char *csharp_properties_renames[][2] = { { "OffsetH", "DragHorizontalOffset" }, // Camera2D { "OffsetV", "DragVerticalOffset" }, // Camera2D { "Ofs", "Offset" }, // Theme + { "Oneshot", "OneShot" }, // AnimatedTexture { "OutOfRangeMode", "MaxPolyphony" }, // AudioStreamPlayer3D { "PauseMode", "ProcessMode" }, // Node { "PhysicalScancode", "PhysicalKeycode" }, // InputEventKey |