diff --git a/Translations/Translations.pot b/Translations/Translations.pot index c1e88df21..027ebe2d4 100644 --- a/Translations/Translations.pot +++ b/Translations/Translations.pot @@ -3035,6 +3035,10 @@ msgstr "" msgid "Text:" msgstr "" +#. Refers to the depth of something, such as the depth of a 3D object. +msgid "Depth:" +msgstr "" + #. Found in the tool options of the 3D Shape Edit tool, under the Mesh category if a Text object is selected. Refers to the size of one pixel's width on the text to scale it in 3D. msgid "Pixel size:" msgstr "" @@ -3046,6 +3050,9 @@ msgstr "" msgid "Horizontal alignment:" msgstr "" +msgid "Vertical alignment:" +msgstr "" + msgid "Left" msgstr "" diff --git a/src/Classes/Cel3DObject.gd b/src/Classes/Cel3DObject.gd index b03f07ee0..615dc65c5 100644 --- a/src/Classes/Cel3DObject.gd +++ b/src/Classes/Cel3DObject.gd @@ -96,6 +96,7 @@ func serialize() -> Dictionary: dict["mesh_text"] = mesh.text dict["mesh_pixel_size"] = mesh.pixel_size dict["mesh_font_size"] = mesh.font_size + dict["mesh_depth"] = mesh.depth dict["mesh_offset"] = mesh.offset dict["mesh_curve_step"] = mesh.curve_step dict["mesh_horizontal_alignment"] = mesh.horizontal_alignment @@ -157,6 +158,7 @@ func deserialize(dict: Dictionary) -> void: mesh.text = dict["mesh_text"] mesh.pixel_size = dict["mesh_pixel_size"] mesh.font_size = dict["mesh_font_size"] + mesh.depth = dict["mesh_depth"] mesh.offset = dict["mesh_offset"] mesh.curve_step = dict["mesh_curve_step"] mesh.horizontal_alignment = dict["mesh_horizontal_alignment"] diff --git a/src/Tools/3DTools/3DShapeEdit.gd b/src/Tools/3DTools/3DShapeEdit.gd index b68a99e9c..41f1ead52 100644 --- a/src/Tools/3DTools/3DShapeEdit.gd +++ b/src/Tools/3DTools/3DShapeEdit.gd @@ -58,9 +58,10 @@ var _object_names := { "node3d_type:mesh:top_radius": $"%MeshTopRadius", "node3d_type:mesh:bottom_radius": $"%MeshBottomRadius", "node3d_type:mesh:text": $"%MeshText", - "node3d_type:mesh:offset": $"%MeshOffsetV2", "node3d_type:mesh:pixel_size": $"%MeshPixelSize", "node3d_type:mesh:font_size": $"%MeshFontSize", + "node3d_type:mesh:offset": $"%MeshOffsetV2", + "node3d_type:mesh:depth": $"%MeshDepth", "node3d_type:mesh:curve_step": $"%MeshCurveStep", "node3d_type:mesh:horizontal_alignment": $"%MeshHorizontalAlignment", "node3d_type:mesh:vertical_alignment": $"%MeshVerticalAlignment", diff --git a/src/Tools/3DTools/3DShapeEdit.tscn b/src/Tools/3DTools/3DShapeEdit.tscn index 564f56fe4..7108be2c0 100644 --- a/src/Tools/3DTools/3DShapeEdit.tscn +++ b/src/Tools/3DTools/3DShapeEdit.tscn @@ -561,13 +561,37 @@ stretch_margin_bottom = 3 script = ExtResource("5") snap_step = 2.0 -[node name="MeshOffsetLabel" type="Label" parent="ObjectOptions/MeshOptions/GridContainer" index="26"] +[node name="MeshDepthLabel" type="Label" parent="ObjectOptions/MeshOptions/GridContainer" index="26"] +layout_mode = 2 +size_flags_horizontal = 3 +text = "Depth:" +clip_text = true + +[node name="MeshDepth" type="TextureProgressBar" parent="ObjectOptions/MeshOptions/GridContainer" index="27"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +focus_mode = 2 +mouse_default_cursor_shape = 2 +theme_type_variation = &"ValueSlider" +step = 0.001 +value = 0.05 +allow_greater = true +nine_patch_stretch = true +stretch_margin_left = 3 +stretch_margin_top = 3 +stretch_margin_right = 3 +stretch_margin_bottom = 3 +script = ExtResource("5") +snap_step = 2.0 + +[node name="MeshOffsetLabel" type="Label" parent="ObjectOptions/MeshOptions/GridContainer" index="28"] layout_mode = 2 size_flags_horizontal = 3 text = "Offset:" clip_text = true -[node name="MeshOffsetV2" parent="ObjectOptions/MeshOptions/GridContainer" index="27" instance=ExtResource("3")] +[node name="MeshOffsetV2" parent="ObjectOptions/MeshOptions/GridContainer" index="29" instance=ExtResource("3")] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 @@ -577,13 +601,13 @@ allow_lesser = true show_ratio = true snap_step = 0.01 -[node name="MeshCurveStepLabel" type="Label" parent="ObjectOptions/MeshOptions/GridContainer" index="28"] +[node name="MeshCurveStepLabel" type="Label" parent="ObjectOptions/MeshOptions/GridContainer" index="30"] layout_mode = 2 size_flags_horizontal = 3 text = "Curve step:" clip_text = true -[node name="MeshCurveStep" type="TextureProgressBar" parent="ObjectOptions/MeshOptions/GridContainer" index="29"] +[node name="MeshCurveStep" type="TextureProgressBar" parent="ObjectOptions/MeshOptions/GridContainer" index="31"] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 @@ -602,32 +626,34 @@ stretch_margin_right = 3 stretch_margin_bottom = 3 script = ExtResource("5") -[node name="MeshHorizontalAlignmentLabel" type="Label" parent="ObjectOptions/MeshOptions/GridContainer" index="30"] +[node name="MeshHorizontalAlignmentLabel" type="Label" parent="ObjectOptions/MeshOptions/GridContainer" index="32"] layout_mode = 2 size_flags_horizontal = 3 text = "Horizontal alignment:" clip_text = true -[node name="MeshHorizontalAlignment" type="OptionButton" parent="ObjectOptions/MeshOptions/GridContainer" index="31"] +[node name="MeshHorizontalAlignment" type="OptionButton" parent="ObjectOptions/MeshOptions/GridContainer" index="33"] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 mouse_default_cursor_shape = 2 selected = 0 -item_count = 3 +item_count = 4 popup/item_0/text = "Left" popup/item_1/text = "Center" popup/item_1/id = 1 popup/item_2/text = "Right" popup/item_2/id = 2 +popup/item_3/text = "Fill" +popup/item_3/id = 3 -[node name="MeshVerticalAlignmentLabel" type="Label" parent="ObjectOptions/MeshOptions/GridContainer" index="32"] +[node name="MeshVerticalAlignmentLabel" type="Label" parent="ObjectOptions/MeshOptions/GridContainer" index="34"] layout_mode = 2 size_flags_horizontal = 3 text = "Vertical alignment:" clip_text = true -[node name="MeshVerticalAlignment" type="OptionButton" parent="ObjectOptions/MeshOptions/GridContainer" index="33"] +[node name="MeshVerticalAlignment" type="OptionButton" parent="ObjectOptions/MeshOptions/GridContainer" index="35"] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3