Compare commits
No commits in common. "14453c12b9d0e935d2ae562ae459ae862e54ae27" and "92879b6bbfc39518ccebb01e5e83fb37a3121049" have entirely different histories.
14453c12b9
...
92879b6bbf
|
|
@ -40,10 +40,12 @@ func _delayed_ready() ->void:
|
|||
board_room.card_board = self
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func play():
|
||||
check_board_completion()
|
||||
await closed
|
||||
print("CardBoard.gd: closing")
|
||||
_finalize_board_state()
|
||||
|
||||
|
||||
|
|
@ -388,9 +390,8 @@ func handle_drop(draggable: Draggable) -> int:
|
|||
|
||||
|
||||
# Takes the inputs for control inputs
|
||||
func _input(event : InputEvent) -> void:
|
||||
func _gui_input(event : InputEvent) -> void:
|
||||
if event.is_action_pressed("ui_cancel"):
|
||||
print("CardBoard.gd: ui_cancel")
|
||||
closed.emit()
|
||||
get_viewport().set_input_as_handled()
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ var tween : Tween = null
|
|||
|
||||
|
||||
func animate_home() -> void:
|
||||
z_index = 100
|
||||
z_index = 50
|
||||
if tween: tween.kill()
|
||||
tween = create_tween().set_ease(Tween.EASE_IN_OUT).set_trans(Tween.TRANS_QUART)
|
||||
tween.tween_property(self, "position", home, 0.5)
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ unique_name_in_owner = true
|
|||
self_modulate = Color(1, 1, 1, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
mouse_filter = 2
|
||||
mouse_filter = 1
|
||||
|
||||
[node name="NoteZone" type="Control" parent="HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
[ext_resource type="PackedScene" uid="uid://uc6urpgv7n1y" path="res://logic-scenes/card_burner/cursor_candle.tscn" id="3_l4ogr"]
|
||||
[ext_resource type="Script" uid="uid://bbs1u7ojno7xo" path="res://addons/input_prompts/action_prompt/action_prompt.gd" id="4_x6cxt"]
|
||||
|
||||
[sub_resource type="InputEventKey" id="InputEventKey_j3x3g"]
|
||||
[sub_resource type="InputEventKey" id="InputEventKey_ckmi5"]
|
||||
device = -1
|
||||
physical_keycode = 88
|
||||
unicode = 120
|
||||
|
||||
[sub_resource type="InputEventJoypadButton" id="InputEventJoypadButton_ckmi5"]
|
||||
[sub_resource type="InputEventJoypadButton" id="InputEventJoypadButton_x6cxt"]
|
||||
device = -1
|
||||
button_index = 2
|
||||
pressed = true
|
||||
|
|
@ -156,7 +156,7 @@ stretch_mode = 5
|
|||
script = ExtResource("4_x6cxt")
|
||||
action = "skip"
|
||||
icon = 0
|
||||
events = Array[InputEvent]([null, SubResource("InputEventKey_j3x3g"), SubResource("InputEventJoypadButton_ckmi5")])
|
||||
events = Array[InputEvent]([null, SubResource("InputEventKey_ckmi5"), SubResource("InputEventJoypadButton_x6cxt")])
|
||||
metadata/_custom_type_script = "uid://bbs1u7ojno7xo"
|
||||
|
||||
[node name="SkipButton" type="Button" parent="Control/HSplitContainer"]
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ func _ready() -> void:
|
|||
# Clunky rebuild...
|
||||
story_array = story_array
|
||||
progress = progress
|
||||
|
||||
|
||||
|
||||
|
||||
func _debug_mode():
|
||||
Main.curtain.open()
|
||||
super._debug_mode()
|
||||
|
|
@ -83,7 +83,7 @@ var substring_sizes: Array[int]
|
|||
|
||||
func _rebuild():
|
||||
print("StoryPlayable.gd: %s._rebuild()" % self.name)
|
||||
if is_node_ready(): # FIXME: node is always ready?
|
||||
if is_node_ready():
|
||||
substring_sizes = []
|
||||
var p: int = 0
|
||||
label.text = "[p]"
|
||||
|
|
@ -103,15 +103,22 @@ func _rebuild():
|
|||
func try_scroll():
|
||||
var forward_target: float
|
||||
|
||||
#print( "max lines: " + str(max_lines))
|
||||
#print( "current lines: " + str(label.get_character_line(label.visible_characters)))
|
||||
|
||||
var visible_ratio: float = float(label.get_character_line(label.visible_characters)) / max_lines
|
||||
|
||||
#print("Tried scrolling with ratio of %f. Comparing %f against %f" % [visible_ratio, label.size.y * visible_ratio - scroll_container.scroll_vertical, scroll_container.size.y * 0.9])
|
||||
|
||||
if label.size.y * visible_ratio + scroll_container.scroll_vertical > scroll_container.size.y * 0.9:
|
||||
if scroll_container.scroll_vertical + scroll_container.size.y * 0.9 < label.size.y:
|
||||
forward_target = scroll_container.scroll_vertical + scroll_container.size.y * 0.8
|
||||
else:
|
||||
forward_target = label.size.y - scroll_container.size.y
|
||||
|
||||
scroll_target = forward_target
|
||||
if scroll_target != null:
|
||||
#var tween: Tween = get_tree().create_tween()
|
||||
##tween.set_trans()
|
||||
scroll_target = forward_target
|
||||
|
||||
|
||||
## frame rate independent FIR smoothing filter used for small or dynamic card adjustments
|
||||
|
|
@ -124,13 +131,13 @@ func _process(delta: float) -> void:
|
|||
scroll_current = _smooth(scroll_current, scroll_target, delta)
|
||||
scroll_container.scroll_vertical = ceili(scroll_current)
|
||||
|
||||
|
||||
|
||||
func appear():
|
||||
hide()
|
||||
if animation_player.has_animation("ini"):
|
||||
if animation_player.has_animation("ini"):
|
||||
animation_player.play("ini")
|
||||
await animation_player.animation_finished
|
||||
|
||||
|
||||
scroll_target = 0
|
||||
|
||||
# FIXME: find out why this needs to be set to prevent scenes from being fully revealed
|
||||
|
|
@ -146,7 +153,7 @@ func appear():
|
|||
# Wait and get ready.
|
||||
await get_tree().process_frame
|
||||
await super.appear()
|
||||
|
||||
|
||||
func play():
|
||||
print("StoryPlayable.gd: %s.play()" % self.name)
|
||||
|
||||
|
|
@ -178,13 +185,12 @@ func play():
|
|||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if not visible: return
|
||||
if event.is_action_pressed("ui_text_scroll_down"):
|
||||
accept_event()
|
||||
scroll_target += 40
|
||||
all_text_revealed = animation_complete
|
||||
|
||||
if event.is_action_pressed("ui_text_scroll_up"):
|
||||
if event.is_action_released("ui_text_scroll_up"):
|
||||
accept_event()
|
||||
scroll_target -= 40
|
||||
all_text_revealed = all_text_revealed or animation_complete
|
||||
|
|
@ -225,3 +231,4 @@ func _on_text_finished():
|
|||
|
||||
func _emit_thunder() -> void:
|
||||
if State.room is YouthRoom: (State.room as YouthRoom).play_thunder()
|
||||
|
||||
|
|
|
|||
|
|
@ -106,8 +106,8 @@ ui_text_scroll_down={
|
|||
"deadzone": 0.5,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"command_or_control_autoremap":true,"alt_pressed":false,"shift_pressed":false,"pressed":false,"keycode":4194322,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":1.0,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":16,"position":Vector2(246, 6),"global_position":Vector2(255, 54),"factor":1.0,"button_index":5,"canceled":false,"pressed":true,"double_click":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":12,"pressure":0.0,"pressed":true,"script":null)
|
||||
]
|
||||
|
|
|
|||
|
|
@ -86,5 +86,5 @@ func _on_exit_button_pressed() -> void:
|
|||
State.save_settings()
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("ui_cancel") and focused and is_visible_in_tree():
|
||||
if event.is_action_pressed("ui_cancel") and focused:
|
||||
leave_stage.emit()
|
||||
|
|
|
|||
|
|
@ -47,5 +47,5 @@ func _on_exit_button_pressed() -> void:
|
|||
leave_stage.emit()
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("ui_cancel") and focused and is_visible_in_tree():
|
||||
if event.is_action_pressed("ui_cancel") and focused:
|
||||
leave_stage.emit()
|
||||
|
|
|
|||
|
|
@ -39,5 +39,5 @@ func _on_exit_button_pressed() -> void:
|
|||
State.save_settings()
|
||||
|
||||
func _gui_input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("ui_cancel") and focused and is_visible_in_tree():
|
||||
if event.is_action_pressed("ui_cancel") and focused:
|
||||
leave_stage.emit()
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ func _on_exit_button_pressed() -> void:
|
|||
State.save_settings()
|
||||
|
||||
func _gui_input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("ui_cancel") and focused and is_visible_in_tree():
|
||||
if event.is_action_pressed("ui_cancel") and focused:
|
||||
leave_stage.emit()
|
||||
|
||||
func reset_all_stats():
|
||||
|
|
|
|||
|
|
@ -286,5 +286,5 @@ func select_id_to_window_mode(item_id) -> DisplayServer.WindowMode:
|
|||
return item_id + 2 if item_id != 0 else 0
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("ui_cancel") and focused and is_visible_in_tree():
|
||||
if event.is_action_pressed("ui_cancel") and focused:
|
||||
_on_exit_button_pressed()
|
||||
|
|
|
|||
|
|
@ -1,13 +1,7 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://bsjc1ry0qpe61"]
|
||||
[gd_scene load_steps=2 format=3 uid="uid://bsjc1ry0qpe61"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dugfwcvp7i01k" path="res://ui/menu_main/save_game_list.gd" id="1_w1a7u"]
|
||||
|
||||
[sub_resource type="InputEventAction" id="InputEventAction_4wrxo"]
|
||||
action = &"ui_cancel"
|
||||
|
||||
[sub_resource type="Shortcut" id="Shortcut_lficf"]
|
||||
events = [SubResource("InputEventAction_4wrxo")]
|
||||
|
||||
[node name="SaveGameList" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
|
|
@ -69,5 +63,4 @@ alignment = 2
|
|||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
shortcut = SubResource("Shortcut_lficf")
|
||||
text = "Zurück"
|
||||
|
|
|
|||
|
|
@ -245,7 +245,6 @@ _data = {
|
|||
[node name="SettingsPopup" type="PanelContainer"]
|
||||
visible = false
|
||||
self_modulate = Color(1, 1, 1, 0)
|
||||
scale = Vector2(1, 0.57)
|
||||
script = ExtResource("1_87f5w")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
|
|
|
|||
Loading…
Reference in New Issue