diff --git a/Translations/Translations.pot b/Translations/Translations.pot index 027ebe2d4..8afcb498e 100644 --- a/Translations/Translations.pot +++ b/Translations/Translations.pot @@ -3059,6 +3059,10 @@ msgstr "" msgid "Right" msgstr "" +#. Refers to the vertical space between lines in a text. +msgid "Line spacing:" +msgstr "" + #. Found in the tool options of the 3D Shape Edit tool, under the Light category if a light is selected. Refers to the energy of the light. The more energy, the brighter it shines. msgid "Energy:" msgstr "" diff --git a/src/Classes/Cel3DObject.gd b/src/Classes/Cel3DObject.gd index 615dc65c5..e1bd67455 100644 --- a/src/Classes/Cel3DObject.gd +++ b/src/Classes/Cel3DObject.gd @@ -101,6 +101,7 @@ func serialize() -> Dictionary: dict["mesh_curve_step"] = mesh.curve_step dict["mesh_horizontal_alignment"] = mesh.horizontal_alignment dict["mesh_vertical_alignment"] = mesh.vertical_alignment + dict["mesh_line_spacing"] = mesh.line_spacing else: dict["light_color"] = node3d_type.light_color dict["light_energy"] = node3d_type.light_energy @@ -163,6 +164,7 @@ func deserialize(dict: Dictionary) -> void: mesh.curve_step = dict["mesh_curve_step"] mesh.horizontal_alignment = dict["mesh_horizontal_alignment"] mesh.vertical_alignment = dict["mesh_vertical_alignment"] + mesh.line_spacing = dict["mesh_line_spacing"] else: node3d_type.light_color = dict["light_color"] node3d_type.light_energy = dict["light_energy"] diff --git a/src/Tools/3DTools/3DShapeEdit.gd b/src/Tools/3DTools/3DShapeEdit.gd index 41f1ead52..939dcd637 100644 --- a/src/Tools/3DTools/3DShapeEdit.gd +++ b/src/Tools/3DTools/3DShapeEdit.gd @@ -65,6 +65,7 @@ var _object_names := { "node3d_type:mesh:curve_step": $"%MeshCurveStep", "node3d_type:mesh:horizontal_alignment": $"%MeshHorizontalAlignment", "node3d_type:mesh:vertical_alignment": $"%MeshVerticalAlignment", + "node3d_type:mesh:line_spacing": $"%MeshLineSpacing", "node3d_type:light_color": $"%LightColor", "node3d_type:light_energy": $"%LightEnergy", "node3d_type:light_negative": $"%LightNegative", @@ -75,7 +76,7 @@ var _object_names := { } -func sprite_changed_this_frame(): +func sprite_changed_this_frame() -> void: _checker_update_qued = true _old_cel_image = _cel.get_image() Global.canvas.sprite_changed_this_frame = true diff --git a/src/Tools/3DTools/3DShapeEdit.tscn b/src/Tools/3DTools/3DShapeEdit.tscn index 7108be2c0..c2bbda60a 100644 --- a/src/Tools/3DTools/3DShapeEdit.tscn +++ b/src/Tools/3DTools/3DShapeEdit.tscn @@ -666,6 +666,31 @@ popup/item_1/id = 1 popup/item_2/text = "Bottom" popup/item_2/id = 2 +[node name="MeshLineSpacingLabel" type="Label" parent="ObjectOptions/MeshOptions/GridContainer" index="36"] +layout_mode = 2 +size_flags_horizontal = 3 +text = "Line spacing:" +clip_text = true + +[node name="MeshLineSpacing" type="TextureProgressBar" parent="ObjectOptions/MeshOptions/GridContainer" index="37"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +focus_mode = 2 +mouse_default_cursor_shape = 2 +theme_type_variation = &"ValueSlider" +min_value = -10.0 +max_value = 10.0 +step = 0.001 +allow_greater = true +allow_lesser = true +nine_patch_stretch = true +stretch_margin_left = 3 +stretch_margin_top = 3 +stretch_margin_right = 3 +stretch_margin_bottom = 3 +script = ExtResource("5") + [node name="LightOptions" type="VBoxContainer" parent="ObjectOptions" index="3"] unique_name_in_owner = true layout_mode = 2