♻️REFACTOR: Mejoras en la viabilidad para desarrollo
This commit is contained in:
1 parent
5aba6c7b47
commit
fd0118d964
98 files changed
+5985
-3024
No files matched your search
@@ -0,0 +1,26 @@
|
||||
[gd_scene load_steps=5 format=3]
|
||||
[ext_resource type="PackedScene" path="res://world/props/scenery_prop.tscn" id="base"]
|
||||
[ext_resource type="Script" path="res://world/signs/world_sign.gd" id="script"]
|
||||
[ext_resource type="Texture2D" path="res://assets/props/sign_board.svg" id="texture"]
|
||||
[ext_resource type="FontFile" path="res://assets/fonts/PixelOperator8.ttf" id="font"]
|
||||
[node name="SignPost" instance=ExtResource("base")]
|
||||
script = ExtResource("script")
|
||||
texture = ExtResource("texture")
|
||||
display_size = Vector2(240, 144)
|
||||
collision_dimensions = Vector2(20, 144)
|
||||
collision_offset = Vector2(0, -72)
|
||||
[node name="Text" type="Label" parent="."]
|
||||
mouse_filter = 2
|
||||
texture_filter = 1
|
||||
offset_left = -110.0
|
||||
offset_top = -136.0
|
||||
offset_right = 110.0
|
||||
offset_bottom = -65.6
|
||||
theme_override_fonts/font = ExtResource("font")
|
||||
theme_override_font_sizes/font_size = 14
|
||||
theme_override_colors/font_color = Color(0.98, 0.89, 0.65, 1)
|
||||
text = "NEXT SHOW\nTHIS WAY >>"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
autowrap_mode = 3
|
||||
clip_text = true
|
||||
@@ -0,0 +1,13 @@
|
||||
[gd_scene load_steps=2 format=3]
|
||||
[ext_resource type="FontFile" path="res://assets/fonts/PixelOperator8.ttf" id="font"]
|
||||
[node name="TextLabel" type="Label"]
|
||||
mouse_filter = 2
|
||||
offset_right = 260.0
|
||||
offset_bottom = 40.0
|
||||
theme_override_fonts/font = ExtResource("font")
|
||||
theme_override_font_sizes/font_size = 16
|
||||
theme_override_colors/font_color = Color(0.96, 0.80, 0.60, 1)
|
||||
theme_override_colors/font_shadow_color = Color(0.09, 0.1, 0.17, 1)
|
||||
theme_override_constants/shadow_offset_x = 2
|
||||
theme_override_constants/shadow_offset_y = 2
|
||||
text = "EDIT TEXT IN INSPECTOR"
|
||||
@@ -0,0 +1,33 @@
|
||||
@tool
|
||||
extends SceneryProp
|
||||
|
||||
## Cartel de texto: comparte la colision y el orden de dibujo de SceneryProp.
|
||||
## El texto se edita en la instancia, sin abrir ni modificar la escena original.
|
||||
## Display Size permite ampliar el panel; no se reduce la letra automaticamente.
|
||||
|
||||
@export_category("Sign")
|
||||
## Admite varias lineas. Amplia Display Size si el mensaje no cabe en el panel.
|
||||
@export_multiline var text: String = "NEXT SHOW\nTHIS WAY >>":
|
||||
set(value):
|
||||
text = value
|
||||
_queue_refresh()
|
||||
@export_range(8, 64, 1) var font_size: int = 14:
|
||||
set(value):
|
||||
font_size = value
|
||||
_queue_refresh()
|
||||
@export var text_color: Color = Color(0.98, 0.89, 0.65):
|
||||
set(value):
|
||||
text_color = value
|
||||
_queue_refresh()
|
||||
|
||||
|
||||
func _refresh() -> void:
|
||||
super._refresh()
|
||||
if not is_inside_tree() or not has_node("Text"):
|
||||
return
|
||||
var label: Label = $Text
|
||||
label.text = text
|
||||
label.add_theme_font_size_override("font_size", font_size)
|
||||
label.add_theme_color_override("font_color", text_color)
|
||||
label.position = Vector2(-display_size.x * 0.5 + 10.0, -display_size.y + 8.0)
|
||||
label.size = Vector2(maxf(display_size.x - 20.0, 1.0), maxf(display_size.y * 0.60 - 16.0, 1.0))
|
||||
Reference in new issue
Block a user