Added rules
This commit is contained in:
parent
b42b1ae39f
commit
0385858d4f
10 changed files with 423 additions and 85 deletions
|
|
@ -3,6 +3,8 @@ extends Control
|
|||
@onready var panel_container = $PanelContainer
|
||||
@onready var margin_container2 = $Pivot/MarginContainer
|
||||
|
||||
@onready var line_edit = $Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/General/MarginContainer/General/VBoxContainer/LineEdit
|
||||
|
||||
var mat: ShaderMaterial
|
||||
|
||||
func show_panel() -> void:
|
||||
|
|
@ -19,6 +21,8 @@ func show_panel() -> void:
|
|||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
mat = panel_container.material.duplicate()
|
||||
|
||||
line_edit.text = GameSettings.LOBBY_ENDPOINT
|
||||
pass # Replace with function body.
|
||||
|
||||
func tween_blur(val: float) -> void:
|
||||
|
|
@ -39,3 +43,31 @@ func _on_panel_hidden() -> void:
|
|||
|
||||
func _on_cancel_pressed():
|
||||
hide_panel()
|
||||
|
||||
|
||||
func _on_reset_lobby_url_button_pressed():
|
||||
line_edit = GameSettings.DEFAULT_LOBBY_ENDPOINT
|
||||
GameSettings.LOBBY_ENDPOINT = GameSettings.DEFAULT_LOBBY_ENDPOINT
|
||||
|
||||
|
||||
func _on_line_edit_text_changed(new_text):
|
||||
GameSettings.LOBBY_ENDPOINT = new_text
|
||||
|
||||
|
||||
func _on_rich_text_label_meta_clicked(meta):
|
||||
OS.shell_open(str(meta))
|
||||
|
||||
|
||||
func _on_line_edit_toggled(toggled_on):
|
||||
GameSettings.dof_blur_changed.emit(toggled_on)
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_camera_rotation_speed_value_changed(value):
|
||||
GameSettings.camera_rotation_speed = value
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_camera_movement_speed_value_changed(value):
|
||||
GameSettings.camera_movement_speed = value
|
||||
pass # Replace with function body.
|
||||
|
|
|
|||
|
|
@ -62,8 +62,10 @@ layout_mode = 2
|
|||
[node name="TabContainer" type="TabContainer" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
current_tab = 2
|
||||
|
||||
[node name="General" type="PanelContainer" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/General"]
|
||||
|
|
@ -88,12 +90,19 @@ text = "Lobby Server URL"
|
|||
[node name="LineEdit" type="LineEdit" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/General/MarginContainer/General/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "wss://dev.bytesandpieces.xyz:9088"
|
||||
|
||||
[node name="Button" type="Button" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/General/MarginContainer/General/VBoxContainer"]
|
||||
[node name="ResetLobbyURLButton" type="Button" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/General/MarginContainer/General/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(200, 0)
|
||||
layout_mode = 2
|
||||
text = "Reset to default"
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/General/MarginContainer/General"]
|
||||
layout_mode = 2
|
||||
bbcode_enabled = true
|
||||
text = "The lobby server is hosted on my dev server. In case it is not reachable, you may host your own instance via: [url]https://github.com/Sch1nken/GodotFlowfield[/url]"
|
||||
fit_content = true
|
||||
|
||||
[node name="Graphics" type="PanelContainer" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
|
@ -120,9 +129,9 @@ text = "Depth of Field Blur"
|
|||
[node name="LineEdit" type="CheckButton" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/Graphics/MarginContainer/General/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
button_pressed = true
|
||||
|
||||
[node name="Controls" type="PanelContainer" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/Controls"]
|
||||
|
|
@ -144,9 +153,33 @@ custom_minimum_size = Vector2(200, 0)
|
|||
layout_mode = 2
|
||||
text = "Camera Rotation Speed"
|
||||
|
||||
[node name="SpinBox" type="SpinBox" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/Controls/MarginContainer/General/VBoxContainer"]
|
||||
[node name="CameraRotationSpeed" type="SpinBox" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/Controls/MarginContainer/General/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
min_value = 1.0
|
||||
max_value = 50.0
|
||||
value = 5.0
|
||||
allow_greater = true
|
||||
allow_lesser = true
|
||||
alignment = 2
|
||||
|
||||
[node name="VBoxContainer2" type="HBoxContainer" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/Controls/MarginContainer/General"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 15
|
||||
|
||||
[node name="Label" type="Label" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/Controls/MarginContainer/General/VBoxContainer2"]
|
||||
custom_minimum_size = Vector2(200, 0)
|
||||
layout_mode = 2
|
||||
text = "Camera Move Speed"
|
||||
|
||||
[node name="CameraMovementSpeed" type="SpinBox" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/Controls/MarginContainer/General/VBoxContainer2"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
min_value = 10.0
|
||||
max_value = 2000.0
|
||||
value = 200.0
|
||||
allow_greater = true
|
||||
allow_lesser = true
|
||||
alignment = 2
|
||||
|
||||
[node name="VBoxContainer" type="HBoxContainer" parent="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
|
||||
|
|
@ -162,4 +195,10 @@ layout_mode = 2
|
|||
size_flags_horizontal = 3
|
||||
text = "Cancel"
|
||||
|
||||
[connection signal="text_changed" from="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/General/MarginContainer/General/VBoxContainer/LineEdit" to="." method="_on_line_edit_text_changed"]
|
||||
[connection signal="pressed" from="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/General/MarginContainer/General/VBoxContainer/ResetLobbyURLButton" to="." method="_on_reset_lobby_url_button_pressed"]
|
||||
[connection signal="meta_clicked" from="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/General/MarginContainer/General/RichTextLabel" to="." method="_on_rich_text_label_meta_clicked"]
|
||||
[connection signal="toggled" from="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/Graphics/MarginContainer/General/VBoxContainer/LineEdit" to="." method="_on_line_edit_toggled"]
|
||||
[connection signal="value_changed" from="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/Controls/MarginContainer/General/VBoxContainer/CameraRotationSpeed" to="." method="_on_camera_rotation_speed_value_changed"]
|
||||
[connection signal="value_changed" from="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/TabContainer/Controls/MarginContainer/General/VBoxContainer2/CameraMovementSpeed" to="." method="_on_camera_movement_speed_value_changed"]
|
||||
[connection signal="pressed" from="Pivot/MarginContainer/PanelContainer/MarginContainer/VBoxContainer/VBoxContainer/Cancel" to="." method="_on_cancel_pressed"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue