fix: LevelList changed to PanelContainer

This commit is contained in:
Jakob Feldmann 2023-09-27 15:33:23 +02:00
parent db8ac4f643
commit 8aa286387e
11 changed files with 67 additions and 60 deletions

View File

@ -1,4 +1,4 @@
[gd_resource type="Theme" load_steps=98 format=2]
[gd_resource type="Theme" load_steps=99 format=2]
[ext_resource path="res://assets/ui/sci-fi-godot-theme/Pixel Square 10.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://assets/ui/sci-fi-godot-theme/sci-fi.png" type="Texture" id=2]
@ -367,6 +367,14 @@ margin_right = 16.0
margin_top = 16.0
margin_bottom = 17.0
[sub_resource type="StyleBoxTexture" id=95]
texture = ExtResource( 2 )
region_rect = Rect2( 1, 49, 46, 46 )
margin_left = 15.0
margin_right = 16.0
margin_top = 16.0
margin_bottom = 17.0
[sub_resource type="DynamicFont" id=92]
size = 8
extra_spacing_top = 1
@ -749,6 +757,7 @@ OptionButton/styles/pressed = SubResource( 53 )
Panel/styles/panel = SubResource( 55 )
Panel2/base_type = "Panel"
Panel2/styles/panel = SubResource( 94 )
PanelContainer/styles/panel = SubResource( 95 )
PopupMenu/colors/font_color = Color( 0.88, 0.88, 0.88, 1 )
PopupMenu/colors/font_color_accel = Color( 0.7, 0.7, 0.7, 0.8 )
PopupMenu/colors/font_color_disabled = Color( 0.4, 0.4, 0.4, 0.8 )

View File

@ -115,16 +115,13 @@ drag_margin_bottom = 0.3
[node name="Blobby" parent="." instance=ExtResource( 8 )]
unique_name_in_owner = true
position = Vector2( 1070, -51 )
position = Vector2( -134, 108 )
scale = Vector2( 0.878906, 0.936025 )
mass = null
jump_buffer_filled = null
death_sound_1 = null
death_sound_2 = null
[node name="BlobbySprite" parent="Blobby" index="5"]
frame = 6
[node name="BlobbymationTree" parent="Blobby/BlobbySprite" index="0"]
parameters/playback = SubResource( 6 )

View File

@ -123,6 +123,9 @@ jump_buffer_filled = null
death_sound_1 = null
death_sound_2 = null
[node name="BlobbySprite" parent="Blobby" index="5"]
frame = 10
[node name="BlobbymationTree" parent="Blobby/BlobbySprite" index="0"]
parameters/playback = SubResource( 6 )
@ -156,15 +159,16 @@ position = Vector2( 289, 203 )
next_scene = "res://src/Levels/Actual Level 1.tscn"
[node name="FlyingLaserCutter2" parent="." instance=ExtResource( 13 )]
position = Vector2( 420, -240 )
position = Vector2( 413, -240 )
avoid_crushing = true
[node name="FlyingLaserCutter3" parent="." instance=ExtResource( 13 )]
position = Vector2( 340, -256 )
position = Vector2( 339, -256 )
rotation = 3.14159
avoid_crushing = true
[node name="FlyingLaserCutter" parent="." instance=ExtResource( 13 )]
position = Vector2( 0, -3 )
rotation = 1.57079
[node name="ElevatorButton" parent="." instance=ExtResource( 5 )]

View File

@ -4,7 +4,7 @@ class_name LevelTemplate
export(String, FILE) var level_music = "res://assets/music/A Hearty Fellow (LOOP).wav"
export(float) var level_music_attenuation = -20
export(String, FILE) var level_ambiance = "res://assets/sounds/AMBIENCE_SciFi_Large_Space_Hangar_Deep_Smooth_loop_stereo.wav"
export(float) var level_ambiance_attenuation = -20
export(float) var level_ambiance_attenuation = -23
onready var signal_manager := $"%SignalManager"
onready var level_state := $"%LevelState"

View File

@ -15,7 +15,7 @@ func _ready() -> void:
$Area2D.add_to_group("harmful")
$Sprite/AnimationPlayer.play("armed")
func _on_Area2D_area_exited(area: Area2D) -> void:
func _on_Area2D_area_exited(_area: Area2D) -> void:
$Timer.start()

View File

@ -26,7 +26,7 @@ export(bool) var fast_retrigger = false
func _ready() -> void:
$FlyingLaserCutterBody/Sprite/AnimationPlayer.play("default")
func _process(delta: float) -> void:
func _process(_delta: float) -> void:
update_trigger_ray_shader()
func _physics_process(delta: float) -> void:

View File

