aboutsummaryrefslogtreecommitdiff
path: root/client/menu
diff options
context:
space:
mode:
Diffstat (limited to 'client/menu')
-rw-r--r--client/menu/blur_mix.gdshader4
-rw-r--r--client/menu/game.gd10
-rw-r--r--client/menu/game.tscn20
-rw-r--r--client/menu/grayscale.gdshader8
-rw-r--r--client/menu/lobby.gd1
-rw-r--r--client/menu/menu_background.gdshader20
-rw-r--r--client/menu/popup_message.gd5
-rw-r--r--client/menu/popup_message.tscn4
-rw-r--r--client/menu/setup.tscn2
9 files changed, 53 insertions, 21 deletions
diff --git a/client/menu/blur_mix.gdshader b/client/menu/blur_mix.gdshader
index 668ef57d..706903d5 100644
--- a/client/menu/blur_mix.gdshader
+++ b/client/menu/blur_mix.gdshader
@@ -23,6 +23,6 @@ uniform vec4 color_over: source_color;
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
void fragment() {
- vec4 blurred = textureLod(SCREEN_TEXTURE, SCREEN_UV, blur_amount);
- COLOR = mix(blurred, color_over, mix_amount);
+ vec4 blurred = textureLod(SCREEN_TEXTURE, SCREEN_UV, blur_amount);
+ COLOR = mix(blurred, color_over, mix_amount);
} \ No newline at end of file
diff --git a/client/menu/game.gd b/client/menu/game.gd
index 362bf169..78c01c42 100644
--- a/client/menu/game.gd
+++ b/client/menu/game.gd
@@ -16,6 +16,10 @@
#
extends Menu
+@onready var debug_label = $Debug
+@onready var overlay = $Overlay
+@onready var popup_message: PopupMessage = $PopupMessage
+
func _ready():
get_tree().get_root().connect("go_back_requested", open_ingame_menu)
super()
@@ -24,6 +28,12 @@ func _input(_event):
if Input.is_action_just_pressed("ui_menu"):
open_ingame_menu()
+func _process(delta):
+ if Global.get_setting("debug_info"):
+ debug_label.show()
+ debug_label.text = "%d FPS" % Engine.get_frames_per_second()
+ else: debug_label.hide()
+
func open_ingame_menu():
if popup != null: return
Sound.play_click()
diff --git a/client/menu/game.tscn b/client/menu/game.tscn
index af7f22a8..417aaf96 100644
--- a/client/menu/game.tscn
+++ b/client/menu/game.tscn
@@ -1,8 +1,10 @@
-[gd_scene load_steps=4 format=3 uid="uid://bbjwoxs71fnsk"]
+[gd_scene load_steps=6 format=3 uid="uid://bbjwoxs71fnsk"]
[ext_resource type="Script" path="res://menu/game.gd" id="1_cdpsh"]
[ext_resource type="PackedScene" uid="uid://c6krh36hoqfg8" path="res://game.tscn" id="2_uojcy"]
+[ext_resource type="PackedScene" uid="uid://bpikve6wlsjfl" path="res://menu/overlay.tscn" id="3_i0ytb"]
[ext_resource type="PackedScene" uid="uid://bc50la65ntifb" path="res://menu/lobby.tscn" id="3_udxby"]
+[ext_resource type="PackedScene" uid="uid://b21nrnkygiyjt" path="res://menu/popup_message.tscn" id="5_n1wy0"]
[node name="GameMenu" type="Control"]
layout_mode = 3
@@ -16,5 +18,21 @@ auto_anim = false
[node name="Game" parent="." instance=ExtResource("2_uojcy")]
+[node name="Overlay" parent="." instance=ExtResource("3_i0ytb")]
+layout_mode = 1
+
[node name="Lobby" parent="." instance=ExtResource("3_udxby")]
layout_mode = 1
+
+[node name="Debug" type="RichTextLabel" parent="."]
+visible = false
+layout_mode = 1
+anchors_preset = 15
+anchor_right = 1.0
+anchor_bottom = 1.0
+grow_horizontal = 2
+grow_vertical = 2
+mouse_filter = 1
+
+[node name="PopupMessage" parent="." instance=ExtResource("5_n1wy0")]
+layout_mode = 1
diff --git a/client/menu/grayscale.gdshader b/client/menu/grayscale.gdshader
index 7c11b777..cc132c54 100644
--- a/client/menu/grayscale.gdshader
+++ b/client/menu/grayscale.gdshader
@@ -18,8 +18,8 @@
shader_type canvas_item;
void fragment() {
- float brightness = 0.2126 * COLOR.r + 0.7152 * COLOR.g + 0.0722 * COLOR.b;
- brightness = (brightness - .5) * 2.;
- COLOR.rgb = vec3(brightness);
- COLOR.a *= 1. - brightness;
+ float brightness = 0.2126 * COLOR.r + 0.7152 * COLOR.g + 0.0722 * COLOR.b;
+ brightness = (brightness - .5) * 2.;
+ COLOR.rgb = vec3(brightness);
+ COLOR.a *= 1. - brightness;
}
diff --git a/client/menu/lobby.gd b/client/menu/lobby.gd
index ae7548b7..3c4a6f58 100644
--- a/client/menu/lobby.gd
+++ b/client/menu/lobby.gd
@@ -15,6 +15,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
extends Control
+class_name Lobby
const PLAYER = preload("res://menu/lobby/player.tscn")
diff --git a/client/menu/menu_background.gdshader b/client/menu/menu_background.gdshader
index 763c7b42..e6365dfa 100644
--- a/client/menu/menu_background.gdshader
+++ b/client/menu/menu_background.gdshader
@@ -22,14 +22,14 @@ uniform vec3 ccloud : source_color;
uniform vec3 csky : source_color;
void fragment() {
- vec2 uv = UV * 0.9;
- uv += TIME * vec2(0.001,0.002);
-
- float f = texture(noise, uv).x;
- f = 1. - f;
- f = pow(f, 1.5);
- f = floor(f*5.)/5.;
- f = pow(f, 2.);
-
- ALBEDO = mix(csky, ccloud, f);
+ vec2 uv = UV * 0.9;
+ uv += TIME * vec2(0.001,0.002);
+
+ float f = texture(noise, uv).x;
+ f = 1. - f;
+ f = pow(f, 1.5);
+ f = floor(f*5.)/5.;
+ f = pow(f, 2.);
+
+ ALBEDO = mix(csky, ccloud, f);
}
diff --git a/client/menu/popup_message.gd b/client/menu/popup_message.gd
index 1748f59a..2d707289 100644
--- a/client/menu/popup_message.gd
+++ b/client/menu/popup_message.gd
@@ -32,7 +32,7 @@ var is_joined := false
@onready var reset_timer = $Reset
-@onready var game: Game = get_parent()
+@onready var game: Game = $"../Game"
func _ready():
game.joined.connect(
@@ -112,7 +112,8 @@ func _on_move_timeout():
func _on_interact_timeout():
if not Global.get_hint("has_interacted") and not Global.get_setting("touch_controls"):
- display_hint_msg(tr("Press %s to pick up items and interact with tools") % display_keybind(tr("SPACE"), "A"))
+ var keybind = display_keybind(tr("SPACE"), "A")
+ display_hint_msg(tr("Press %s to pick up items and hold %s to interact with tools") % [keybind, keybind])
func _on_reset_timeout():
if not Global.get_hint("has_reset") and not Global.get_setting("touch_controls"):
diff --git a/client/menu/popup_message.tscn b/client/menu/popup_message.tscn
index fd98285d..b83d15a0 100644
--- a/client/menu/popup_message.tscn
+++ b/client/menu/popup_message.tscn
@@ -111,7 +111,7 @@ one_shot = true
[node name="AutoHintTimers" type="Node" parent="."]
[node name="Move" type="Timer" parent="AutoHintTimers"]
-wait_time = 5.0
+wait_time = 2.0
one_shot = true
[node name="Boost" type="Timer" parent="AutoHintTimers"]
@@ -119,7 +119,7 @@ wait_time = 90.0
one_shot = true
[node name="Interact" type="Timer" parent="AutoHintTimers"]
-wait_time = 20.0
+wait_time = 15.0
one_shot = true
[node name="RotateCamera" type="Timer" parent="AutoHintTimers"]
diff --git a/client/menu/setup.tscn b/client/menu/setup.tscn
index 5ef6a260..04064966 100644
--- a/client/menu/setup.tscn
+++ b/client/menu/setup.tscn
@@ -91,6 +91,8 @@ layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
+offset_right = 1152.0
+offset_bottom = 648.0
grow_horizontal = 2
grow_vertical = 2
follow_focus = true