fix: scale entire unit together; increase V to 512px and Panel to 288px
This commit is contained in:
parent
6c955da9de
commit
5575327d98
2 changed files with 34 additions and 45 deletions
|
|
@ -1,9 +1,7 @@
|
|||
extends Control
|
||||
|
||||
|
||||
@onready var logo: Control = %Logo
|
||||
@onready var v_label: Label = %VLabel
|
||||
@onready var panel_label: Label = %PanelLabel
|
||||
@onready var unit: Control = %Unit
|
||||
@onready var transition_overlay: ColorRect = %TransitionOverlay
|
||||
|
||||
|
||||
|
|
@ -11,32 +9,29 @@ func _ready() -> void:
|
|||
if not Engine.is_editor_hint():
|
||||
get_window().mode = Window.MODE_FULLSCREEN
|
||||
|
||||
# Start with text invisible and overlay black
|
||||
logo.modulate = Color(1, 1, 1, 0)
|
||||
# Start with unit invisible and overlay black
|
||||
unit.modulate = Color(1, 1, 1, 0)
|
||||
transition_overlay.color = Color(0, 0, 0, 1)
|
||||
|
||||
# Wait one frame for layout to resolve
|
||||
await get_tree().process_frame
|
||||
|
||||
# Set pivot to center of each label so scale is centered
|
||||
v_label.pivot_offset = v_label.size * 0.5
|
||||
panel_label.pivot_offset = panel_label.size * 0.5
|
||||
# Pivot at center of the whole unit so zoom comes from middle
|
||||
unit.pivot_offset = unit.size * 0.5
|
||||
|
||||
# Set initial tiny scale — done after layout so pivot_offset is valid
|
||||
v_label.scale = Vector2(0.05, 0.05)
|
||||
panel_label.scale = Vector2(0.05, 0.05)
|
||||
# Initial tiny scale — done after layout so pivot_offset is valid
|
||||
unit.scale = Vector2(0.05, 0.05)
|
||||
|
||||
# Fade overlay away (reveal splash on a clean background)
|
||||
var reveal := create_tween()
|
||||
reveal.tween_property(transition_overlay, "color", Color(0, 0, 0, 0), 0.4)
|
||||
await reveal.finished
|
||||
|
||||
# Phase 1: Dramatic zoom in + fade in
|
||||
# Phase 1: Dramatic zoom in + fade in (whole unit scales as one)
|
||||
var zoom_in := create_tween()
|
||||
zoom_in.set_parallel(true)
|
||||
zoom_in.tween_property(logo, "modulate", Color(1, 1, 1, 1), 1.8).set_ease(Tween.EASE_OUT)
|
||||
zoom_in.tween_property(v_label, "scale", Vector2(1.0, 1.0), 2.0).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_BACK)
|
||||
zoom_in.tween_property(panel_label, "scale", Vector2(1.0, 1.0), 2.0).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_BACK)
|
||||
zoom_in.tween_property(unit, "modulate", Color(1, 1, 1, 1), 1.8).set_ease(Tween.EASE_OUT)
|
||||
zoom_in.tween_property(unit, "scale", Vector2(1.0, 1.0), 2.0).set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_BACK)
|
||||
await zoom_in.finished
|
||||
|
||||
# Phase 2: Hold
|
||||
|
|
@ -44,7 +39,7 @@ func _ready() -> void:
|
|||
|
||||
# Phase 3: Fade out
|
||||
var fade_out := create_tween()
|
||||
fade_out.tween_property(logo, "modulate", Color(1, 1, 1, 0), 0.8).set_ease(Tween.EASE_IN)
|
||||
fade_out.tween_property(unit, "modulate", Color(1, 1, 1, 0), 0.8).set_ease(Tween.EASE_IN)
|
||||
await fade_out.finished
|
||||
|
||||
# Phase 4: Crossfade to dashboard
|
||||
|
|
|
|||
|
|
@ -30,50 +30,44 @@ anchor_bottom = 1.0
|
|||
mouse_filter = 2
|
||||
color = Color(0.08, 0.08, 0.12, 1.0)
|
||||
|
||||
[node name="Logo" type="Control" parent="."]
|
||||
[node name="Unit" type="Control" parent="."]
|
||||
unique_name_in_owner = true
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="VLabel" type="Label" parent="Logo"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -300.0
|
||||
offset_top = -260.0
|
||||
offset_right = 300.0
|
||||
offset_bottom = 0.0
|
||||
offset_left = -600.0
|
||||
offset_top = -410.0
|
||||
offset_right = 600.0
|
||||
offset_bottom = 410.0
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="VLabel" type="Label" parent="Unit"]
|
||||
layout_mode = 0
|
||||
offset_left = 0.0
|
||||
offset_top = 0.0
|
||||
offset_right = 1200.0
|
||||
offset_bottom = 520.0
|
||||
theme_override_fonts/normal_font = SubResource("FontVariation_ijphb")
|
||||
theme_override_font_sizes/normal_font_size = 256
|
||||
theme_override_font_sizes/normal_font_size = 512
|
||||
theme_override_colors/font_color = Color(0.933, 0.271, 0.376, 1.0)
|
||||
theme_override_constants/outline_size = 6
|
||||
theme_override_constants/outline_size = 12
|
||||
theme_override_colors/font_outline_color = Color(0.0, 0.0, 0.0, 0.6)
|
||||
text = "V"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="PanelLabel" type="Label" parent="Logo"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -300.0
|
||||
offset_top = 0.0
|
||||
offset_right = 300.0
|
||||
offset_bottom = 220.0
|
||||
[node name="PanelLabel" type="Label" parent="Unit"]
|
||||
layout_mode = 0
|
||||
offset_left = 0.0
|
||||
offset_top = 520.0
|
||||
offset_right = 1200.0
|
||||
offset_bottom = 820.0
|
||||
theme_override_fonts/normal_font = SubResource("FontVariation_boeqg")
|
||||
theme_override_font_sizes/normal_font_size = 144
|
||||
theme_override_font_sizes/normal_font_size = 288
|
||||
theme_override_colors/font_color = Color(0.7, 0.7, 0.8, 1.0)
|
||||
theme_override_constants/outline_size = 4
|
||||
theme_override_constants/outline_size = 8
|
||||
theme_override_colors/font_outline_color = Color(0.0, 0.0, 0.0, 0.5)
|
||||
text = "Panel"
|
||||
horizontal_alignment = 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue