mirror of
https://github.com/tonytins/dressupzack
synced 2025-06-26 08:34:43 -04:00
Moved sources to /project directory
- Replaced screenshot from Imgur with a local one
This commit is contained in:
parent
67747196b7
commit
7216c18d57
65 changed files with 4 additions and 5 deletions
22
project/src/Interface.gd
Normal file
22
project/src/Interface.gd
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Anthony Wilcox licenses this file to you under the GPL license.
|
||||
# See the LICENSE file in the project root for more information.
|
||||
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_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)
|
||||
|
||||
func _on_MusicBtn_toggled(button_pressed):
|
||||
if button_pressed == true:
|
||||
$Music.play()
|
||||
else:
|
||||
$Music.stop()
|
16
project/src/ItemDrag.gd
Normal file
16
project/src/ItemDrag.gd
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Anthony Wilcox licenses this file to you under the GPL license.
|
||||
# See the LICENSE file in the project root for more information.
|
||||
extends TextureButton
|
||||
|
||||
var item_pos = null
|
||||
|
||||
func _on_outfit_gui_input(ev):
|
||||
if ev is InputEventMouseButton:
|
||||
if ev.button_index == BUTTON_LEFT:
|
||||
if ev.pressed:
|
||||
item_pos = get_global_mouse_position() - rect_global_position
|
||||
else:
|
||||
item_pos = null
|
||||
|
||||
if ev is InputEventMouseMotion and item_pos != null:
|
||||
rect_global_position = get_global_mouse_position() - item_pos
|
43
project/src/WindowControl.gd
Normal file
43
project/src/WindowControl.gd
Normal file
|
@ -0,0 +1,43 @@
|
|||
# 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()
|
Loading…
Add table
Add a link
Reference in a new issue