Compare commits
No commits in common. "837c99157ed775febc34f64edc5d1edd6ccf0228" and "af7411a87628e60324dc8dba14b5be8dc464f303" have entirely different histories.
837c99157e
...
af7411a876
|
|
@ -20,46 +20,20 @@ var cards : Array[Card] = []
|
|||
|
||||
var board_was_completed: bool = false
|
||||
|
||||
var current_context : Context = Context.NAVIGATE
|
||||
var current_context : int = NAVIGATE
|
||||
var selection_state : SelectionState
|
||||
|
||||
var last_card_selected: Card
|
||||
var last_note_selected: StickyNote
|
||||
var selection: Draggable = null:
|
||||
set(value):
|
||||
if selection == value: return
|
||||
|
||||
if selection:
|
||||
if selection is Card:
|
||||
last_card_selected = selection
|
||||
elif selection is StickyNote:
|
||||
last_note_selected = selection
|
||||
|
||||
# Select & highlight new
|
||||
if selection: selection.highlighted = false
|
||||
selection = value
|
||||
if selection: selection.highlighted = true
|
||||
|
||||
# Are we selecting cards or stickies?
|
||||
if selection is Card:
|
||||
selection_state = SelectionState.CARDS
|
||||
if current_context == Context.ASSIGN:
|
||||
selection.preview_sticky_note(last_note_selected)
|
||||
|
||||
if selection is StickyNote:
|
||||
selection_state = SelectionState.STICKIES
|
||||
|
||||
#@onready var instructions := $instructions_panel/HBoxContainer/cards_remaining
|
||||
|
||||
@onready var dropzone : Control = %CardZone
|
||||
@onready var sideboard : SideBoard = %SideBoard
|
||||
@onready var notezone : Control = %NoteZone
|
||||
|
||||
enum SelectionState {FREE,STICKIES,CARDS}
|
||||
enum Context {NAVIGATE, ASSIGN, DRAG}
|
||||
enum {NAVIGATE, ASSIGN, DRAG}
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
prints("card-board.gd:", "_ready()", self, "room:", State.active_room, owner)
|
||||
prints("card-board.gd:", "_ready()", self, "room:", State.room, owner)
|
||||
super._ready()
|
||||
|
||||
_delayed_ready.call_deferred()
|
||||
|
|
@ -68,10 +42,9 @@ func _ready() -> void:
|
|||
# We need to wait for our room further up our parent hierarchy to actually make itself known
|
||||
# for interactables to do things with it, e.g. CardBoard needs to register itself
|
||||
func _delayed_ready() ->void:
|
||||
var board_room := State.active_room as RoomWithBoard
|
||||
if not get_tree().root == get_parent():
|
||||
assert(board_room, "CardBoard spawned in room that's not a RoomWithboard.")
|
||||
board_room.card_board = self
|
||||
var board_room := State.room as RoomWithBoard
|
||||
assert(board_room, "CardBoard spawned in room that's not a RoomWithboard.")
|
||||
board_room.card_board = self
|
||||
is_memory_board = is_memory_board
|
||||
|
||||
|
||||
|
|
@ -102,6 +75,23 @@ var mementos_collected: int = 0:
|
|||
mementos_collected = mementos
|
||||
|
||||
|
||||
var selection: Draggable = null:
|
||||
set(value):
|
||||
if selection == value: return
|
||||
|
||||
# Select & highlight new
|
||||
if selection: selection.highlighted = false
|
||||
selection = value
|
||||
if selection: selection.highlighted = true
|
||||
|
||||
# Are we selecting cards or stickies?
|
||||
if selection is Card:
|
||||
selection_state = SelectionState.CARDS
|
||||
|
||||
if selection is StickyNote:
|
||||
selection_state = SelectionState.STICKIES
|
||||
|
||||
|
||||
func _navigate_next():
|
||||
var candidates := _selection_candidates
|
||||
var index := maxi(0, candidates.find(selection))
|
||||
|
|
@ -121,6 +111,34 @@ func _smooth(current: Vector2, goal: Vector2, delta: float) -> Vector2:
|
|||
return (k) * current + (1.0-k) * goal
|
||||
|
||||
|
||||
func _process(delta: float):
|
||||
var zone_position := Vector2(notezone.get_screen_position().x + sticky_width / 3.0, sticky_height)
|
||||
|
||||
var dragging := notes.any(func (n : Draggable): return n.is_dragged)
|
||||
|
||||
if dragging:
|
||||
# Y-sort the nodes, this lets us fill the gap more nicely.
|
||||
notes.sort_custom(func (a:Draggable, b:Draggable): return a.global_position.y < b.global_position.y)
|
||||
|
||||
for note in notes:
|
||||
# Skip all dragged and already attached notes
|
||||
if note.is_attached: continue
|
||||
if note.is_dragged: continue
|
||||
|
||||
# Magnetically move all notes to where they ought to be on screen
|
||||
note.home = zone_position
|
||||
zone_position.y += sticky_height
|
||||
|
||||
# Only if not already in transit / animated or user holding on to one
|
||||
if not dragging and not note.tween:
|
||||
note.animate_home()
|
||||
else:
|
||||
# do adjustment with FIR filter
|
||||
note.position = _smooth(note.position, note.home, delta)
|
||||
note.z_index = 0
|
||||
|
||||
|
||||
|
||||
func _check_completion() -> void:
|
||||
if is_board_complete():
|
||||
board_was_completed = true
|
||||
|
|
@ -130,7 +148,7 @@ func _check_completion() -> void:
|
|||
## Finalizes board state before closing (ends drags, cleans up transitions)
|
||||
func _finalize_board_state() -> void:
|
||||
# End any active drag operations
|
||||
if current_context == Context.DRAG:
|
||||
if current_context == DRAG:
|
||||
_end_drag(selection)
|
||||
for item in notes:
|
||||
item.is_dragged = false
|
||||
|
|
@ -139,7 +157,7 @@ func _finalize_board_state() -> void:
|
|||
item.is_dragged = false
|
||||
|
||||
# Reset context to NAVIGATE
|
||||
current_context = Context.NAVIGATE
|
||||
current_context = NAVIGATE
|
||||
print("CardBoard: Board state finalized")
|
||||
|
||||
|
||||
|
|
@ -163,8 +181,8 @@ func populate_board(names: Array[StringName]):
|
|||
for new_card: Card in all_new["cards"]:
|
||||
add_card(new_card)
|
||||
|
||||
|
||||
notes += sideboard.populate(all_new["sticky_notes"])
|
||||
for new_sticky_note: StickyNote in all_new["sticky_notes"]:
|
||||
add_note(new_sticky_note)
|
||||
|
||||
|
||||
# FIXME: This can be made even simpler.
|
||||
|
|
@ -225,14 +243,14 @@ func add_note(note: StickyNote) -> void:
|
|||
note.is_draggable = true
|
||||
|
||||
func appear():
|
||||
#await Main.curtain.close()
|
||||
await Main.curtain.close()
|
||||
show()
|
||||
#await Main.curtain.open()
|
||||
await Main.curtain.open()
|
||||
|
||||
func vanish():
|
||||
#await Main.curtain.close()
|
||||
await Main.curtain.close()
|
||||
hide()
|
||||
#await Main.curtain.open()
|
||||
await Main.curtain.open()
|
||||
|
||||
|
||||
# Called by notes when a mouse event needs handling
|
||||
|
|
@ -247,15 +265,13 @@ func handle_mouse_button(input: InputEventMouseButton, target: Draggable) -> voi
|
|||
_end_drag(target)
|
||||
return
|
||||
|
||||
var parent_before_drag: Node
|
||||
|
||||
## Starts a drag operation for the given draggable
|
||||
func _start_drag(draggable: Draggable) -> void:
|
||||
parent_before_drag = draggable.get_parent()
|
||||
selection = draggable
|
||||
current_context = Context.DRAG
|
||||
current_context = DRAG
|
||||
var mouse_offset := get_viewport().get_mouse_position() - draggable.global_position
|
||||
draggable.start_drag(mouse_offset)
|
||||
draggable.reparent(self)
|
||||
|
||||
|
||||
## Ends a drag operation and handles the drop
|
||||
|
|
@ -263,30 +279,26 @@ func _end_drag(draggable: Draggable) -> void:
|
|||
selection = draggable
|
||||
|
||||
# Cleanup and state update
|
||||
current_context = Context.NAVIGATE
|
||||
current_context = NAVIGATE
|
||||
|
||||
var destination := draggable.end_drag()
|
||||
|
||||
if destination:
|
||||
if destination is Card:
|
||||
# If dropped on a card, attach it
|
||||
if draggable is StickyNote:
|
||||
destination.attach_or_exchange_note(draggable)
|
||||
|
||||
elif destination is SideBoundary:
|
||||
if not sideboard.accept_drop(draggable):
|
||||
#FIXME remove if handle_drop and can_accept_drop is properly implemented.
|
||||
destination = null
|
||||
|
||||
# If dropped on board (no destination), ensure it's a child of the board
|
||||
if not destination:
|
||||
if draggable is StickyNote:
|
||||
reclaim_sticky(draggable)
|
||||
|
||||
# Check win condition after any sticky movement
|
||||
check_board_completion()
|
||||
# Handle sticky note drops
|
||||
if draggable is StickyNote:
|
||||
var sticky := draggable as StickyNote
|
||||
|
||||
parent_before_drag = null
|
||||
# If dropped on a card, attach it
|
||||
if destination and destination is Card:
|
||||
var target_card := destination as Card
|
||||
target_card.attach_or_exchange_note(sticky)
|
||||
|
||||
# If dropped on board (no destination), ensure it's a child of the board
|
||||
elif not destination:
|
||||
if sticky.is_attached:
|
||||
reclaim_sticky(sticky)
|
||||
|
||||
# Check win condition after any sticky movement
|
||||
check_board_completion()
|
||||
|
||||
|
||||
func reclaim_sticky(note: StickyNote):
|
||||
|
|
@ -372,6 +384,8 @@ func _nearest_hovered(candidates: Array[Draggable]) -> Draggable:
|
|||
return null
|
||||
|
||||
|
||||
|
||||
|
||||
func _by_spatial(a: Draggable, b: Draggable) -> bool:
|
||||
return a.position.x + a.position.y * 10000 > b.position.x + b.position.y * 10000
|
||||
|
||||
|
|
@ -394,7 +408,6 @@ func _sort_by_positions() -> void:
|
|||
func can_accept_drop(draggable: Draggable) -> bool:
|
||||
return draggable is Card or draggable is StickyNote
|
||||
|
||||
# FIXME: this function seems to not be used.
|
||||
## Handles dropping a draggable onto the board (into the dropzone)
|
||||
func handle_drop(draggable: Draggable) -> int:
|
||||
if not can_accept_drop(draggable):
|
||||
|
|
@ -410,49 +423,12 @@ func _perform(action : StringName) -> void:
|
|||
|
||||
# Takes the inputs for control inputs
|
||||
func _input(event : InputEvent) -> void:
|
||||
# trying to not do the double check on the line below.
|
||||
var is_mouse_left:= false
|
||||
if event is InputEventMouseButton:
|
||||
is_mouse_left = event.button_index == MOUSE_BUTTON_LEFT
|
||||
|
||||
if selection and not selection.is_dragged and event is InputEventMouseMotion and not is_mouse_left:
|
||||
if selection and not selection.is_dragged and event is InputEventMouseMotion and not event.is_action_pressed("mouse_left"):
|
||||
var candidate := _nearest_hovered(_sort_by_proximity_and_depth(notes))
|
||||
if not candidate:
|
||||
candidate = _nearest_hovered(_sort_by_proximity_and_depth(cards))
|
||||
selection = candidate
|
||||
if event.is_action_pressed("ui_left"):
|
||||
_handle_direction_input(Vector2.LEFT)
|
||||
if event.is_action_pressed("ui_right"):
|
||||
_handle_direction_input(Vector2.RIGHT)
|
||||
if event.is_action_pressed("ui_up"):
|
||||
_handle_direction_input(Vector2.UP)
|
||||
if event.is_action_pressed("ui_down"):
|
||||
_handle_direction_input(Vector2.DOWN)
|
||||
|
||||
#TODO: make this work with the prompter once more.
|
||||
if event.is_action_pressed("ui_cancel"):
|
||||
get_viewport().set_input_as_handled()
|
||||
closed.emit()
|
||||
|
||||
func _handle_direction_input(direction: Vector2):
|
||||
|
||||
if current_context == Context.NAVIGATE and _assure_selection():
|
||||
try_select_nearest_card(selection.global_position, direction, (current_context != Context.ASSIGN))
|
||||
|
||||
func _assure_selection() -> bool:
|
||||
if selection:
|
||||
return true
|
||||
else:
|
||||
if selection_state == SelectionState.STICKIES or selection_state == SelectionState.FREE:
|
||||
if dropzone.get_child_count() > 0:
|
||||
selection = dropzone.get_child(0)
|
||||
return true
|
||||
## Attempting to still select a Card if no sticky could be found.
|
||||
if sideboard.get_child_count() > 0:
|
||||
selection = sideboard.get_child(0)
|
||||
return true
|
||||
|
||||
return false
|
||||
|
||||
## Saves board state directly to SaveGame resource
|
||||
func save_to_resource(savegame: SaveGame) -> void:
|
||||
|
|
@ -596,65 +572,3 @@ func _debug_mode() -> void:
|
|||
populate_board(["c_out_of_world", 'c_confusion', "p_outer_conflict", "p_unique"])
|
||||
await get_tree().process_frame
|
||||
play()
|
||||
|
||||
|
||||
|
||||
func try_select_nearest_card(from: Vector2, towards: Vector2, include_stickies: bool = false) -> bool:
|
||||
var selection_transform = Transform2D(0, from).looking_at(from+towards)
|
||||
|
||||
var scores: Dictionary[int, Area2D] = {-1: null}
|
||||
for child:Area2D in dropzone.get_children():
|
||||
if not (child is StickyNote and include_stickies):
|
||||
scores[get_distance_score(child.global_position, selection_transform)] = child
|
||||
scores.erase(-1)
|
||||
scores.sort()
|
||||
|
||||
if include_stickies:
|
||||
var panel_scores: Dictionary[int, Control] = {-1: null}
|
||||
for child:Control in sideboard.get_children():
|
||||
if not child.is_empty():
|
||||
panel_scores[get_distance_score(child.attached_sticky_note.global_position, selection_transform)] = child
|
||||
panel_scores.erase(-1)
|
||||
panel_scores.sort()
|
||||
|
||||
if panel_scores != {}:
|
||||
if scores != {}:
|
||||
if panel_scores.keys()[0] < scores.keys()[0]:
|
||||
if current_context == Context.ASSIGN: return false
|
||||
selection = panel_scores.values()[0]
|
||||
selection_state = SelectionState.STICKIES
|
||||
return true
|
||||
else:
|
||||
if current_context == Context.ASSIGN: return false
|
||||
selection = panel_scores.values()[0]
|
||||
selection_state = SelectionState.STICKIES
|
||||
return true
|
||||
|
||||
|
||||
if scores != {}:
|
||||
selection = scores.values()[0]
|
||||
return true
|
||||
return false
|
||||
|
||||
func try_select_nearest_empty_card(from: Vector2) -> bool:
|
||||
var scores: Dictionary[int, Area2D] = {}
|
||||
|
||||
for card in dropzone.get_children():
|
||||
if card is Card:
|
||||
if not card.has_note_attached():
|
||||
scores[int((from-card.global_position).length())] = card
|
||||
|
||||
scores.sort()
|
||||
|
||||
if scores != {}:
|
||||
selection = scores.values()[0]
|
||||
return true
|
||||
return false
|
||||
|
||||
func get_distance_score(from: Vector2, to: Transform2D) -> int:
|
||||
var diff = from * to
|
||||
var dir = diff.normalized()
|
||||
if dir.x > 0.5 and diff.length() > 0:
|
||||
return int((abs(dir.y) + 0.5) * diff.length())
|
||||
else:
|
||||
return -1
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ var transfor_arr: Array[Transform2D] = [
|
|||
@export_range(1, 2) var scale_bump: float = 1.05
|
||||
@export_range(1.0, 10.0) var bounce_speed: float = 5
|
||||
|
||||
@export_color_no_alpha var highlight_color: Color = Color(1.2, 1.2, 1.2)
|
||||
@export_color_no_alpha var highlight_color: Color = Color(1.4, 1.4, 1.4)
|
||||
|
||||
## Override set_highlight to add visual feedback for cards
|
||||
func set_highlight(value: bool) -> void:
|
||||
|
|
@ -231,10 +231,6 @@ func get_attached_note() -> StickyNote:
|
|||
return null
|
||||
|
||||
|
||||
func get_size() -> Vector2:
|
||||
return $CollisionShape2D.shape.size
|
||||
|
||||
|
||||
func preview_sticky_note(sticky_note: StickyNote):
|
||||
if not is_instance_valid(sticky_note):
|
||||
return
|
||||
|
|
@ -256,7 +252,7 @@ func attach_or_exchange_note(note: StickyNote, instant: bool = false) -> void:
|
|||
old.reparent(note.attached_to)
|
||||
old.animate_home()
|
||||
else:
|
||||
return_old_child(note) # just kick out our old note
|
||||
remove_note_if_present() # just kick out our old note
|
||||
|
||||
# ... in with the new
|
||||
note.reparent(self)
|
||||
|
|
@ -272,18 +268,12 @@ func attach_or_exchange_note(note: StickyNote, instant: bool = false) -> void:
|
|||
Steam.storeStats()
|
||||
|
||||
|
||||
func return_old_child(new_note: StickyNote = null) -> void:
|
||||
func remove_note_if_present() -> void:
|
||||
var former_child: StickyNote = get_attached_note()
|
||||
if not former_child: return
|
||||
|
||||
|
||||
former_child.reparent(get_parent())
|
||||
former_child.tween = null # the positioning logic in card-board will pick that one up and calc a nice slot.
|
||||
|
||||
if new_note:
|
||||
former_child.reparent(new_note.last_parent)
|
||||
former_child.animate_home(new_note.home)
|
||||
else:
|
||||
former_child.reparent(get_parent())
|
||||
|
||||
|
||||
|
||||
# === DROP TARGET PATTERN IMPLEMENTATION ===
|
||||
|
|
@ -292,7 +282,6 @@ func return_old_child(new_note: StickyNote = null) -> void:
|
|||
func can_accept_drop(draggable: Draggable) -> bool:
|
||||
return draggable is StickyNote
|
||||
|
||||
# FIXME: this function seems to not be used.
|
||||
## Handles dropping a sticky note onto this card
|
||||
## Returns DropResult indicating success, rejection, or exchange
|
||||
func handle_drop(draggable: StickyNote) -> int:
|
||||
|
|
@ -303,23 +292,6 @@ func handle_drop(draggable: StickyNote) -> int:
|
|||
draggable.z_index = 0
|
||||
return Draggable.DropResult.ACCEPTED
|
||||
|
||||
|
||||
## End drag operation and return the node we were dropped on
|
||||
func end_drag() -> Node:
|
||||
super.end_drag()
|
||||
return _find_drop_target()
|
||||
|
||||
|
||||
## Find best drop target: Card > Panel > Board (in priority order)
|
||||
func _find_drop_target() -> Node:
|
||||
print(get_overlapping_areas())
|
||||
# Priority 1: Check for overlapping cards in dropzone
|
||||
for area in get_overlapping_areas():
|
||||
if area is SideBoundary:
|
||||
return area
|
||||
|
||||
return null
|
||||
|
||||
# === DRAG LIFECYCLE OVERRIDES ===
|
||||
|
||||
## Cards always drop back to board dropzone
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ size = Vector2(277, 231)
|
|||
|
||||
[node name="Card" type="Area2D" unique_id=5263467]
|
||||
collision_layer = 4
|
||||
collision_mask = 8
|
||||
collision_mask = 0
|
||||
priority = 50
|
||||
script = ExtResource("1_emip0")
|
||||
text = "card"
|
||||
|
|
@ -34,7 +34,6 @@ offset_right = 136.0
|
|||
offset_bottom = 77.95834
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_default_cursor_shape = 13
|
||||
theme = ExtResource("3_mdi7r")
|
||||
theme_type_variation = &"card_text"
|
||||
text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ func set_highlight(value: bool) -> void:
|
|||
var _drag_start_position: Vector2
|
||||
var _mouse_drag_offset: Vector2
|
||||
var _drag_source: Node = null # Where the drag started from
|
||||
var last_parent: Node = null # Where they were last dragged from. Used by return_old_child() in Card
|
||||
|
||||
## === SETUP ###
|
||||
func _ready() -> void:
|
||||
|
|
@ -70,15 +69,11 @@ func _get_button_handler() -> Node:
|
|||
var tween : Tween = null
|
||||
|
||||
|
||||
func animate_home(target: Vector2 = home) -> void:
|
||||
func animate_home() -> void:
|
||||
z_index = 100
|
||||
if tween: tween.kill()
|
||||
tween = create_tween().set_ease(Tween.EASE_IN_OUT).set_trans(Tween.TRANS_QUART)
|
||||
tween.tween_property(self, "position", target, 0.5)
|
||||
|
||||
func get_size() -> Vector2:
|
||||
assert(false, "This function needs to be overridden!")
|
||||
return Vector2.ZERO
|
||||
tween.tween_property(self, "position", home, 0.5)
|
||||
|
||||
func _on_mouse_entered() -> void:
|
||||
#prints("Draggable[base]._on_mouse_entered", self, self.name)
|
||||
|
|
@ -115,7 +110,6 @@ func start_drag(mouse_offset: Vector2) -> void:
|
|||
_drag_start_position = global_position
|
||||
_mouse_drag_offset = mouse_offset
|
||||
_drag_source = get_parent()
|
||||
last_parent = _drag_source
|
||||
z_index = 60
|
||||
is_dragged = true
|
||||
|
||||
|
|
@ -138,11 +132,6 @@ func end_drag() -> Node:
|
|||
_drag_source = null
|
||||
return null
|
||||
|
||||
func _set_home() -> void:
|
||||
var parent = get_parent()
|
||||
if parent is Control:
|
||||
confine_to_screen()
|
||||
home = position
|
||||
|
||||
## Confines this draggable element to stay within screen or container bounds
|
||||
## Skip this check if a sticky note is attached to a card
|
||||
|
|
|
|||
|
|
@ -4,12 +4,10 @@
|
|||
[ext_resource type="Shader" uid="uid://kyd37e0s6fdu" path="res://logic-scenes/board/physics-board.gdshader" id="1_ggnth"]
|
||||
[ext_resource type="Script" uid="uid://cqsor57nvowni" path="res://logic-scenes/board/card-board.gd" id="3_8v4c4"]
|
||||
[ext_resource type="AudioStream" uid="uid://bywmf3patoe56" path="res://base-environments/youth_room/audio/board_completed.wav" id="5_qjqy3"]
|
||||
[ext_resource type="Script" uid="uid://cwc0k3mtj4k1f" path="res://logic-scenes/board/side_board.gd" id="6_kvxnu"]
|
||||
[ext_resource type="AudioStream" uid="uid://bgtohhyd8whbm" path="res://base-environments/youth_room/audio/board_completed_de.wav" id="6_ni75f"]
|
||||
[ext_resource type="AudioStream" uid="uid://dj8fpajqhj4k7" path="res://base-environments/youth_room/audio/board_incomplete.wav" id="6_vtvtf"]
|
||||
[ext_resource type="AudioStream" uid="uid://brolrc3lhaeid" path="res://base-environments/youth_room/audio/board_unfitting.wav" id="7_0phgc"]
|
||||
[ext_resource type="AudioStream" uid="uid://swlo6elqs4vx" path="res://base-environments/youth_room/audio/board_incomplete_de.wav" id="7_2qppy"]
|
||||
[ext_resource type="Script" uid="uid://c7gbr6rdk843f" path="res://logic-scenes/board/side_boundary.gd" id="7_k5h0q"]
|
||||
[ext_resource type="Script" uid="uid://c1oub0cs7cph6" path="res://dev-util/stereo-switch.gd" id="8_ni75f"]
|
||||
[ext_resource type="AudioStream" uid="uid://y8fg3wjscvci" path="res://base-environments/youth_room/audio/board_unfitting_de.wav" id="10_kvxnu"]
|
||||
[ext_resource type="Texture2D" uid="uid://diviesbhf6p77" path="res://logic-scenes/board/board-texture/cardbord-box.png" id="11_ni75f"]
|
||||
|
|
@ -22,9 +20,6 @@ shader_parameter/magic_scale_factor = 1500.0
|
|||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_m1g7s"]
|
||||
|
||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_htay1"]
|
||||
normal = Vector2(-1, 0)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_qjqy3"]
|
||||
length = 0.001
|
||||
|
||||
|
|
@ -169,6 +164,7 @@ script = ExtResource("3_8v4c4")
|
|||
|
||||
[node name="CardboardBox" type="TextureRect" parent="." unique_id=450836053]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
clip_contents = true
|
||||
layout_direction = 3
|
||||
layout_mode = 2
|
||||
|
|
@ -177,10 +173,8 @@ expand_mode = 2
|
|||
|
||||
[node name="Label" type="Label" parent="CardboardBox" unique_id=1585163137]
|
||||
layout_mode = 0
|
||||
offset_left = 14.0
|
||||
offset_top = 13.0
|
||||
offset_right = 288.0
|
||||
offset_bottom = 112.416664
|
||||
offset_right = 274.0
|
||||
offset_bottom = 99.416664
|
||||
size_flags_horizontal = 8
|
||||
size_flags_vertical = 0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
|
|
@ -198,28 +192,11 @@ layout_mode = 2
|
|||
size_flags_horizontal = 3
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="SideBoard" type="ScrollContainer" parent="HBoxContainer" unique_id=738913213]
|
||||
[node name="NoteZone" type="Control" parent="HBoxContainer" unique_id=92501430]
|
||||
unique_name_in_owner = true
|
||||
clip_contents = false
|
||||
custom_minimum_size = Vector2(400, 0)
|
||||
layout_mode = 2
|
||||
horizontal_scroll_mode = 0
|
||||
vertical_scroll_mode = 3
|
||||
script = ExtResource("6_kvxnu")
|
||||
|
||||
[node name="Panel" type="Control" parent="HBoxContainer/SideBoard" unique_id=1893108919]
|
||||
custom_minimum_size = Vector2(400, 1500)
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="SideBoundary" type="Area2D" parent="HBoxContainer/SideBoard" unique_id=1180680912]
|
||||
position = Vector2(155, 0)
|
||||
collision_layer = 8
|
||||
collision_mask = 0
|
||||
script = ExtResource("7_k5h0q")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="HBoxContainer/SideBoard/SideBoundary" unique_id=1692634692]
|
||||
shape = SubResource("WorldBoundaryShape2D_htay1")
|
||||
mouse_filter = 1
|
||||
|
||||
[node name="Timer" type="Timer" parent="." unique_id=1859393351]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,136 +0,0 @@
|
|||
class_name SideBoard extends ScrollContainer
|
||||
|
||||
@export var h_margin: = 8
|
||||
|
||||
# Panel is a bit easier to understand as a name, while Control is easier to use.
|
||||
var panel: Control
|
||||
var board: CardBoard
|
||||
|
||||
func _ready() -> void:
|
||||
panel = $Panel
|
||||
panel.custom_minimum_size = Vector2(size.x, 0)
|
||||
board = owner
|
||||
|
||||
func _start_drag(draggable: Draggable) -> void:
|
||||
assert(false)
|
||||
|
||||
func get_nearest_legal_position(from: Vector2, target: Draggable) -> Vector2:
|
||||
var children := get_children_sorted()
|
||||
|
||||
var nearest_child_below: Draggable
|
||||
var nearest_child_above: Draggable
|
||||
var min_distance_above: float
|
||||
var min_distance_below: float
|
||||
|
||||
|
||||
for i in range(children.size()):
|
||||
if children[i].home.y < from.y:
|
||||
nearest_child_above = children[i]
|
||||
min_distance_above = children[i].get_size().y/2 + h_margin + target.get_size().y/2
|
||||
if i > 0:
|
||||
nearest_child_below = children[i-1]
|
||||
min_distance_below = children[i-1].get_size().y/2 + h_margin + target.get_size().y/2
|
||||
|
||||
if nearest_child_above:
|
||||
from.y = minf(from.y, nearest_child_above.home.y - min_distance_above)
|
||||
if nearest_child_below:
|
||||
from.y = maxf(from.y, nearest_child_below.home.y - min_distance_below)
|
||||
|
||||
from.x = _get_x_pos(target)
|
||||
|
||||
return from
|
||||
|
||||
func can_accept_drop(draggable: Draggable) -> bool:
|
||||
return (draggable is Card and board.is_memory_board) or draggable is StickyNote
|
||||
|
||||
# FIXME: this function seems to not be used.
|
||||
func handle_drop(draggable: Draggable) -> int:
|
||||
if not can_accept_drop(draggable):
|
||||
return Draggable.DropResult.REJECTED
|
||||
return Draggable.DropResult.ACCEPTED
|
||||
|
||||
# FIXME: integrate this into functions mentioned above!
|
||||
func accept_drop(draggable: Draggable) -> bool:
|
||||
if can_accept_drop(draggable):
|
||||
draggable.home = get_nearest_legal_position(draggable.global_position, draggable)
|
||||
draggable.reparent(panel)
|
||||
_scoot_children()
|
||||
return true
|
||||
return false
|
||||
|
||||
func populate(with_notes: Array) -> Array[StickyNote]:
|
||||
var notes: Array[StickyNote] = []
|
||||
|
||||
for note: StickyNote in with_notes:
|
||||
notes.append(note)
|
||||
panel.add_child(note)
|
||||
|
||||
_scoot_children(true)
|
||||
|
||||
return notes
|
||||
|
||||
|
||||
func _scoot_children(force_packing: bool = false):
|
||||
#FIXME: the non-force-packing algorythm is borked right now
|
||||
force_packing = true
|
||||
var children := get_children_sorted()
|
||||
|
||||
if children.size() < 2: return
|
||||
|
||||
var min_size := h_margin
|
||||
|
||||
for child in children:
|
||||
min_size += child.get_size().y + h_margin
|
||||
|
||||
# If space is too tight, children will be spaced optimally.
|
||||
if maxf(min_size, children[-1].home.y + children[-1].get_size().y) > (size.y - h_margin) or force_packing:
|
||||
var top :float = h_margin
|
||||
|
||||
for child in children:
|
||||
child.home = Vector2(_get_x_pos(child), top + child.get_size().y/2)
|
||||
top += h_margin + child.get_size().y
|
||||
child.animate_home()
|
||||
|
||||
else:
|
||||
children[1].home.y = maxf(children[0].get_size().y + h_margin, children[1].home.y)
|
||||
var last_distance := 0.0
|
||||
for i in range(1, children.size()-1):
|
||||
var min_distance_bottom: float = children[i+1].get_size().y/2 + h_margin + children[i].get_size().y/2
|
||||
|
||||
var bottom_distance: float = children[i+1].home.y - children[i].home.y
|
||||
|
||||
if bottom_distance < min_distance_bottom:
|
||||
children[i-1].home.y = children[i-1].home.y - min(last_distance, bottom_distance)
|
||||
|
||||
children[i].home.y = children[i-1].home.y + min_distance_bottom
|
||||
|
||||
last_distance = maxf(children[i].home.y - children[i-1].home.y - min_distance_bottom, 0)
|
||||
|
||||
for child in children:
|
||||
child.home.x = _get_x_pos(child)
|
||||
child.animate_home()
|
||||
|
||||
if children[-1]:
|
||||
panel.custom_minimum_size.y = children[-1].home.y + children[-1].get_size().y
|
||||
|
||||
func get_children_sorted() -> Array[Draggable]:
|
||||
var children: Array[Draggable] = []
|
||||
for child in panel.get_children(true):
|
||||
if child is Draggable:
|
||||
children.append(child)
|
||||
|
||||
children.sort_custom(_by_position)
|
||||
|
||||
return children
|
||||
|
||||
func _get_x_pos(target: Draggable) -> float:
|
||||
if target is StickyNote:
|
||||
return size.x - 256
|
||||
if target is Card:
|
||||
return size.x - 160
|
||||
|
||||
return 42
|
||||
|
||||
|
||||
func _by_position(a: Draggable, b: Draggable) -> bool:
|
||||
return a.position.y < b.position.y
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://cwc0k3mtj4k1f
|
||||
|
|
@ -1 +0,0 @@
|
|||
class_name SideBoundary extends Area2D
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://c7gbr6rdk843f
|
||||
|
|
@ -71,7 +71,8 @@ func init(sticky_name: String = "sticky_note", card_id: StringName = "-1") -> vo
|
|||
parent_id = StringName(card_id.rsplit(".", false, 1)[0])
|
||||
sticky_id = card_id
|
||||
|
||||
from_youth = int((card_id as String)[0]) < (Scenes.id.TRANSITION as int)
|
||||
# first digit of the card id is 0-3 for youth cards.
|
||||
from_youth = (card_id as String)[0] as int < 4
|
||||
|
||||
func _ready() -> void:
|
||||
super._ready()
|
||||
|
|
@ -111,19 +112,14 @@ func end_drag() -> Node:
|
|||
|
||||
## Find best drop target: Card > Panel > Board (in priority order)
|
||||
func _find_drop_target() -> Node:
|
||||
|
||||
# Priority 1: Check for overlapping cards in dropzone
|
||||
var closest : Node = null
|
||||
var closest : Card = null
|
||||
for area in get_overlapping_areas():
|
||||
if area is StickyNote and not area.is_attached: continue # Can only drop on attached stickies
|
||||
|
||||
if area is Card:
|
||||
if (not closest) or ((area.position - position).length() < (closest.position - position).length()):
|
||||
closest = area
|
||||
|
||||
if area is SideBoundary:
|
||||
if not closest:
|
||||
closest = area
|
||||
|
||||
return closest
|
||||
|
||||
|
|
@ -131,7 +127,3 @@ func _find_drop_target() -> Node:
|
|||
## Sticky notes are exempt from confinement if stuck to a card
|
||||
func confine_to_screen() -> void:
|
||||
if attached_to is not Card: super.confine_to_screen()
|
||||
|
||||
|
||||
func get_size() -> Vector2:
|
||||
return Vector2($CollisionShape2D.shape.height, $CollisionShape2D.shape.radius*2)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ height = 312.0
|
|||
|
||||
[node name="sticky-note" type="Area2D" unique_id=1136333559]
|
||||
collision_layer = 2
|
||||
collision_mask = 14
|
||||
collision_mask = 6
|
||||
priority = 100
|
||||
script = ExtResource("1_yvh5n")
|
||||
text = "card"
|
||||
|
|
@ -37,13 +37,12 @@ anchor_left = 0.5
|
|||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -43.0
|
||||
offset_top = -46.0
|
||||
offset_left = -52.0
|
||||
offset_top = -50.0
|
||||
offset_right = 243.0
|
||||
offset_bottom = 42.0
|
||||
offset_bottom = 47.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_default_cursor_shape = 13
|
||||
theme = ExtResource("3_qmm0h")
|
||||
theme_type_variation = &"card_text"
|
||||
text = "sticksum ipsum dolor sit amet met post-it sulcum dulce est 3M, et tesa est."
|
||||
|
|
|
|||
|
|
@ -1,45 +1,37 @@
|
|||
[gd_scene format=3 uid="uid://dreokijo757l1"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://dreokijo757l1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bp6s7vhdd6btk" path="res://logic-scenes/interactable/interactable.gd" id="1_ih54h"]
|
||||
[ext_resource type="Texture2D" uid="uid://0j2nrhijh7lm" path="res://import/interface-elements/frame-square.png" id="2_ih54h"]
|
||||
[ext_resource type="Shader" uid="uid://c1ufy6ee6x24x" path="res://logic-scenes/interactable/interactable.gdshader" id="2_m0u7p"]
|
||||
[ext_resource type="PackedScene" uid="uid://bdnesuqroi7ss" path="res://vfx/collectable_particles.tscn" id="6_a6wx8"]
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_ih54h"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_kupkd"]
|
||||
render_priority = 0
|
||||
shader = ExtResource("2_m0u7p")
|
||||
shader_parameter/frame_texture = ExtResource("2_ih54h")
|
||||
|
||||
[node name="Interactable" type="Area3D" unique_id=847160499 groups=["interactables"]]
|
||||
[node name="Interactable" type="Area3D" groups=["interactables"]]
|
||||
collision_layer = 16
|
||||
collision_mask = 16
|
||||
script = ExtResource("1_ih54h")
|
||||
metadata/_custom_type_script = "uid://bp6s7vhdd6btk"
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=553285003]
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(-4.371139e-08, -1, 0, 1, -4.371139e-08, 0, 0, 0, 1, 0, 0, 0)
|
||||
shape = SubResource("SphereShape3D_ih54h")
|
||||
|
||||
[node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=1409525651]
|
||||
[node name="OmniLight3D" type="OmniLight3D" parent="."]
|
||||
light_energy = 0.01
|
||||
light_indirect_energy = 0.0
|
||||
light_specular = 0.0
|
||||
omni_range = 0.4
|
||||
|
||||
[node name="Frame" type="Sprite3D" parent="." unique_id=677642595]
|
||||
[node name="Frame" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, 0, 0, 0)
|
||||
material_override = SubResource("ShaderMaterial_kupkd")
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
pixel_size = 0.000669
|
||||
pixel_size = 0.0005
|
||||
no_depth_test = true
|
||||
render_priority = 100
|
||||
texture = ExtResource("2_ih54h")
|
||||
|
||||
[node name="collectable_particles" parent="." unique_id=1080033644 instance=ExtResource("6_a6wx8")]
|
||||
[node name="collectable_particles" parent="." instance=ExtResource("6_a6wx8")]
|
||||
transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, 0, 0, 0)
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=1268805139]
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
layer = -1
|
||||
visible = false
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@ func _apply_enabled_state() -> void:
|
|||
|
||||
if has_entered:
|
||||
ui_exited.emit()
|
||||
|
||||
# Show hand cursor when player is enabled
|
||||
if hand_cursor:
|
||||
hand_cursor.visible = true
|
||||
else:
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||
jitter_tween = create_tween()
|
||||
|
|
@ -27,7 +31,8 @@ func _apply_enabled_state() -> void:
|
|||
if has_entered:
|
||||
ui_exited.emit()
|
||||
# Hide hand cursor when player is disabled
|
||||
|
||||
if hand_cursor:
|
||||
hand_cursor.visible = false
|
||||
sleeping = not enabled
|
||||
|
||||
@export var mouse_sensitivity: Vector2 = Vector2(6, 5)
|
||||
|
|
@ -85,6 +90,7 @@ var crouched:bool = false:
|
|||
@onready var camera: Camera3D = $Yaw/Pitch/Mount/Camera3D
|
||||
@onready var focus_ray: RayCast3D = $Yaw/Pitch/Mount/Camera3D/RayCast3D
|
||||
@onready var ui_prober: Area3D = $Yaw/Pitch/Mount/Camera3D/UiProber
|
||||
@onready var hand_cursor: TextureRect = %Cursor
|
||||
|
||||
# Cursor textures (preloaded for performance)
|
||||
const cursor_default: Texture2D = preload("res://import/interface-elements/cursor_point.png")
|
||||
|
|
@ -119,12 +125,22 @@ func _ready():
|
|||
$CrouchDetector.area_entered.connect(enter_crouch)
|
||||
$CrouchDetector.area_exited.connect(exit_crouch)
|
||||
|
||||
# Setup hand cursor
|
||||
_setup_hand_cursor()
|
||||
|
||||
# Apply exported enabled state now that nodes are ready
|
||||
_apply_enabled_state()
|
||||
|
||||
|
||||
func _on_player_enable(enable: bool) -> void:
|
||||
enabled = enable
|
||||
|
||||
## Setup the hand cursor in the center of the screen
|
||||
func _setup_hand_cursor() -> void:
|
||||
# Configure the existing TextureRect for cursor display
|
||||
hand_cursor.texture = cursor_default # Start with default cursor
|
||||
hand_cursor.visible = false
|
||||
|
||||
## Restores player position and camera rotation from save game
|
||||
func restore_from_save(save: SaveGame) -> void:
|
||||
prints("player_controller.gd", restore_from_save, save.player_position, save.player_yaw, save.player_pitch)
|
||||
|
|
@ -137,7 +153,7 @@ func _process(_delta) -> void:
|
|||
return
|
||||
|
||||
if not has_entered:
|
||||
camera.fov = base_fov / (1 + Input.get_action_raw_strength("zoom"))
|
||||
camera.fov = base_fov / (1 + Input.get_action_raw_strength("zoom_in_controller"))
|
||||
|
||||
var has_entered:bool = false:
|
||||
set(val):
|
||||
|
|
@ -158,7 +174,9 @@ func _on_ray_entered(_area : Area3D) -> void:
|
|||
if not interactable.visible: return
|
||||
#printt("ray entered", parent.name, parent)
|
||||
interactable.hover = true
|
||||
|
||||
# Switch to pointing hand cursor when hovering over interactable
|
||||
if hand_cursor:
|
||||
hand_cursor.texture = cursor_point
|
||||
|
||||
func _on_ray_exited(_area : Area3D) -> void:
|
||||
var interactable := _area as Interactable
|
||||
|
|
@ -167,19 +185,21 @@ func _on_ray_exited(_area : Area3D) -> void:
|
|||
if not interactable.visible: return
|
||||
#printt("ray exited", parent.name, parent)
|
||||
interactable.hover = false
|
||||
# Switch back to default cursor when not hovering
|
||||
if hand_cursor:
|
||||
hand_cursor.texture = cursor_default
|
||||
|
||||
|
||||
func _physics_process(delta: float):
|
||||
if enabled:
|
||||
_handle_movement(delta)
|
||||
_handle_rotation(delta)
|
||||
if jitter_strength > 0 and not (State.reduce_motion or State.disable_bobbing):
|
||||
if jitter_strength > 0 and not State.reduce_motion:
|
||||
_handle_jitter(delta)
|
||||
|
||||
func _handle_movement(_delta:float):
|
||||
#TODO: change this to the Four-Axis call with SteamInput!
|
||||
var input:Vector2 = Vector2(Input.get_action_strength("walk_right") - Input.get_action_strength("walk_left"),
|
||||
Input.get_action_strength("walk_negative")*0.8 - Input.get_action_strength("walk_positive"))
|
||||
var input:Vector2 = Vector2(Input.get_action_strength("player_right") - Input.get_action_strength("player_left"),
|
||||
Input.get_action_strength("player_backwards")*0.8 - Input.get_action_strength("player_forwards"))
|
||||
|
||||
if input.length()>1:
|
||||
input = input.normalized()
|
||||
|
|
@ -195,7 +215,7 @@ func _handle_movement(_delta:float):
|
|||
func _handle_rotation(delta:float):
|
||||
var smoothness = min(3, 60.0/Engine.get_frames_per_second())
|
||||
|
||||
var input_speed := Vector2( Input.get_action_strength("look_right")-Input.get_action_strength("look_left"), Input.get_action_strength("look_positive")-Input.get_action_strength("look_negative")) * gamepad_response
|
||||
var input_speed := Vector2( Input.get_action_strength("look_right")-Input.get_action_strength("look_left"), Input.get_action_strength("look_up")-Input.get_action_strength("look_down")) * gamepad_response
|
||||
|
||||
# secretly, inverted y axis is the default
|
||||
if not State.inverty_y_axis: input_speed *= Vector2(1, -1)
|
||||
|
|
@ -255,7 +275,7 @@ func _input(event: InputEvent) -> void:
|
|||
elif Input.is_action_just_pressed("zoom_out_mouse"):
|
||||
zoomed = false
|
||||
|
||||
if event.is_action_pressed("interact") or event.is_action_pressed("summarize"):
|
||||
if event.is_action_pressed("collect_memento_ui") or event.is_action_pressed("option_memento_ui"):
|
||||
if focus_ray.is_colliding():
|
||||
var collider := focus_ray.get_collider()
|
||||
if collider is Interactable:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[gd_scene format=3 uid="uid://mkccbig41bqb"]
|
||||
[gd_scene load_steps=18 format=3 uid="uid://mkccbig41bqb"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bk618uyhghswx" path="res://logic-scenes/player_controller/player_controller.gd" id="1_0b4mi"]
|
||||
[ext_resource type="Texture2D" uid="uid://d005qvnbnishb" path="res://import/interface-elements/cursor_grab.png" id="2_x6v75"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="10"]
|
||||
friction = 0.0
|
||||
|
|
@ -609,7 +610,7 @@ _data = {
|
|||
[sub_resource type="SphereShape3D" id="SphereShape3D_hpoj0"]
|
||||
radius = 0.3
|
||||
|
||||
[node name="PlayerController" type="RigidBody3D" unique_id=458178412]
|
||||
[node name="PlayerController" type="RigidBody3D"]
|
||||
collision_layer = 3
|
||||
collision_mask = 3
|
||||
axis_lock_angular_x = true
|
||||
|
|
@ -620,42 +621,42 @@ can_sleep = false
|
|||
script = ExtResource("1_0b4mi")
|
||||
max_acceleration = 7.0
|
||||
|
||||
[node name="ShadowCaster" type="MeshInstance3D" parent="." unique_id=1345401097]
|
||||
[node name="ShadowCaster" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.54540473, 0)
|
||||
layers = 1024
|
||||
cast_shadow = 3
|
||||
gi_mode = 2
|
||||
mesh = SubResource("CapsuleMesh_x6v75")
|
||||
|
||||
[node name="Yaw" type="Node3D" parent="." unique_id=375035441]
|
||||
[node name="Yaw" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.22534, 0)
|
||||
|
||||
[node name="Pitch" type="Node3D" parent="Yaw" unique_id=2024736202]
|
||||
[node name="Pitch" type="Node3D" parent="Yaw"]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.9999993, 0, 0, 0, 0.9999993, 0, 0, 0)
|
||||
|
||||
[node name="Mount" type="Node3D" parent="Yaw/Pitch" unique_id=843946387]
|
||||
[node name="Mount" type="Node3D" parent="Yaw/Pitch"]
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="Yaw/Pitch/Mount" unique_id=1103233897]
|
||||
[node name="Camera3D" type="Camera3D" parent="Yaw/Pitch/Mount"]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.202, 0.157)
|
||||
cull_mask = 7
|
||||
current = true
|
||||
|
||||
[node name="RayCast3D" type="RayCast3D" parent="Yaw/Pitch/Mount/Camera3D" unique_id=1162056013]
|
||||
[node name="RayCast3D" type="RayCast3D" parent="Yaw/Pitch/Mount/Camera3D"]
|
||||
target_position = Vector3(0, 0, -1.5)
|
||||
collision_mask = 16
|
||||
collide_with_areas = true
|
||||
|
||||
[node name="UiProber" type="Area3D" parent="Yaw/Pitch/Mount/Camera3D" unique_id=1719268439]
|
||||
[node name="UiProber" type="Area3D" parent="Yaw/Pitch/Mount/Camera3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 2.98023e-08, 0, -2.98023e-08, 1, 0, 0, 0)
|
||||
collision_layer = 0
|
||||
collision_mask = 16
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Yaw/Pitch/Mount/Camera3D/UiProber" unique_id=1296155920]
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Yaw/Pitch/Mount/Camera3D/UiProber"]
|
||||
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, 0, 0)
|
||||
shape = SubResource("SeparationRayShape3D_hpoj0")
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="Yaw/Pitch/Mount/Camera3D" unique_id=1075830184]
|
||||
[node name="TextureRect" type="TextureRect" parent="Yaw/Pitch/Mount/Camera3D"]
|
||||
visible = false
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
anchors_preset = 15
|
||||
|
|
@ -669,18 +670,37 @@ mouse_filter = 2
|
|||
texture = SubResource("GradientTexture2D_x6v75")
|
||||
expand_mode = 4
|
||||
|
||||
[node name="PlayerCollision" type="CollisionShape3D" parent="." unique_id=57703964]
|
||||
[node name="Cursor" type="TextureRect" parent="Yaw/Pitch/Mount/Camera3D"]
|
||||
unique_name_in_owner = true
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = -20.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("2_x6v75")
|
||||
stretch_mode = 3
|
||||
|
||||
[node name="PlayerCollision" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, -1, 8.74228e-08, 0, -8.74228e-08, -1, 0, 0.6, 0)
|
||||
shape = SubResource("CapsuleShape3D_hpoj0")
|
||||
|
||||
[node name="PlayerAnimationPlayer" type="AnimationPlayer" parent="." unique_id=1528985038]
|
||||
libraries/ = SubResource("AnimationLibrary_xbx3w")
|
||||
autoplay = &"RESET"
|
||||
[node name="PlayerAnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_xbx3w")
|
||||
}
|
||||
autoplay = "RESET"
|
||||
|
||||
[node name="CrouchDetector" type="Area3D" parent="." unique_id=1140653929]
|
||||
[node name="CrouchDetector" type="Area3D" parent="."]
|
||||
collision_layer = 3
|
||||
collision_mask = 3
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="CrouchDetector" unique_id=184769616]
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="CrouchDetector"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.35, 0)
|
||||
shape = SubResource("SphereShape3D_hpoj0")
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ toggle_fullscreen={
|
|||
"events": [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":4194342,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
interact={
|
||||
collect_memento_ui={
|
||||
"deadzone": 0.2,
|
||||
"events": [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":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
||||
|
|
|
|||
|
|
@ -11,20 +11,7 @@ static var _instance : Prompter = null
|
|||
func _ready() -> void:
|
||||
_register_prompts()
|
||||
clear()
|
||||
|
||||
%Cursor.hide()
|
||||
Scenes.player_enable.connect(func(enable: bool): %Cursor.visible = enable)
|
||||
|
||||
func hover_cursor(enable: bool):
|
||||
if enable:
|
||||
$AnimationPlayer.play("show_cursor")
|
||||
else:
|
||||
$AnimationPlayer.play("hide_cursor")
|
||||
|
||||
func display_hint(message:String, duration: float, delay: float = 0):
|
||||
#TODO implement a more streamlined version of displaying prompts during polish.
|
||||
#This should cause other functions to become deprecated.
|
||||
assert(false)
|
||||
|
||||
func _register_prompts() -> void:
|
||||
assert(not _instance, "Cannot have two prompters (are you trying to run the prompter itself?)")
|
||||
|
|
@ -56,9 +43,6 @@ func _clearInstruction() -> void:
|
|||
%Instruction.text = ""
|
||||
%Instruction.get_parent().hide()
|
||||
|
||||
func _clearContent() -> void:
|
||||
%ContentSummary.text = ""
|
||||
%ContentSummary.get_parent().hide()
|
||||
|
||||
func _show(container: Control, controls: Array[Control], overrides: Array[StringName] = []) -> void:
|
||||
for i in range(len(controls)):
|
||||
|
|
@ -106,7 +90,6 @@ func clear() -> void:
|
|||
_clear(%Center)
|
||||
_clearInteraction()
|
||||
_clearInstruction()
|
||||
_clearContent()
|
||||
|
||||
|
||||
## Selects a list of up to three prompts to be passed to the show_xxxxx() functions
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
[gd_scene format=3 uid="uid://btmlxxbucfqa7"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://btmlxxbucfqa7"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://de6ettn5s20va" path="res://ui/prompter/prompter.gd" id="1_ba0r8"]
|
||||
[ext_resource type="FontFile" uid="uid://c5ql8u7tpd10j" path="res://import/fonts/KleeOne-SemiBold.ttf" id="3_xtx06"]
|
||||
[ext_resource type="Texture2D" uid="uid://d005qvnbnishb" path="res://import/interface-elements/cursor_grab.png" id="4_ba0r8"]
|
||||
[ext_resource type="Theme" uid="uid://c30n4maixii5g" path="res://logic-scenes/themes/content_note_theme.tres" id="5_7ych8"]
|
||||
[ext_resource type="Texture2D" uid="uid://epjksqlw8frf" path="res://logic-scenes/collectable/decorative_paper.png" id="5_43eso"]
|
||||
[ext_resource type="PackedScene" uid="uid://nvbffevo54eh" path="res://ui/prompter/prompt_button.tscn" id="5_fbpt0"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ba0r8"]
|
||||
|
|
@ -22,163 +19,7 @@ outline_color = Color(0, 0, 0, 1)
|
|||
shadow_size = 4
|
||||
shadow_color = Color(0, 0, 0, 0.78431374)
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_fbpt0"]
|
||||
offsets = PackedFloat32Array(0.46281344, 0.72639626)
|
||||
colors = PackedColorArray(0.93161064, 0.8421718, 0.75696284, 0.7058824, 0.94143397, 0.755365, 0.65018964, 0)
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_43eso"]
|
||||
gradient = SubResource("Gradient_fbpt0")
|
||||
width = 16
|
||||
height = 16
|
||||
fill = 1
|
||||
fill_from = Vector2(0.5, 0.5)
|
||||
fill_to = Vector2(0.5, 1)
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_3nhdl"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_7ych8"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("SafeZone/CenterContainer/Cursor/TextureRect:scale")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(1, 1)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("SafeZone/CenterContainer/Cursor/TextureRect2:modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_3nhdl"]
|
||||
resource_name = "hide_cursor"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("SafeZone/CenterContainer/Cursor/TextureRect:scale")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(1, 1)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("SafeZone/CenterContainer/Cursor/TextureRect:modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.26666668),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("SafeZone/CenterContainer/Cursor/TextureRect2:modulate")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_ba0r8"]
|
||||
resource_name = "init"
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("SafeZone/CenterContainer/Cursor/TextureRect2:modulate")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("SafeZone/CenterContainer/Cursor/TextureRect:scale")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(1e-05, 1e-05)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_foyvw"]
|
||||
resource_name = "show_cursor"
|
||||
length = 0.3
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("SafeZone/CenterContainer/Cursor/TextureRect:scale")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.3),
|
||||
"transitions": PackedFloat32Array(0.28319794, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(1e-05, 1e-05), Vector2(1, 1)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("SafeZone/CenterContainer/Cursor/TextureRect2:modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.2),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("SafeZone/CenterContainer/Cursor/TextureRect:modulate")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(1, 1, 1, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_5iaad"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_7ych8"),
|
||||
&"hide_cursor": SubResource("Animation_3nhdl"),
|
||||
&"init": SubResource("Animation_ba0r8"),
|
||||
&"show_cursor": SubResource("Animation_foyvw")
|
||||
}
|
||||
|
||||
[node name="Prompter" type="MarginContainer" unique_id=105769936]
|
||||
[node name="Prompter" type="MarginContainer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
|
@ -191,47 +32,51 @@ theme_override_constants/margin_right = 42
|
|||
theme_override_constants/margin_bottom = 42
|
||||
script = ExtResource("1_ba0r8")
|
||||
|
||||
[node name="SafeZone" type="Control" parent="." unique_id=1934527498]
|
||||
layout_mode = 2
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
layer = 10
|
||||
|
||||
[node name="SafeZone" type="Control" parent="CanvasLayer"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_left = 42.0
|
||||
offset_top = 42.0
|
||||
offset_right = 1878.0
|
||||
offset_bottom = 1038.0
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="SafeZone" unique_id=1743985800]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
[node name="CenterContainer" type="CenterContainer" parent="CanvasLayer/SafeZone"]
|
||||
layout_mode = 0
|
||||
offset_right = 1836.0
|
||||
offset_bottom = 996.0
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="CenterZone" type="MarginContainer" parent="SafeZone/CenterContainer" unique_id=1707042356]
|
||||
[node name="CenterZone" type="MarginContainer" parent="CanvasLayer/SafeZone/CenterContainer"]
|
||||
custom_minimum_size = Vector2(700, 700)
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
theme_override_constants/margin_top = 42
|
||||
theme_override_constants/margin_right = 42
|
||||
|
||||
[node name="TopCenter" type="PanelContainer" parent="SafeZone/CenterContainer/CenterZone" unique_id=592627471]
|
||||
[node name="TopCenter" type="PanelContainer" parent="CanvasLayer/SafeZone/CenterContainer/CenterZone"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 0
|
||||
mouse_filter = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_ba0r8")
|
||||
|
||||
[node name="Interaction" type="Label" parent="SafeZone/CenterContainer/CenterZone/TopCenter" unique_id=947868457]
|
||||
[node name="Interaction" type="Label" parent="CanvasLayer/SafeZone/CenterContainer/CenterZone/TopCenter"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "object to interact with"
|
||||
label_settings = SubResource("LabelSettings_fbpt0")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="CenterAnchor" type="Control" parent="SafeZone/CenterContainer/CenterZone" unique_id=1713330498]
|
||||
[node name="CenterAnchor" type="Control" parent="CanvasLayer/SafeZone/CenterContainer/CenterZone"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 8
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Center" type="VBoxContainer" parent="SafeZone/CenterContainer/CenterZone/CenterAnchor" unique_id=74145337]
|
||||
[node name="Center" type="VBoxContainer" parent="CanvasLayer/SafeZone/CenterContainer/CenterZone/CenterAnchor"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
|
|
@ -246,91 +91,45 @@ grow_horizontal = 2
|
|||
grow_vertical = 0
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 8
|
||||
mouse_filter = 2
|
||||
theme_override_constants/separation = 48
|
||||
alignment = 2
|
||||
|
||||
[node name="collect_memento_ui" parent="SafeZone/CenterContainer/CenterZone/CenterAnchor/Center" unique_id=1149207037 instance=ExtResource("5_fbpt0")]
|
||||
[node name="collect_memento_ui" parent="CanvasLayer/SafeZone/CenterContainer/CenterZone/CenterAnchor/Center" instance=ExtResource("5_fbpt0")]
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
text = "collect_memento_ui"
|
||||
action = &"collect_memento_ui"
|
||||
|
||||
[node name="option_memento_ui" parent="SafeZone/CenterContainer/CenterZone/CenterAnchor/Center" unique_id=1048897975 instance=ExtResource("5_fbpt0")]
|
||||
[node name="option_memento_ui" parent="CanvasLayer/SafeZone/CenterContainer/CenterZone/CenterAnchor/Center" instance=ExtResource("5_fbpt0")]
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
text = "option_memento_ui"
|
||||
action = &"option_memento_ui"
|
||||
|
||||
[node name="Cursor" type="Control" parent="SafeZone/CenterContainer" unique_id=1682682036]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(64, 64)
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="SafeZone/CenterContainer/Cursor" unique_id=1771227753]
|
||||
layout_mode = 0
|
||||
offset_left = 32.0
|
||||
offset_top = 32.0
|
||||
offset_right = 60.0
|
||||
offset_bottom = 64.0
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("4_ba0r8")
|
||||
|
||||
[node name="TextureRect2" type="TextureRect" parent="SafeZone/CenterContainer/Cursor" unique_id=1579264983]
|
||||
layout_mode = 0
|
||||
offset_left = 24.0
|
||||
offset_top = 24.0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
mouse_filter = 2
|
||||
texture = SubResource("GradientTexture2D_43eso")
|
||||
|
||||
[node name="ContentContainer" type="VBoxContainer" parent="SafeZone/CenterContainer" unique_id=1198131767]
|
||||
custom_minimum_size = Vector2(800, 0)
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="ContentSummary" type="Label" parent="SafeZone/CenterContainer/ContentContainer" unique_id=1797481988]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme = ExtResource("5_7ych8")
|
||||
text = "summary_childhood"
|
||||
autowrap_mode = 2
|
||||
|
||||
[node name="ClosePrompt" parent="SafeZone/CenterContainer/ContentContainer" unique_id=1963537997 instance=ExtResource("5_fbpt0")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Top" type="PanelContainer" parent="SafeZone" unique_id=1663835039]
|
||||
[node name="Top" type="PanelContainer" parent="CanvasLayer/SafeZone"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -273.5
|
||||
offset_right = 273.5
|
||||
offset_left = -230.5
|
||||
offset_right = 230.5
|
||||
offset_bottom = 98.33334
|
||||
grow_horizontal = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Instruction" type="Label" parent="SafeZone/Top" unique_id=366950450]
|
||||
[node name="Instruction" type="Label" parent="CanvasLayer/SafeZone/Top"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "a general explanation or hint about what is going on
|
||||
or an evaluation such as on the card-boardin"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="LeftBottomAnchor" type="Control" parent="SafeZone" unique_id=897522273]
|
||||
layout_mode = 1
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_vertical = 0
|
||||
[node name="LeftBottomAnchor" type="Control" parent="CanvasLayer/SafeZone"]
|
||||
anchors_preset = 0
|
||||
offset_top = 996.0
|
||||
offset_bottom = 996.0
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 8
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="LeftBottom" type="VBoxContainer" parent="SafeZone/LeftBottomAnchor" unique_id=889712323]
|
||||
[node name="LeftBottom" type="VBoxContainer" parent="CanvasLayer/SafeZone/LeftBottomAnchor"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 2
|
||||
|
|
@ -342,38 +141,35 @@ offset_right = 386.0
|
|||
grow_vertical = 0
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 4
|
||||
mouse_filter = 2
|
||||
theme_override_constants/separation = 48
|
||||
alignment = 2
|
||||
|
||||
[node name="ui_accept" parent="SafeZone/LeftBottomAnchor/LeftBottom" unique_id=265719469 instance=ExtResource("5_fbpt0")]
|
||||
[node name="ui_accept" parent="CanvasLayer/SafeZone/LeftBottomAnchor/LeftBottom" instance=ExtResource("5_fbpt0")]
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="ui_cancel" parent="SafeZone/LeftBottomAnchor/LeftBottom" unique_id=487509301 instance=ExtResource("5_fbpt0")]
|
||||
[node name="ui_cancel" parent="CanvasLayer/SafeZone/LeftBottomAnchor/LeftBottom" instance=ExtResource("5_fbpt0")]
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
text = "ui_cancel"
|
||||
action = &"ui_cancel"
|
||||
|
||||
[node name="scene_skip" parent="SafeZone/LeftBottomAnchor/LeftBottom" unique_id=854975043 instance=ExtResource("5_fbpt0")]
|
||||
[node name="scene_skip" parent="CanvasLayer/SafeZone/LeftBottomAnchor/LeftBottom" instance=ExtResource("5_fbpt0")]
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
text = "scene_skip"
|
||||
action = &"scene_skip"
|
||||
|
||||
[node name="RightBottomAnchor" type="Control" parent="SafeZone" unique_id=918246795]
|
||||
[node name="RightBottomAnchor" type="Control" parent="CanvasLayer/SafeZone"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -1836.0
|
||||
offset_top = -996.0
|
||||
offset_left = -40.0
|
||||
offset_top = -40.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="RightBottom" type="VBoxContainer" parent="SafeZone/RightBottomAnchor" unique_id=24278891]
|
||||
[node name="RightBottom" type="VBoxContainer" parent="CanvasLayer/SafeZone/RightBottomAnchor"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
|
|
@ -387,115 +183,5 @@ grow_horizontal = 0
|
|||
grow_vertical = 0
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 4
|
||||
mouse_filter = 2
|
||||
theme_override_constants/separation = 48
|
||||
alignment = 2
|
||||
|
||||
[node name="BottomAncor" type="Control" parent="SafeZone" unique_id=269513583]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -918.0
|
||||
offset_top = -996.0
|
||||
offset_right = 918.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="SafeZone/BottomAncor" unique_id=1931879850]
|
||||
layout_mode = 0
|
||||
offset_left = 673.0
|
||||
offset_top = 615.0
|
||||
offset_right = 1186.0
|
||||
offset_bottom = 981.0
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("5_43eso")
|
||||
expand_mode = 1
|
||||
|
||||
[node name="MementoMenu" type="VBoxContainer" parent="SafeZone/BottomAncor/TextureRect" unique_id=620199752]
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -464.0
|
||||
offset_top = -301.0
|
||||
offset_right = -77.0
|
||||
offset_bottom = -61.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 4
|
||||
mouse_filter = 2
|
||||
theme_override_constants/separation = 20
|
||||
|
||||
[node name="TitleLabel" type="Label" parent="SafeZone/BottomAncor/TextureRect/MementoMenu" unique_id=469307709]
|
||||
modulate = Color(0, 0, 0, 1)
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"HeaderLarge"
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 0.29200003)
|
||||
text = "Old Mask"
|
||||
|
||||
[node name="CN_Label" type="Label" parent="SafeZone/BottomAncor/TextureRect/MementoMenu" unique_id=1540632272]
|
||||
custom_minimum_size = Vector2(128, 0)
|
||||
layout_mode = 2
|
||||
theme = ExtResource("5_7ych8")
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 0.29200003)
|
||||
text = "CN: Alienation, Eating Issues, Gender Dysphoria"
|
||||
autowrap_mode = 3
|
||||
|
||||
[node name="MenentoCollect" parent="SafeZone/BottomAncor/TextureRect/MementoMenu" unique_id=1683993606 instance=ExtResource("5_fbpt0")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
mouse_filter = 2
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_styles/normal = SubResource("StyleBoxEmpty_3nhdl")
|
||||
|
||||
[node name="TraumaExtras" type="VBoxContainer" parent="SafeZone/BottomAncor/TextureRect" unique_id=970164645]
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 112.0
|
||||
offset_top = -307.0
|
||||
offset_right = 499.0
|
||||
offset_bottom = -67.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 4
|
||||
mouse_filter = 2
|
||||
theme_override_constants/separation = 48
|
||||
|
||||
[node name="MenentoCollect2" parent="SafeZone/BottomAncor/TextureRect/TraumaExtras" unique_id=2124099022 instance=ExtResource("5_fbpt0")]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
mouse_filter = 2
|
||||
theme = ExtResource("5_7ych8")
|
||||
text = "scene_skip"
|
||||
|
||||
[node name="TitleLabel" type="Label" parent="SafeZone/BottomAncor/TextureRect/TraumaExtras" unique_id=331285775]
|
||||
modulate = Color(0, 0, 0, 1)
|
||||
layout_mode = 2
|
||||
theme_type_variation = &"HeaderLarge"
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 0.29200003)
|
||||
text = "Old Mask"
|
||||
|
||||
[node name="CN_Label" type="Label" parent="SafeZone/BottomAncor/TextureRect/TraumaExtras" unique_id=2075897855]
|
||||
custom_minimum_size = Vector2(128, 0)
|
||||
layout_mode = 2
|
||||
theme = ExtResource("5_7ych8")
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 0.29200003)
|
||||
text = "CN: Alienation, Eating Issues, Gender Dysphoria"
|
||||
autowrap_mode = 3
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=612858505]
|
||||
libraries/ = SubResource("AnimationLibrary_5iaad")
|
||||
autoplay = &"init"
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ func _input(event: InputEvent) -> void:
|
|||
$AnimationPlayer.play("reveal_skip")
|
||||
unrevealed = false
|
||||
|
||||
if event.is_action_pressed("skip"):
|
||||
if event.is_action_pressed("scene_skip"):
|
||||
if not (is_auto_proceeding or aborted):
|
||||
pressed = true
|
||||
else:
|
||||
|
|
@ -96,13 +96,13 @@ func _input(event: InputEvent) -> void:
|
|||
reset()
|
||||
|
||||
get_viewport().set_input_as_handled()
|
||||
elif event.is_action_released("skip"):
|
||||
elif event.is_action_released("scene_skip"):
|
||||
if not is_auto_proceeding:
|
||||
pressed = false
|
||||
time_pressed = 0
|
||||
progress.value = 0
|
||||
get_viewport().set_input_as_handled()
|
||||
elif Input.is_action_just_pressed("ui_accept") or Input.is_action_just_pressed("ui_focus_next") or Input.is_action_just_pressed("skip") and is_auto_proceeding:
|
||||
elif Input.is_action_just_pressed("ui_accept") or Input.is_action_just_pressed("ui_focus_next") or Input.is_action_just_pressed("scene_skip") and is_auto_proceeding:
|
||||
proceed.emit()
|
||||
get_viewport().set_input_as_handled()
|
||||
reset()
|
||||
|
|
|
|||
2173
wireframe.svg
2173
wireframe.svg
File diff suppressed because it is too large
Load Diff
|
Before Width: | Height: | Size: 122 KiB |
Loading…
Reference in New Issue