Client settings fix
This commit is contained in:
parent
f5f93104fc
commit
7aaa676f32
4 changed files with 27 additions and 34 deletions
|
|
@ -21,6 +21,7 @@ PlayerGlobal="*res://scripts/player/player_global.gd"
|
|||
Lobby="*res://scripts/multiplayer/lobby.gd"
|
||||
Session="*res://scripts/multiplayer/session.gd"
|
||||
ClientSettings="*res://scripts/client_settings.gd"
|
||||
ClientSettingsMenu="res://scenes/gui/client_settings.tscn"
|
||||
|
||||
[display]
|
||||
|
||||
|
|
|
|||
|
|
@ -2,29 +2,29 @@
|
|||
|
||||
[ext_resource type="Script" uid="uid://ddi1alk8oyi1b" path="res://scripts/gui/client_settings_menu.gd" id="1_xqyus"]
|
||||
|
||||
[node name="ClientSettings" type="PanelContainer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
[node name="ClientSettingsMenu" type="CanvasLayer"]
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="."]
|
||||
visible = false
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
script = ExtResource("1_xqyus")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="FullscreenButton" type="CheckButton" parent="VBoxContainer"]
|
||||
[node name="FullscreenButton" type="CheckButton" parent="PanelContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Полный экран"
|
||||
|
||||
[node name="Sensitivity" type="HBoxContainer" parent="VBoxContainer"]
|
||||
[node name="Sensitivity" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/Sensitivity"]
|
||||
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/Sensitivity"]
|
||||
layout_mode = 2
|
||||
text = "Чувствительность"
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="VBoxContainer/Sensitivity"]
|
||||
[node name="HSlider" type="HSlider" parent="PanelContainer/VBoxContainer/Sensitivity"]
|
||||
custom_minimum_size = Vector2(256, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
|
@ -33,7 +33,7 @@ max_value = 0.1
|
|||
step = 0.001
|
||||
value = 0.02
|
||||
|
||||
[node name="SpinBox" type="SpinBox" parent="VBoxContainer/Sensitivity"]
|
||||
[node name="SpinBox" type="SpinBox" parent="PanelContainer/VBoxContainer/Sensitivity"]
|
||||
layout_mode = 2
|
||||
max_value = 0.1
|
||||
step = 0.001
|
||||
|
|
@ -41,21 +41,21 @@ value = 0.02
|
|||
allow_greater = true
|
||||
allow_lesser = true
|
||||
|
||||
[node name="GameplayMainAudio" type="HBoxContainer" parent="VBoxContainer"]
|
||||
[node name="GameplayMainAudio" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/GameplayMainAudio"]
|
||||
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/GameplayMainAudio"]
|
||||
layout_mode = 2
|
||||
text = "Геймплей"
|
||||
|
||||
[node name="GameplayMainSlider" type="HSlider" parent="VBoxContainer/GameplayMainAudio"]
|
||||
[node name="GameplayMainSlider" type="HSlider" parent="PanelContainer/VBoxContainer/GameplayMainAudio"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
max_value = 1.0
|
||||
step = 0.01
|
||||
value = 1.0
|
||||
|
||||
[connection signal="toggled" from="VBoxContainer/FullscreenButton" to="." method="_on_check_button_toggled"]
|
||||
[connection signal="value_changed" from="VBoxContainer/Sensitivity/HSlider" to="." method="_on_h_slider_value_changed"]
|
||||
[connection signal="value_changed" from="VBoxContainer/Sensitivity/SpinBox" to="." method="_on_spin_box_value_changed"]
|
||||
[connection signal="value_changed" from="VBoxContainer/GameplayMainAudio/GameplayMainSlider" to="." method="_on_gameplay_main_slider_value_changed"]
|
||||
[connection signal="toggled" from="PanelContainer/VBoxContainer/FullscreenButton" to="." method="_on_check_button_toggled"]
|
||||
[connection signal="value_changed" from="PanelContainer/VBoxContainer/Sensitivity/HSlider" to="." method="_on_h_slider_value_changed"]
|
||||
[connection signal="value_changed" from="PanelContainer/VBoxContainer/Sensitivity/SpinBox" to="." method="_on_spin_box_value_changed"]
|
||||
[connection signal="value_changed" from="PanelContainer/VBoxContainer/GameplayMainAudio/GameplayMainSlider" to="." method="_on_gameplay_main_slider_value_changed"]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=84 format=4 uid="uid://dpsr6ug3pkb40"]
|
||||
[gd_scene load_steps=83 format=4 uid="uid://dpsr6ug3pkb40"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://3dphlay25fih" path="res://scripts/player/player.gd" id="1_g2els"]
|
||||
[ext_resource type="Script" uid="uid://dalwlndejfdhm" path="res://scripts/player/crosshair.gd" id="3_dqkch"]
|
||||
|
|
@ -23,7 +23,6 @@
|
|||
[ext_resource type="Script" uid="uid://gan0amqbhi4i" path="res://scripts/gui/hud/player_ammo_display.gd" id="12_iortg"]
|
||||
[ext_resource type="Script" uid="uid://bala54fa32e35" path="res://scripts/gui/hud/player_round_display.gd" id="13_x73hv"]
|
||||
[ext_resource type="Script" uid="uid://bos7nftlx8tv3" path="res://scripts/gui/hud/player_round_time.gd" id="13_xar7t"]
|
||||
[ext_resource type="PackedScene" uid="uid://bv6ptrditssow" path="res://scenes/gui/client_settings.tscn" id="16_d267o"]
|
||||
[ext_resource type="AudioStream" uid="uid://bd4iofirvmiu6" path="res://audio/step_wood.ogg" id="16_fbysy"]
|
||||
[ext_resource type="Script" uid="uid://da0xv360va3b3" path="res://scripts/audio_system/multiplayer_audio_3d.gd" id="17_0cqlf"]
|
||||
[ext_resource type="Script" uid="uid://xsgfbuyje35p" path="res://scripts/player/player_pickup.gd" id="17_fjvrb"]
|
||||
|
|
@ -8717,18 +8716,6 @@ script = ExtResource("13_xar7t")
|
|||
layout_mode = 2
|
||||
script = ExtResource("13_x73hv")
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="HUD"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="ClientSettings" parent="HUD/CenterContainer" instance=ExtResource("16_d267o")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="PlayerPropertiesSync" type="MultiplayerSynchronizer" parent="."]
|
||||
replication_config = SubResource("SceneReplicationConfig_qhqgy")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
extends Control
|
||||
|
||||
var cached_mouse_state: Input.MouseMode
|
||||
|
||||
func _on_check_button_toggled(toggled_on: bool) -> void:
|
||||
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN if toggled_on else DisplayServer.WINDOW_MODE_WINDOWED)
|
||||
|
|
@ -17,7 +18,11 @@ func _on_spin_box_value_changed(value: float) -> void:
|
|||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("menu_settings"):
|
||||
visible = not visible
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE if visible else Input.MOUSE_MODE_CAPTURED
|
||||
if visible:
|
||||
cached_mouse_state = Input.mouse_mode
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||
else:
|
||||
Input.mouse_mode = cached_mouse_state
|
||||
|
||||
|
||||
func _on_gameplay_main_slider_value_changed(value: float) -> void:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue