@@ -210,6 +210,7 @@ static const char *gdscript_function_renames[][2] = {
210
210
// { "set_v_offset", "set_drag_vertical_offset" }, // Camera2D broke Camera3D, PathFollow3D, PathFollow2D
211
211
// {"get_points","get_points_id"},// Astar, broke Line2D, Convexpolygonshape
212
212
// {"get_v_scroll","get_v_scroll_bar"},//ItemList, broke TextView
213
+ // { "get_stylebox", "get_theme_stylebox" }, // Control - Will rename the method in Theme as well, skipping
213
214
{ " _about_to_show" , " _about_to_popup" }, // ColorPickerButton
214
215
{ " _get_configuration_warning" , " _get_configuration_warnings" }, // Node
215
216
{ " _set_current" , " set_current" }, // Camera2D
@@ -665,6 +666,7 @@ static const char *csharp_function_renames[][2] = {
665
666
// { "SetVOffset", "SetDragVerticalOffset" }, // Camera2D broke Camera3D, PathFollow3D, PathFollow2D
666
667
// {"GetPoints","GetPointsId"},// Astar, broke Line2D, Convexpolygonshape
667
668
// {"GetVScroll","GetVScrollBar"},//ItemList, broke TextView
669
+ // { "GetStylebox", "GetThemeStylebox" }, // Control - Will rename the method in Theme as well, skipping
668
670
{ " AddSpatialGizmoPlugin" , " AddNode3dGizmoPlugin" }, // EditorPlugin
669
671
{ " RenderingServer" , " GetTabAlignment" }, // Tab
670
672
{ " _AboutToShow" , " _AboutToPopup" }, // ColorPickerButton
@@ -1078,6 +1080,7 @@ static const char *gdscript_properties_renames[][2] = {
1078
1080
// { "zfar", "far" }, // Camera3D
1079
1081
// { "znear", "near" }, // Camera3D
1080
1082
// { "filename", "scene_file_path" }, // Node
1083
+ // { "pressed", "button_pressed" }, // BaseButton - Will also rename the signal, skipping for now
1081
1084
{ " as_normalmap" , " as_normal_map" }, // NoiseTexture
1082
1085
{ " bbcode_text" , " text" }, // RichTextLabel
1083
1086
{ " bg" , " panel" }, // Theme
@@ -1113,6 +1116,7 @@ static const char *gdscript_properties_renames[][2] = {
1113
1116
{ " gravity_vec" , " gravity_direction" }, // Area2D
1114
1117
{ " hint_tooltip" , " tooltip_text" }, // Control
1115
1118
{ " hseparation" , " h_separation" }, // Theme
1119
+ { " icon_align" , " icon_alignment" }, // Button
1116
1120
{ " iterations_per_second" , " physics_ticks_per_second" }, // Engine
1117
1121
{ " invert_enable" , " invert_enabled" }, // Polygon2D
1118
1122
{ " margin_bottom" , " offset_bottom" }, // Control broke NinePatchRect, StyleBox
@@ -1137,7 +1141,7 @@ static const char *gdscript_properties_renames[][2] = {
1137
1141
{ " rect_position" , " position" }, // Control
1138
1142
{ " rect_global_position" , " global_position" }, // Control
1139
1143
{ " rect_size" , " size" }, // Control
1140
- { " rect_min_size" , " minimum_size " }, // Control
1144
+ { " rect_min_size" , " custom_minimum_size " }, // Control
1141
1145
{ " rect_rotation" , " rotation" }, // Control
1142
1146
{ " rect_scale" , " scale" }, // Control
1143
1147
{ " rect_pivot_offset" , " pivot_offset" }, // Control
@@ -1192,6 +1196,7 @@ static const char *csharp_properties_renames[][2] = {
1192
1196
// { "WrapEnabled", "WrapMode" }, // TextEdit
1193
1197
// { "Zfar", "Far" }, // Camera3D
1194
1198
// { "Znear", "Near" }, // Camera3D
1199
+ // { "Pressed", "ButtonPressed" }, // BaseButton - Will also rename the signal, skipping for now
1195
1200
{ " AsNormalmap" , " AsNormalMap" }, // NoiseTexture
1196
1201
{ " BbcodeText" , " Text" }, // RichTextLabel
1197
1202
{ " CaretBlinkSpeed" , " CaretBlinkInterval" }, // TextEdit, LineEdit
@@ -1221,6 +1226,7 @@ static const char *csharp_properties_renames[][2] = {
1221
1226
{ " GravityVec" , " GravityDirection" }, // Area2D
1222
1227
{ " HintTooltip" , " TooltipText" }, // Control
1223
1228
{ " Hseparation" , " HSeparation" }, // Theme
1229
+ { " IconAlign" , " IconAlignment" }, // Button
1224
1230
{ " IterationsPerSecond" , " PhysicsTicksPerSecond" }, // Engine
1225
1231
{ " InvertEnable" , " InvertEnabled" }, // Polygon2D
1226
1232
{ " MarginBottom" , " OffsetBottom" }, // Control broke NinePatchRect, StyleBox
@@ -3880,11 +3886,33 @@ void ProjectConverter3To4::process_gdscript_line(String &line, const RegExContai
3880
3886
if (line.contains (" OS.set_window_title" )) {
3881
3887
line = line.replace (" OS.set_window_title" , " get_window().set_title" );
3882
3888
}
3889
+
3890
+ // get_tree().set_input_as_handled() -> get_viewport().set_input_as_handled()
3891
+ if (line.contains (" get_tree().set_input_as_handled()" )) {
3892
+ line = line.replace (" get_tree().set_input_as_handled()" , " get_viewport().set_input_as_handled()" );
3893
+ }
3894
+
3895
+ // Fix the simple case of using _unhandled_key_input
3896
+ // func _unhandled_key_input(event: InputEventKey) -> _unhandled_key_input(event: InputEvent)
3897
+ if (line.contains (" _unhandled_key_input(event: InputEventKey)" )) {
3898
+ line = line.replace (" _unhandled_key_input(event: InputEventKey)" , " _unhandled_key_input(event: InputEvent)" );
3899
+ }
3883
3900
}
3884
3901
3885
3902
void ProjectConverter3To4::process_csharp_line (String &line, const RegExContainer ®_container) {
3886
3903
line = line.replace (" OS.GetWindowSafeArea()" , " DisplayServer.ScreenGetUsableRect()" );
3887
3904
3905
+ // GetTree().SetInputAsHandled() -> GetViewport().SetInputAsHandled()
3906
+ if (line.contains (" GetTree().SetInputAsHandled()" )) {
3907
+ line = line.replace (" GetTree().SetInputAsHandled()" , " GetViewport().SetInputAsHandled()" );
3908
+ }
3909
+
3910
+ // Fix the simple case of using _UnhandledKeyInput
3911
+ // func _UnhandledKeyInput(InputEventKey @event) -> _UnhandledKeyInput(InputEvent @event)
3912
+ if (line.contains (" _UnhandledKeyInput(InputEventKey @event)" )) {
3913
+ line = line.replace (" _UnhandledKeyInput(InputEventKey @event)" , " _UnhandledKeyInput(InputEvent @event)" );
3914
+ }
3915
+
3888
3916
// -- Connect(,,,things) -> Connect(,Callable(,),things) Object
3889
3917
if (line.contains (" Connect(" )) {
3890
3918
int start = line.find (" Connect(" );
0 commit comments