@ -22,7 +22,7 @@ tracks/0/keys = {
}
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 11.4921, 11.9129 )
extents = Vector2( 11.5, 12 )
[sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 3.067, 10 )
@ -74,7 +74,6 @@ shader_param/oscilation_speed = 0.2
script = ExtResource( 2 )
[node name="FlyingLaserCutterBody" type="KinematicBody2D" parent="."]
position = Vector2( 4, 0 )
collision_layer = 32
collision_mask = 57
collision/safe_margin = 0.001
@ -84,7 +83,6 @@ motion/sync_to_physics = true
texture = ExtResource( 1 )
hframes = 5
vframes = 5
frame = 4
__meta__ = {
"_editor_description_": "YXNlcHJpdGVfd2l6YXJkX2NvbmZpZwpwbGF5ZXJ8PUZseWluZ0xhc2VyQ3V0dGVyQm9keS9TcHJpdGUvQW5pbWF0aW9uUGxheWVyCnNvdXJjZXw9cmVzOi8vYXNzZXRzL2NvbnRyYXB0aW9uL0ZseWluZ0xhc2VyQ3V0dGVyLmFzZXByaXRlCmxheWVyfD0Kb3BfZXhwfD1GYWxzZQpvX2ZvbGRlcnw9Cm9fbmFtZXw9Cm9ubHlfdmlzaWJsZXw9RmFsc2UKb19leF9wfD0K"
}
@ -93,7 +91,6 @@ __meta__ = {
anims/default = SubResource( 2 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="FlyingLaserCutterBody"]
position = Vector2( -0.461, 0 )
shape = SubResource( 3 )
[node name="LaserArea" type="Area2D" parent="FlyingLaserCutterBody" groups=["harmful"]]

View File

@ -41,7 +41,7 @@ resource_name = "LowPassFilter"
cutoff_hz = 3000.0
[resource]
bus/0/volume_db = inf_neg
bus/0/volume_db = -6.0206
bus/1/name = "Music"
bus/1/solo = false
bus/1/mute = false

View File

@ -16,7 +16,7 @@ func _ready():
signal_manager.connect("terminal_activated", self, "start_timer")
update_interface()
func _process(delta):
func _process(_delta):
if hud_timer.visible:
time_label.text = String(round($GetBackTimer/Timer.time_left))
signal_manager.emit_signal("remaining_time_changed", $GetBackTimer/Timer.time_left)

View File

@ -4,41 +4,41 @@ signal key_selected(scancode)
var prev_focus
func _ready() -> void:
set_process_input(false)
func _process(delta: float) -> void:
$Prompt2.text = ("(ESC to cancel or wait: %s" % round($Timer.time_left)) + " sec)"
set_process_input(false)
func _process(_delta: float) -> void:
$Prompt2.text = ("(ESC to cancel or wait: %s" % round($Timer.time_left)) + " sec)"
func _input(event: InputEvent) -> void:
if !self.visible || !event.is_pressed():
return
# TODO Static quit button esc
if "scancode" in event && event.scancode == 16777217:
event = null
accept_event()
get_tree().set_input_as_handled()
emit_signal("key_selected", event)
close()
if !self.visible || !event.is_pressed():
return
# TODO Static quit button esc
if "scancode" in event && event.scancode == 16777217:
event = null
accept_event()
get_tree().set_input_as_handled()
emit_signal("key_selected", event)
close()
func open():
show()
$Timer.start()
prev_focus = get_focus_owner()
self.grab_focus()
set_process_input(true)
$"..".block_ui_cancel = true
show()
$Timer.start()
prev_focus = get_focus_owner()
self.grab_focus()
set_process_input(true)
$"..".block_ui_cancel = true
func close():
hide()
$Timer.stop()
self.release_focus()
prev_focus.grab_focus()
set_process_input(false)
hide()
$Timer.stop()
self.release_focus()
prev_focus.grab_focus()
set_process_input(false)
func close_on_timeout():
hide()
self.release_focus()
prev_focus.grab_focus()
set_process_input(false)
emit_signal("key_selected", null)
$"..".block_ui_cancel = false
hide()
self.release_focus()
prev_focus.grab_focus()
set_process_input(false)
emit_signal("key_selected", null)
$"..".block_ui_cancel = false

View File

@ -144,12 +144,15 @@ margin_left = -120.0
margin_top = -85.0
margin_right = 192.0
margin_bottom = 50.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Buttons" type="VBoxContainer" parent="MenuContainer"]
margin_right = 154.0
margin_bottom = 135.0
focus_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="PlayButton" type="Button" parent="MenuContainer/Buttons"]
unique_name_in_owner = true
@ -197,7 +200,7 @@ margin_bottom = 135.0
focus_neighbour_top = NodePath("../Audio")
focus_neighbour_bottom = NodePath("../PlayButton")
[node name="Panel" type="Panel" parent="MenuContainer"]
[node name="Panel" type="PanelContainer" parent="MenuContainer"]
margin_left = 158.0
margin_right = 312.0
margin_bottom = 135.0
@ -208,14 +211,10 @@ size_flags_vertical = 3
theme = ExtResource( 13 )
[node name="LevelList" type="ScrollContainer" parent="MenuContainer/Panel"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -65.0
margin_top = -54.5
margin_right = 65.0
margin_bottom = 55.5
margin_left = 15.0
margin_top = 16.0
margin_right = 138.0
margin_bottom = 118.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
@ -226,17 +225,18 @@ scroll_horizontal_enabled = false
script = ExtResource( 11 )
[node name="VBoxContainer" type="VBoxContainer" parent="MenuContainer/Panel/LevelList"]
margin_right = 130.0
margin_bottom = 110.0
margin_right = 123.0
margin_bottom = 102.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
alignment = 1
[node name="InvisibleCunt" type="CheckBox" parent="MenuContainer/Panel/LevelList/VBoxContainer"]
visible = false
margin_right = 130.0
margin_bottom = 110.0
margin_right = 216.0
margin_bottom = 102.0
grow_horizontal = 2
grow_vertical = 2
focus_neighbour_left = NodePath("../../../../Buttons/PlayButton")