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

Add a 3D text line spacing option

This commit is contained in:
Emmanouil Papadeas 2024-10-12 14:31:15 +03:00
parent bbf0ae8040
commit 9fcb06aa72
4 changed files with 33 additions and 1 deletions

View file

@ -3059,6 +3059,10 @@ msgstr ""
msgid "Right" msgid "Right"
msgstr "" 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. #. 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:" msgid "Energy:"
msgstr "" msgstr ""

View file

@ -101,6 +101,7 @@ func serialize() -> Dictionary:
dict["mesh_curve_step"] = mesh.curve_step dict["mesh_curve_step"] = mesh.curve_step
dict["mesh_horizontal_alignment"] = mesh.horizontal_alignment dict["mesh_horizontal_alignment"] = mesh.horizontal_alignment
dict["mesh_vertical_alignment"] = mesh.vertical_alignment dict["mesh_vertical_alignment"] = mesh.vertical_alignment
dict["mesh_line_spacing"] = mesh.line_spacing
else: else:
dict["light_color"] = node3d_type.light_color dict["light_color"] = node3d_type.light_color
dict["light_energy"] = node3d_type.light_energy dict["light_energy"] = node3d_type.light_energy
@ -163,6 +164,7 @@ func deserialize(dict: Dictionary) -> void:
mesh.curve_step = dict["mesh_curve_step"] mesh.curve_step = dict["mesh_curve_step"]
mesh.horizontal_alignment = dict["mesh_horizontal_alignment"] mesh.horizontal_alignment = dict["mesh_horizontal_alignment"]
mesh.vertical_alignment = dict["mesh_vertical_alignment"] mesh.vertical_alignment = dict["mesh_vertical_alignment"]
mesh.line_spacing = dict["mesh_line_spacing"]
else: else:
node3d_type.light_color = dict["light_color"] node3d_type.light_color = dict["light_color"]
node3d_type.light_energy = dict["light_energy"] node3d_type.light_energy = dict["light_energy"]

View file

@ -65,6 +65,7 @@ var _object_names := {
"node3d_type:mesh:curve_step": $"%MeshCurveStep", "node3d_type:mesh:curve_step": $"%MeshCurveStep",
"node3d_type:mesh:horizontal_alignment": $"%MeshHorizontalAlignment", "node3d_type:mesh:horizontal_alignment": $"%MeshHorizontalAlignment",
"node3d_type:mesh:vertical_alignment": $"%MeshVerticalAlignment", "node3d_type:mesh:vertical_alignment": $"%MeshVerticalAlignment",
"node3d_type:mesh:line_spacing": $"%MeshLineSpacing",
"node3d_type:light_color": $"%LightColor", "node3d_type:light_color": $"%LightColor",
"node3d_type:light_energy": $"%LightEnergy", "node3d_type:light_energy": $"%LightEnergy",
"node3d_type:light_negative": $"%LightNegative", "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 _checker_update_qued = true
_old_cel_image = _cel.get_image() _old_cel_image = _cel.get_image()
Global.canvas.sprite_changed_this_frame = true Global.canvas.sprite_changed_this_frame = true

View file

@ -666,6 +666,31 @@ popup/item_1/id = 1
popup/item_2/text = "Bottom" popup/item_2/text = "Bottom"
popup/item_2/id = 2 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"] [node name="LightOptions" type="VBoxContainer" parent="ObjectOptions" index="3"]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2