open-fpsz/interfaces/menus/boot/boot.gd
2024-05-08 10:25:06 -04:00

45 lines
1.4 KiB
GDScript

# 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()