manual, non-processed fade implemented for continue button
This commit is contained in:
parent
8ca9247a8e
commit
a826f6a510
@ -278,6 +278,7 @@ text = "Test"
|
||||
[node name="TouchScreenButton" type="TouchScreenButton" parent="MarginContainer/UIBottom/UIBottomCenter/MenuButtons/DebugMenu/ButtonTest"]
|
||||
|
||||
[node name="ButtonExit" type="Button" parent="MarginContainer/UIBottom/UIBottomCenter/MenuButtons/DebugMenu"]
|
||||
process_mode = 3
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 8
|
||||
@ -310,11 +311,24 @@ layout_mode = 2
|
||||
[node name="SystemClock" type="Label" parent="MarginContainer/UIRight/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
text = "HH:MM:SS"
|
||||
|
||||
[node name="ClockTimer" type="Timer" parent="MarginContainer/UIRight/VBoxContainer/SystemClock"]
|
||||
autostart = true
|
||||
|
||||
[node name="AreaCount" type="HBoxContainer" parent="MarginContainer/UIRight/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="AreaCountLabel" type="Label" parent="MarginContainer/UIRight/VBoxContainer/AreaCount"]
|
||||
layout_mode = 2
|
||||
text = "Areas Completed:"
|
||||
|
||||
[node name="AreaCountVal" type="Label" parent="MarginContainer/UIRight/VBoxContainer/AreaCount"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "0"
|
||||
|
||||
[connection signal="pressed" from="MarginContainer/UITop/ContinueButton" to="." method="_on_continue_button_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/UIBottom/UIBottomCenter/MenuButtons/DebugMenu/ButtonTest" to="." method="_on_button_test_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/UIBottom/UIBottomCenter/MenuButtons/DebugMenu/ButtonExit" to="." method="_on_button_exit_pressed"]
|
||||
|
@ -47,6 +47,6 @@ class Ability:
|
||||
DOTE
|
||||
}
|
||||
|
||||
func debug_print(value : String) -> void:
|
||||
func debug_print(value: String) -> void:
|
||||
if OS.is_debug_build():
|
||||
print(value)
|
||||
|
@ -1,4 +1,4 @@
|
||||
# BUG: elements not adjusting properly when moving to second monitor
|
||||
# BUG: elements not adjusting properly when resizing window
|
||||
extends Control
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@ extends Control
|
||||
# var enemyMoveSpeed := 5.0
|
||||
# var questComplete := false
|
||||
var canContinue := false
|
||||
var totalAreas := 0
|
||||
|
||||
var worldArea: WorldArea
|
||||
var currentAreaQuest: Quest
|
||||
@ -22,10 +23,10 @@ func _ready() -> void:
|
||||
_create_area()
|
||||
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
# func _process(_delta: float) -> void:
|
||||
# deltaCount += 1
|
||||
if canContinue:
|
||||
_continue_button_show()
|
||||
# if canContinue:
|
||||
# _continue_button_show()
|
||||
|
||||
|
||||
func _create_area() -> void:
|
||||
@ -47,7 +48,19 @@ func _on_button_exit_pressed() -> void:
|
||||
|
||||
|
||||
func _continue_button_show() -> void:
|
||||
%UITop/ContinueButton.modulate.a += 0.05
|
||||
# %UITop/ContinueButton.modulate.a += 0.05
|
||||
%UITop/ContinueButton.show()
|
||||
while %UITop/ContinueButton.modulate.a < 1:
|
||||
await get_tree().create_timer(0.01).timeout
|
||||
%UITop/ContinueButton.modulate.a += 0.02
|
||||
|
||||
|
||||
func _continue_button_hide() -> void:
|
||||
while %UITop/ContinueButton.modulate.a > 0:
|
||||
await get_tree().create_timer(0.01).timeout
|
||||
%UITop/ContinueButton.modulate.a -= 0.05
|
||||
%UITop/ContinueButton.hide()
|
||||
|
||||
|
||||
|
||||
func _go_next_area() -> void:
|
||||
@ -57,9 +70,13 @@ func _go_next_area() -> void:
|
||||
%QuestsContainer.remove_child(prevAreaQuest)
|
||||
# Globals.debug_print("gna quest removed")
|
||||
prevAreaQuest.queue_free()
|
||||
totalAreas += 1
|
||||
%AreaCountVal.text = str(totalAreas)
|
||||
# Globals.debug_print("gna quest queued to free")
|
||||
_create_area()
|
||||
# Globals.debug_print("gna new area created")
|
||||
_continue_button_hide()
|
||||
canContinue = false
|
||||
|
||||
|
||||
func _on_quest_generated(quest) -> void:
|
||||
@ -71,7 +88,8 @@ func _on_quest_completed() -> void:
|
||||
if %UITop/AutoCheck.button_pressed:
|
||||
_go_next_area()
|
||||
else:
|
||||
canContinue = true
|
||||
_continue_button_show()
|
||||
# canContinue = true
|
||||
|
||||
|
||||
func _on_continue_button_pressed() -> void:
|
||||
|
Loading…
Reference in New Issue
Block a user