1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00

Add a 3D text depth option

This commit is contained in:
Emmanouil Papadeas 2024-10-12 01:14:37 +03:00
parent 970b24ec40
commit bbf0ae8040
4 changed files with 46 additions and 10 deletions

View file

@ -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 ""

View file

@ -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"]

View file

@ -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",

View file

@ -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