mirror of
https://github.com/tonytins/dressupzack
synced 2025-06-26 08:34:43 -04:00
Window.tscn was renamed to MainScreen.tscn
- New Credits window and it's respective button - Renamed panel_height to content_height - Window content text now supports BBCode - Made sure the content height doesn't exceed 216 pixels - GPL license notice now included in the about window - SixAM splash screen
This commit is contained in:
parent
e5db016ba1
commit
fbc7ad5c0f
14 changed files with 160 additions and 28 deletions
|
@ -2,6 +2,7 @@ extends Control
|
|||
|
||||
onready var coming_soon_win = preload("res://windows/ComingSoon.tscn")
|
||||
onready var about_win = preload("res://windows/About.tscn")
|
||||
onready var credits_win = preload("res://windows/Credits.tscn")
|
||||
|
||||
func _on_ScreenshotBtn_pressed():
|
||||
var win_instance = coming_soon_win.instance()
|
||||
|
@ -10,3 +11,8 @@ func _on_ScreenshotBtn_pressed():
|
|||
func _on_AboutBtn_pressed():
|
||||
var win_instance = about_win.instance()
|
||||
add_child(win_instance)
|
||||
|
||||
|
||||
func _on_CreditsBtn_pressed():
|
||||
var win_instance = credits_win.instance()
|
||||
add_child(win_instance)
|
||||
|
|
4
src/Splash.gd
Normal file
4
src/Splash.gd
Normal file
|
@ -0,0 +1,4 @@
|
|||
extends Node
|
||||
|
||||
func _on_Timer_timeout():
|
||||
get_tree().change_scene("res://MainScreen.tscn")
|
|
@ -1,20 +1,27 @@
|
|||
extends Control
|
||||
|
||||
export var toolbar_title = "New Window"
|
||||
const DEFUALT_CONTENT_HEIGHT = 216
|
||||
const DEFUALT_PANEL_SIZE = Vector2(351, 216)
|
||||
|
||||
export var toolbar_title = ""
|
||||
export var content_text = ""
|
||||
export var panel_height = 216
|
||||
export var content_height = DEFUALT_CONTENT_HEIGHT
|
||||
|
||||
var drag_pos = null
|
||||
|
||||
func _ready():
|
||||
$WindowFrame/TitleBarFrame/TitleBar/TitleLbl.text = toolbar_title
|
||||
$WindowFrame/ContentFrame/ContentTxt.text = content_text
|
||||
$WindowFrame/ContentFrame/ContentPanel.rect_size = Vector2(350, panel_height)
|
||||
$WindowFrame.rect_size = Vector2(351, 31 + panel_height)
|
||||
update()
|
||||
if toolbar_title and content_text != "":
|
||||
$WindowFrame/TitleBarFrame/TitleBar/TitleLbl.text = toolbar_title
|
||||
$WindowFrame/ContentFrame/ContentTxt.bbcode_text = content_text
|
||||
|
||||
func _process(delta):
|
||||
pass
|
||||
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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue