moving cursor into prompter
This commit is contained in:
parent
b3e1bc1a45
commit
0d673e1210
|
|
@ -1,37 +1,45 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://dreokijo757l1"]
|
||||
[gd_scene 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"]
|
||||
|
||||
[node name="Interactable" type="Area3D" groups=["interactables"]]
|
||||
[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"]]
|
||||
collision_layer = 16
|
||||
collision_mask = 16
|
||||
script = ExtResource("1_ih54h")
|
||||
metadata/_custom_type_script = "uid://bp6s7vhdd6btk"
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=553285003]
|
||||
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="."]
|
||||
[node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=1409525651]
|
||||
light_energy = 0.01
|
||||
light_indirect_energy = 0.0
|
||||
light_specular = 0.0
|
||||
omni_range = 0.4
|
||||
|
||||
[node name="Frame" type="Sprite3D" parent="."]
|
||||
[node name="Frame" type="Sprite3D" parent="." unique_id=677642595]
|
||||
transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, 0, 0, 0)
|
||||
pixel_size = 0.0005
|
||||
material_override = SubResource("ShaderMaterial_kupkd")
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
pixel_size = 0.000669
|
||||
no_depth_test = true
|
||||
render_priority = 100
|
||||
texture = ExtResource("2_ih54h")
|
||||
|
||||
[node name="collectable_particles" parent="." instance=ExtResource("6_a6wx8")]
|
||||
[node name="collectable_particles" parent="." unique_id=1080033644 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="."]
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=1268805139]
|
||||
layer = -1
|
||||
visible = false
|
||||
|
|
|
|||
|
|
@ -20,10 +20,6 @@ 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()
|
||||
|
|
@ -31,8 +27,7 @@ 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)
|
||||
|
|
@ -90,7 +85,6 @@ 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")
|
||||
|
|
@ -125,22 +119,12 @@ 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)
|
||||
|
|
@ -153,7 +137,7 @@ func _process(_delta) -> void:
|
|||
return
|
||||
|
||||
if not has_entered:
|
||||
camera.fov = base_fov / (1 + Input.get_action_raw_strength("zoom_in_controller"))
|
||||
camera.fov = base_fov / (1 + Input.get_action_raw_strength("zoom"))
|
||||
|
||||
var has_entered:bool = false:
|
||||
set(val):
|
||||
|
|
@ -174,9 +158,7 @@ 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
|
||||
|
|
@ -185,16 +167,13 @@ 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:
|
||||
if jitter_strength > 0 and not (State.reduce_motion or State.disable_bobbing):
|
||||
_handle_jitter(delta)
|
||||
|
||||
func _handle_movement(_delta:float):
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
[gd_scene load_steps=18 format=3 uid="uid://mkccbig41bqb"]
|
||||
[gd_scene 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
|
||||
|
|
@ -610,7 +609,7 @@ _data = {
|
|||
[sub_resource type="SphereShape3D" id="SphereShape3D_hpoj0"]
|
||||
radius = 0.3
|
||||
|
||||
[node name="PlayerController" type="RigidBody3D"]
|
||||
[node name="PlayerController" type="RigidBody3D" unique_id=458178412]
|
||||
collision_layer = 3
|
||||
collision_mask = 3
|
||||
axis_lock_angular_x = true
|
||||
|
|
@ -621,42 +620,42 @@ can_sleep = false
|
|||
script = ExtResource("1_0b4mi")
|
||||
max_acceleration = 7.0
|
||||
|
||||
[node name="ShadowCaster" type="MeshInstance3D" parent="."]
|
||||
[node name="ShadowCaster" type="MeshInstance3D" parent="." unique_id=1345401097]
|
||||
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="."]
|
||||
[node name="Yaw" type="Node3D" parent="." unique_id=375035441]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.22534, 0)
|
||||
|
||||
[node name="Pitch" type="Node3D" parent="Yaw"]
|
||||
[node name="Pitch" type="Node3D" parent="Yaw" unique_id=2024736202]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.9999993, 0, 0, 0, 0.9999993, 0, 0, 0)
|
||||
|
||||
[node name="Mount" type="Node3D" parent="Yaw/Pitch"]
|
||||
[node name="Mount" type="Node3D" parent="Yaw/Pitch" unique_id=843946387]
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="Yaw/Pitch/Mount"]
|
||||
[node name="Camera3D" type="Camera3D" parent="Yaw/Pitch/Mount" unique_id=1103233897]
|
||||
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"]
|
||||
[node name="RayCast3D" type="RayCast3D" parent="Yaw/Pitch/Mount/Camera3D" unique_id=1162056013]
|
||||
target_position = Vector3(0, 0, -1.5)
|
||||
collision_mask = 16
|
||||
collide_with_areas = true
|
||||
|
||||
[node name="UiProber" type="Area3D" parent="Yaw/Pitch/Mount/Camera3D"]
|
||||
[node name="UiProber" type="Area3D" parent="Yaw/Pitch/Mount/Camera3D" unique_id=1719268439]
|
||||
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"]
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Yaw/Pitch/Mount/Camera3D/UiProber" unique_id=1296155920]
|
||||
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"]
|
||||
[node name="TextureRect" type="TextureRect" parent="Yaw/Pitch/Mount/Camera3D" unique_id=1075830184]
|
||||
visible = false
|
||||
modulate = Color(1, 1, 1, 0)
|
||||
anchors_preset = 15
|
||||
|
|
@ -670,37 +669,18 @@ mouse_filter = 2
|
|||
texture = SubResource("GradientTexture2D_x6v75")
|
||||
expand_mode = 4
|
||||
|
||||
[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="."]
|
||||
[node name="PlayerCollision" type="CollisionShape3D" parent="." unique_id=57703964]
|
||||
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="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_xbx3w")
|
||||
}
|
||||
autoplay = "RESET"
|
||||
[node name="PlayerAnimationPlayer" type="AnimationPlayer" parent="." unique_id=1528985038]
|
||||
libraries/ = SubResource("AnimationLibrary_xbx3w")
|
||||
autoplay = &"RESET"
|
||||
|
||||
[node name="CrouchDetector" type="Area3D" parent="."]
|
||||
[node name="CrouchDetector" type="Area3D" parent="." unique_id=1140653929]
|
||||
collision_layer = 3
|
||||
collision_mask = 3
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="CrouchDetector"]
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="CrouchDetector" unique_id=184769616]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.35, 0)
|
||||
shape = SubResource("SphereShape3D_hpoj0")
|
||||
|
|
|
|||
|
|
@ -11,7 +11,20 @@ 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?)")
|
||||
|
|
@ -43,6 +56,9 @@ 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)):
|
||||
|
|
@ -90,6 +106,7 @@ 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,7 +1,10 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://btmlxxbucfqa7"]
|
||||
[gd_scene 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"]
|
||||
|
|
@ -19,7 +22,163 @@ outline_color = Color(0, 0, 0, 1)
|
|||
shadow_size = 4
|
||||
shadow_color = Color(0, 0, 0, 0.78431374)
|
||||
|
||||
[node name="Prompter" type="MarginContainer"]
|
||||
[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]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
|
@ -32,51 +191,47 @@ theme_override_constants/margin_right = 42
|
|||
theme_override_constants/margin_bottom = 42
|
||||
script = ExtResource("1_ba0r8")
|
||||
|
||||
[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
|
||||
[node name="SafeZone" type="Control" parent="." unique_id=1934527498]
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="CanvasLayer/SafeZone"]
|
||||
layout_mode = 0
|
||||
offset_right = 1836.0
|
||||
offset_bottom = 996.0
|
||||
[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
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="CenterZone" type="MarginContainer" parent="CanvasLayer/SafeZone/CenterContainer"]
|
||||
[node name="CenterZone" type="MarginContainer" parent="SafeZone/CenterContainer" unique_id=1707042356]
|
||||
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="CanvasLayer/SafeZone/CenterContainer/CenterZone"]
|
||||
[node name="TopCenter" type="PanelContainer" parent="SafeZone/CenterContainer/CenterZone" unique_id=592627471]
|
||||
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="CanvasLayer/SafeZone/CenterContainer/CenterZone/TopCenter"]
|
||||
[node name="Interaction" type="Label" parent="SafeZone/CenterContainer/CenterZone/TopCenter" unique_id=947868457]
|
||||
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="CanvasLayer/SafeZone/CenterContainer/CenterZone"]
|
||||
[node name="CenterAnchor" type="Control" parent="SafeZone/CenterContainer/CenterZone" unique_id=1713330498]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 8
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Center" type="VBoxContainer" parent="CanvasLayer/SafeZone/CenterContainer/CenterZone/CenterAnchor"]
|
||||
[node name="Center" type="VBoxContainer" parent="SafeZone/CenterContainer/CenterZone/CenterAnchor" unique_id=74145337]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
|
|
@ -91,45 +246,91 @@ 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="CanvasLayer/SafeZone/CenterContainer/CenterZone/CenterAnchor/Center" instance=ExtResource("5_fbpt0")]
|
||||
[node name="collect_memento_ui" parent="SafeZone/CenterContainer/CenterZone/CenterAnchor/Center" unique_id=1149207037 instance=ExtResource("5_fbpt0")]
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
text = "collect_memento_ui"
|
||||
action = &"collect_memento_ui"
|
||||
|
||||
[node name="option_memento_ui" parent="CanvasLayer/SafeZone/CenterContainer/CenterZone/CenterAnchor/Center" instance=ExtResource("5_fbpt0")]
|
||||
[node name="option_memento_ui" parent="SafeZone/CenterContainer/CenterZone/CenterAnchor/Center" unique_id=1048897975 instance=ExtResource("5_fbpt0")]
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
text = "option_memento_ui"
|
||||
action = &"option_memento_ui"
|
||||
|
||||
[node name="Top" type="PanelContainer" parent="CanvasLayer/SafeZone"]
|
||||
[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]
|
||||
layout_mode = 1
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -230.5
|
||||
offset_right = 230.5
|
||||
offset_left = -273.5
|
||||
offset_right = 273.5
|
||||
offset_bottom = 98.33334
|
||||
grow_horizontal = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Instruction" type="Label" parent="CanvasLayer/SafeZone/Top"]
|
||||
[node name="Instruction" type="Label" parent="SafeZone/Top" unique_id=366950450]
|
||||
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="CanvasLayer/SafeZone"]
|
||||
anchors_preset = 0
|
||||
offset_top = 996.0
|
||||
offset_bottom = 996.0
|
||||
[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
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 8
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="LeftBottom" type="VBoxContainer" parent="CanvasLayer/SafeZone/LeftBottomAnchor"]
|
||||
[node name="LeftBottom" type="VBoxContainer" parent="SafeZone/LeftBottomAnchor" unique_id=889712323]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 2
|
||||
|
|
@ -141,35 +342,38 @@ 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="CanvasLayer/SafeZone/LeftBottomAnchor/LeftBottom" instance=ExtResource("5_fbpt0")]
|
||||
[node name="ui_accept" parent="SafeZone/LeftBottomAnchor/LeftBottom" unique_id=265719469 instance=ExtResource("5_fbpt0")]
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="ui_cancel" parent="CanvasLayer/SafeZone/LeftBottomAnchor/LeftBottom" instance=ExtResource("5_fbpt0")]
|
||||
[node name="ui_cancel" parent="SafeZone/LeftBottomAnchor/LeftBottom" unique_id=487509301 instance=ExtResource("5_fbpt0")]
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
text = "ui_cancel"
|
||||
action = &"ui_cancel"
|
||||
|
||||
[node name="scene_skip" parent="CanvasLayer/SafeZone/LeftBottomAnchor/LeftBottom" instance=ExtResource("5_fbpt0")]
|
||||
[node name="scene_skip" parent="SafeZone/LeftBottomAnchor/LeftBottom" unique_id=854975043 instance=ExtResource("5_fbpt0")]
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
text = "scene_skip"
|
||||
action = &"scene_skip"
|
||||
|
||||
[node name="RightBottomAnchor" type="Control" parent="CanvasLayer/SafeZone"]
|
||||
[node name="RightBottomAnchor" type="Control" parent="SafeZone" unique_id=918246795]
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -40.0
|
||||
offset_top = -40.0
|
||||
offset_left = -1836.0
|
||||
offset_top = -996.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="RightBottom" type="VBoxContainer" parent="CanvasLayer/SafeZone/RightBottomAnchor"]
|
||||
[node name="RightBottom" type="VBoxContainer" parent="SafeZone/RightBottomAnchor" unique_id=24278891]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
|
|
@ -183,5 +387,115 @@ 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("scene_skip"):
|
||||
if event.is_action_pressed("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("scene_skip"):
|
||||
elif event.is_action_released("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("scene_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("skip") and is_auto_proceeding:
|
||||
proceed.emit()
|
||||
get_viewport().set_input_as_handled()
|
||||
reset()
|
||||
|
|
|
|||
Loading…
Reference in New Issue