1
0
Fork 0
mirror of https://github.com/tonytins/dressupzack synced 2025-06-26 08:34:43 -04:00

Classic Mode

This commit is contained in:
Anthony Wilcox 2019-01-04 19:00:35 -05:00
parent 55e34d7c78
commit f5b0b0ec06
19 changed files with 1307 additions and 473 deletions

View file

@ -3,22 +3,26 @@
extends Control
func _on_AboutBtn_pressed():
$AboutWin.show()
func _on_CreditsBtn_pressed():
$CreditsWin.show()
$WinDialogs/AboutWin.show()
func _on_SettingsBtn_pressed():
$SettingsWin.show()
func _on_LicenseBtn_pressed():
$LicenseWin.show()
func _on_CloseAbtBtn_pressed():
$AboutWin.hide()
$WinDialogs/SettingsWin.show()
func _on_MusicBtn_toggled(button_pressed):
if button_pressed == true:
$Music.playing = true
else:
$Music.playing = false
$Music.playing = false
func _on_ClassicBtn_pressed():
if $Music.playing == true:
$Music.playing = false
get_tree().change_scene("res://ClassicScreen.tscn")
func _on_ModernBtn_pressed():
if $Music.playing == true:
$Music.playing = false
get_tree().change_scene("res://GameScreen.tscn")

12
project/src/WinDialogs.gd Normal file
View file

@ -0,0 +1,12 @@
# Anthony Wilcox licenses this file to you under the GPL license.
# See the LICENSE file in the project root for more information.
extends Control
func _on_CreditsBtn_pressed():
$CreditsWin.show()
func _on_LicenseBtn_pressed():
$SettingsWin.show()
func _on_CloseAbtBtn_pressed():
$AboutWin.hide()

View file

@ -1,43 +0,0 @@
# Anthony Wilcox licenses this file to you under the GPL license.
# See the LICENSE file in the project root for more information.
tool
extends Control
const DEFUALT_CONTENT_HEIGHT = 217
const DEFUALT_PANEL_SIZE = Vector2(351, 217)
export var toolbar_title = ""
export var content_text = ""
export var content_height = DEFUALT_CONTENT_HEIGHT
var drag_pos = null
func _ready():
if toolbar_title and content_text != "":
$WindowFrame/TitleBarFrame/TitleBar/TitleLbl.text = toolbar_title
$WindowFrame/ContentFrame/ContentTxt.bbcode_text = content_text
if $WindowFrame/ContentFrame/ContentPanel.rect_size <= DEFUALT_PANEL_SIZE:
$WindowFrame/ContentFrame/ContentPanel.rect_size = Vector2(351, content_height)
$WindowFrame.rect_size = Vector2(351, 33 + content_height)
else:
$WindowFrame/ContentFrame/ContentPanel.rect_size = DEFUALT_PANEL_SIZE
update()
func _on_TitleBar_gui_input(ev):
if ev is InputEventMouseButton:
if ev.button_index == BUTTON_LEFT:
if ev.pressed:
drag_pos = get_global_mouse_position() - rect_global_position
else:
drag_pos = null
if ev is InputEventMouseMotion and drag_pos != null:
rect_global_position = get_global_mouse_position() - drag_pos
func _on_CloseBtn_pressed():
hide()
queue_free()