mirror of
https://gitlab.com/open-fpsz/open-fpsz.git
synced 2026-07-12 15:04:46 +00:00
♻️ systems refactoring
This commit is contained in:
parent
5ab387571e
commit
69c8b65093
17 changed files with 186 additions and 168 deletions
45
interfaces/menus/boot/boot.gd
Normal file
45
interfaces/menus/boot/boot.gd
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
class_name BootMenu extends CanvasLayer
|
||||
|
||||
signal start_demo
|
||||
|
||||
func _on_demo_pressed() -> void:
|
||||
start_demo.emit()
|
||||
|
||||
func _on_multiplayer_pressed() -> void:
|
||||
$MultiplayerPanelContainer.hide()
|
||||
$MultiplayerPanelContainer.tab_container.current_tab = 0
|
||||
$SettingsPanelContainer.hide()
|
||||
$MainPanelContainer.hide()
|
||||
$MultiplayerPanelContainer.show()
|
||||
show()
|
||||
|
||||
func _on_settings_pressed() -> void:
|
||||
$MultiplayerPanelContainer.hide()
|
||||
$MultiplayerPanelContainer.tab_container.current_tab = 0
|
||||
$SettingsPanelContainer.show()
|
||||
$MainPanelContainer.hide()
|
||||
show()
|
||||
|
||||
func _on_quit_pressed() -> void:
|
||||
get_tree().quit()
|
||||
|
||||
func _on_main_menu_pressed() -> void:
|
||||
$MultiplayerPanelContainer.hide()
|
||||
$MultiplayerPanelContainer.tab_container.current_tab = 0
|
||||
$SettingsPanelContainer.hide()
|
||||
$MainPanelContainer.show()
|
||||
show()
|
||||
|
|
@ -1,56 +1,8 @@
|
|||
[gd_scene load_steps=28 format=3 uid="uid://bjctlqvs33nqy"]
|
||||
|
||||
[ext_resource type="Script" path="res://interfaces/menus/boot/boot.gd" id="1_6acql"]
|
||||
[ext_resource type="Texture2D" uid="uid://c1tjamjm8qjog" path="res://interfaces/menus/boot/background.webp" id="1_ph586"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_jd8xf"]
|
||||
resource_name = "MainMenu"
|
||||
script/source = "# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
class_name BootMenu extends CanvasLayer
|
||||
|
||||
signal start_demo
|
||||
|
||||
func _on_demo_pressed() -> void:
|
||||
start_demo.emit()
|
||||
|
||||
func _on_multiplayer_pressed() -> void:
|
||||
$MultiplayerPanelContainer.hide()
|
||||
$MultiplayerPanelContainer.tab_container.current_tab = 0
|
||||
$SettingsPanelContainer.hide()
|
||||
$MainPanelContainer.hide()
|
||||
$MultiplayerPanelContainer.show()
|
||||
show()
|
||||
|
||||
func _on_settings_pressed() -> void:
|
||||
$MultiplayerPanelContainer.hide()
|
||||
$MultiplayerPanelContainer.tab_container.current_tab = 0
|
||||
$SettingsPanelContainer.show()
|
||||
$MainPanelContainer.hide()
|
||||
show()
|
||||
|
||||
func _on_quit_pressed() -> void:
|
||||
get_tree().quit()
|
||||
|
||||
func _on_main_menu_pressed() -> void:
|
||||
$MultiplayerPanelContainer.hide()
|
||||
$MultiplayerPanelContainer.tab_container.current_tab = 0
|
||||
$SettingsPanelContainer.hide()
|
||||
$MainPanelContainer.show()
|
||||
show()
|
||||
"
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_krqeq"]
|
||||
bg_color = Color(0.501961, 0.501961, 0.501961, 0.25098)
|
||||
|
||||
|
|
@ -1052,7 +1004,7 @@ bg_color = Color(0, 0, 0, 0)
|
|||
bg_color = Color(0, 0.5, 0.5, 0.2)
|
||||
|
||||
[node name="BootMenu" type="CanvasLayer"]
|
||||
script = SubResource("GDScript_jd8xf")
|
||||
script = ExtResource("1_6acql")
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
anchors_preset = 15
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue