mirror of
https://github.com/tonytins/dressupzack
synced 2025-05-05 13:34:48 -04:00
Minor improvements, and code clean up
This commit is contained in:
parent
e90a500858
commit
25257f722d
4 changed files with 14 additions and 45 deletions
|
@ -73,14 +73,14 @@ ogg_vorbis={
|
|||
|
||||
ui_pause={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":11,"pressure":0.0,"pressed":false,"script":null)
|
||||
]
|
||||
}
|
||||
ui_cheats={
|
||||
"deadzone": 0.5,
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":false,"meta":true,"command":true,"pressed":false,"scancode":67,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":true,"command":true,"pressed":false,"scancode":88,"unicode":0,"echo":false,"script":null)
|
||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":false,"meta":true,"command":true,"pressed":false,"scancode":67,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":true,"command":true,"pressed":false,"scancode":88,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,6 @@ __meta__ = {
|
|||
position = Vector2( -33.7592, 99.4079 )
|
||||
scale = Vector2( 0.927713, 1 )
|
||||
frames = SubResource( 1 )
|
||||
frame = 2
|
||||
playing = true
|
||||
|
||||
[node name="Legs" type="Sprite" parent="Body"]
|
||||
|
@ -92,13 +91,13 @@ texture = ExtResource( 27 )
|
|||
[node name="Eyes" type="AnimatedSprite" parent="Body/Head"]
|
||||
position = Vector2( 17.6857, 4.22147 )
|
||||
frames = SubResource( 2 )
|
||||
frame = 1
|
||||
frame = 4
|
||||
playing = true
|
||||
|
||||
[node name="Mouth" type="AnimatedSprite" parent="Body/Head"]
|
||||
position = Vector2( 38.1195, 8.68453 )
|
||||
frames = SubResource( 3 )
|
||||
frame = 10
|
||||
frame = 2
|
||||
playing = true
|
||||
|
||||
[node name="Accessory" type="Sprite" parent="Body"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=17 format=2]
|
||||
[gd_scene load_steps=15 format=2]
|
||||
|
||||
[ext_resource path="res://scenes/Character.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://sprites/world/background.svg" type="Texture" id=2]
|
||||
|
@ -13,9 +13,7 @@
|
|||
[ext_resource path="res://sprites/symbols/file-download-disabled.svg" type="Texture" id=11]
|
||||
[ext_resource path="res://sprites/symbols/spinner.svg" type="Texture" id=12]
|
||||
[ext_resource path="res://scripts/spinner.gd" type="Script" id=13]
|
||||
[ext_resource path="res://sprites/symbols/newspaper.svg" type="Texture" id=15]
|
||||
[ext_resource path="res://scenes/NewsWin.tscn" type="PackedScene" id=16]
|
||||
[ext_resource path="res://sprites/symbols/newspaper-disabled.svg" type="Texture" id=17]
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
|
||||
|
@ -50,7 +48,7 @@ __meta__ = {
|
|||
"_edit_lock_": true,
|
||||
"_edit_use_anchors_": true
|
||||
}
|
||||
version = "1.10"
|
||||
version = "1.11"
|
||||
|
||||
[node name="Wardrobe" parent="Controls/Container" instance=ExtResource( 4 )]
|
||||
anchor_left = 0.33875
|
||||
|
@ -84,46 +82,30 @@ __meta__ = {
|
|||
}
|
||||
|
||||
[node name="ButtonCtr" type="HBoxContainer" parent="Controls/Container/CenterBtns"]
|
||||
margin_left = 157.0
|
||||
margin_left = 199.0
|
||||
margin_top = 7.0
|
||||
margin_right = 356.0
|
||||
margin_right = 314.0
|
||||
margin_bottom = 39.0
|
||||
custom_constants/separation = 20
|
||||
|
||||
[node name="NewsBtn" type="TextureButton" parent="Controls/Container/CenterBtns/ButtonCtr"]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 32.0
|
||||
hint_tooltip = "News"
|
||||
texture_normal = ExtResource( 15 )
|
||||
texture_disabled = ExtResource( 17 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": true
|
||||
}
|
||||
|
||||
[node name="VSeparator" type="VSeparator" parent="Controls/Container/CenterBtns/ButtonCtr"]
|
||||
margin_left = 60.0
|
||||
margin_right = 64.0
|
||||
margin_bottom = 32.0
|
||||
|
||||
[node name="ExportBtn" type="TextureButton" parent="Controls/Container/CenterBtns/ButtonCtr"]
|
||||
margin_left = 84.0
|
||||
margin_right = 109.0
|
||||
margin_right = 25.0
|
||||
margin_bottom = 32.0
|
||||
hint_tooltip = "Export"
|
||||
texture_normal = ExtResource( 7 )
|
||||
texture_disabled = ExtResource( 10 )
|
||||
|
||||
[node name="ImportBtn" type="TextureButton" parent="Controls/Container/CenterBtns/ButtonCtr"]
|
||||
margin_left = 129.0
|
||||
margin_right = 154.0
|
||||
margin_left = 45.0
|
||||
margin_right = 70.0
|
||||
margin_bottom = 32.0
|
||||
hint_tooltip = "Import"
|
||||
texture_normal = ExtResource( 9 )
|
||||
texture_disabled = ExtResource( 11 )
|
||||
|
||||
[node name="ClearBtn" type="TextureButton" parent="Controls/Container/CenterBtns/ButtonCtr"]
|
||||
margin_left = 174.0
|
||||
margin_right = 199.0
|
||||
margin_left = 90.0
|
||||
margin_right = 115.0
|
||||
margin_bottom = 32.0
|
||||
hint_tooltip = "Clear"
|
||||
texture_normal = ExtResource( 3 )
|
||||
|
@ -141,10 +123,8 @@ __meta__ = {
|
|||
}
|
||||
|
||||
[node name="NewsWin" parent="Controls/Container" instance=ExtResource( 16 )]
|
||||
visible = false
|
||||
|
||||
[connection signal="timeout" from="Controls/Container/Spinner/Timer" to="Controls/Container/Spinner" method="_on_Timer_timeout"]
|
||||
[connection signal="pressed" from="Controls/Container/CenterBtns/ButtonCtr/NewsBtn" to="Controls/Container" method="_on_NewsBtn_pressed"]
|
||||
[connection signal="pressed" from="Controls/Container/CenterBtns/ButtonCtr/ExportBtn" to="Character" method="_on_SaveBtn_pressed"]
|
||||
[connection signal="pressed" from="Controls/Container/CenterBtns/ButtonCtr/ImportBtn" to="Character" method="_on_LoadBtn_pressed"]
|
||||
[connection signal="pressed" from="Controls/Container/CenterBtns/ButtonCtr/ClearBtn" to="Character" method="_on_clearBtn_pressed"]
|
||||
|
|
|
@ -11,8 +11,6 @@ onready var base_bottom = preload("res://sprites/character/character_base_legs.s
|
|||
|
||||
onready var export_btn = $CenterBtns/ButtonCtr/ExportBtn
|
||||
onready var import_btn = $CenterBtns/ButtonCtr/ImportBtn
|
||||
onready var news_win = $NewsWin
|
||||
onready var news_btn = $CenterBtns/ButtonCtr/NewsBtn
|
||||
onready var http_request = $NewsWin/NewsBtns/HTTPRequest
|
||||
|
||||
func _ready():
|
||||
|
@ -20,14 +18,6 @@ func _ready():
|
|||
verLabel.text = "v" + version
|
||||
GameData.version = version
|
||||
|
||||
var err = http_request.request(GameData.NEWS_API)
|
||||
|
||||
if err != OK:
|
||||
news_btn.disabled = true
|
||||
|
||||
if OS.get_name() == "HTML5":
|
||||
export_btn.disabled = true
|
||||
import_btn.disabled = true
|
||||
|
||||
func _on_NewsBtn_pressed():
|
||||
news_win.show()
|
||||
|
|
Loading…
Add table
Reference in a new issue