# Duane's Dungeon - a rogue-like game # Copyright (C) 2023 Duane Robertson # state_title.gd - test title state # 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 . extends State class_name StateTitle var title:Label func _ready(): super() name = 'StateTitle' ################## # show_title() exit(StatePlay) ################## func input(event): if event is InputEventMouseButton and event.pressed: title.visible = false exit(StatePlay) func show_title(): var win_sz = get_parent().WIN_SIZE var labs = LabelSettings.new() title = Label.new() title.label_settings = labs labs.font_size = 80 title.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER title.vertical_alignment = VERTICAL_ALIGNMENT_CENTER title.size = win_sz title.text = 'Duane\'s Dungeon 4.x' add_child(title)