mirror of
https://github.com/litruv/PNGTuber-Plus.git
synced 2026-07-24 02:26:02 +10:00
Made costumes work again !build
This commit is contained in:
@@ -353,8 +353,11 @@ func changeRotLimit():
|
||||
|
||||
$VBoxContainer/RotationalLimitsSection/RotBack/RotLineDisplay.rotation_degrees = Global.heldSprite.rLimitMin
|
||||
$VBoxContainer/RotationalLimitsSection/RotBack/RotLineDisplay2.rotation_degrees = Global.heldSprite.rLimitMax
|
||||
|
||||
|
||||
func setLayerButtons():
|
||||
if Global.heldSprite == null:
|
||||
return
|
||||
|
||||
var a = Global.heldSprite.costumeLayers.duplicate()
|
||||
|
||||
$VBoxContainer/LayersSection/HBoxContainer/Layer1Container/Layer1.frame = 1-a[0]
|
||||
@@ -368,6 +371,10 @@ func setLayerButtons():
|
||||
$VBoxContainer/LayersSection/HBoxContainer2/Layer9Container/Layer9.frame = 1-a[8]
|
||||
$VBoxContainer/LayersSection/HBoxContainer2/Layer10Container/Layer10.frame = 1-a[9]
|
||||
|
||||
# Update checkmarks to show current costume layer
|
||||
updateLayerCheckmarks()
|
||||
|
||||
# Update sprite visibility for all sprites based on current costume
|
||||
var nodes = get_tree().get_nodes_in_group("saved")
|
||||
for sprite in nodes:
|
||||
if sprite.costumeLayers[Global.main.costume - 1] == 1:
|
||||
@@ -376,7 +383,45 @@ func setLayerButtons():
|
||||
else:
|
||||
sprite.visible = false
|
||||
sprite.changeCollision(false)
|
||||
|
||||
|
||||
# Update the sprite list to reflect visibility changes
|
||||
Global.spriteList.updateAllVisible()
|
||||
|
||||
func updateLayerCheckmarks():
|
||||
# Hide all checkmarks first
|
||||
$VBoxContainer/LayersSection/HBoxContainer/Layer1Container/Layer1/Checkmark1.visible = false
|
||||
$VBoxContainer/LayersSection/HBoxContainer/Layer2Container/Layer2/Checkmark2.visible = false
|
||||
$VBoxContainer/LayersSection/HBoxContainer/Layer3Container/Layer3/Checkmark3.visible = false
|
||||
$VBoxContainer/LayersSection/HBoxContainer/Layer4Container/Layer4/Checkmark4.visible = false
|
||||
$VBoxContainer/LayersSection/HBoxContainer/Layer5Container/Layer5/Checkmark5.visible = false
|
||||
$VBoxContainer/LayersSection/HBoxContainer2/Layer6Container/Layer6/Checkmark6.visible = false
|
||||
$VBoxContainer/LayersSection/HBoxContainer2/Layer7Container/Layer7/Checkmark7.visible = false
|
||||
$VBoxContainer/LayersSection/HBoxContainer2/Layer8Container/Layer8/Checkmark8.visible = false
|
||||
$VBoxContainer/LayersSection/HBoxContainer2/Layer9Container/Layer9/Checkmark9.visible = false
|
||||
$VBoxContainer/LayersSection/HBoxContainer2/Layer10Container/Layer10/Checkmark10.visible = false
|
||||
|
||||
# Show checkmark for current costume layer
|
||||
match Global.main.costume:
|
||||
1:
|
||||
$VBoxContainer/LayersSection/HBoxContainer/Layer1Container/Layer1/Checkmark1.visible = true
|
||||
2:
|
||||
$VBoxContainer/LayersSection/HBoxContainer/Layer2Container/Layer2/Checkmark2.visible = true
|
||||
3:
|
||||
$VBoxContainer/LayersSection/HBoxContainer/Layer3Container/Layer3/Checkmark3.visible = true
|
||||
4:
|
||||
$VBoxContainer/LayersSection/HBoxContainer/Layer4Container/Layer4/Checkmark4.visible = true
|
||||
5:
|
||||
$VBoxContainer/LayersSection/HBoxContainer/Layer5Container/Layer5/Checkmark5.visible = true
|
||||
6:
|
||||
$VBoxContainer/LayersSection/HBoxContainer2/Layer6Container/Layer6/Checkmark6.visible = true
|
||||
7:
|
||||
$VBoxContainer/LayersSection/HBoxContainer2/Layer7Container/Layer7/Checkmark7.visible = true
|
||||
8:
|
||||
$VBoxContainer/LayersSection/HBoxContainer2/Layer8Container/Layer8/Checkmark8.visible = true
|
||||
9:
|
||||
$VBoxContainer/LayersSection/HBoxContainer2/Layer9Container/Layer9/Checkmark9.visible = true
|
||||
10:
|
||||
$VBoxContainer/LayersSection/HBoxContainer2/Layer10Container/Layer10/Checkmark10.visible = true
|
||||
|
||||
|
||||
func _on_layer_button_1_pressed():
|
||||
@@ -476,6 +521,11 @@ func layerSelected():
|
||||
newPos = $VBoxContainer/LayersSection/HBoxContainer2/Layer9Container/Layer9.position
|
||||
10:
|
||||
newPos = $VBoxContainer/LayersSection/HBoxContainer2/Layer10Container/Layer10.position
|
||||
|
||||
# Update selection indicator position if it exists
|
||||
var select_node = get_node_or_null("VBoxContainer/LayersSection/Select")
|
||||
if select_node:
|
||||
select_node.position = newPos
|
||||
|
||||
|
||||
func _on_clip_linked_toggled(button_pressed):
|
||||
@@ -492,7 +542,7 @@ func _on_delete_pressed():
|
||||
Global.heldSprite.makeVis()
|
||||
|
||||
func _on_set_toggle_pressed():
|
||||
$VBoxContainer/BoxContainer/setToggle/Labelbel.text = "toggle: AWAITING INPUT"
|
||||
$VBoxContainer/BoxContainer/setToggle/Label.text = "toggle: AWAITING INPUT"
|
||||
await Global.main.fatfuckingballs
|
||||
|
||||
var keys = await Global.main.spriteVisToggles
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=77 format=4 uid="uid://d3anahesvdgfh"]
|
||||
[gd_scene load_steps=78 format=4 uid="uid://d3anahesvdgfh"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bgoaqt86bc73p" path="res://ui_scenes/spriteEditMenu/sprite_viewer.gd" id="1_hp0e3"]
|
||||
[ext_resource type="FontFile" uid="uid://ukj8gv8ucqsg" path="res://font/goober_pixel.ttf" id="2_da8lk"]
|
||||
@@ -27,11 +27,12 @@
|
||||
[ext_resource type="Texture2D" uid="uid://drcl08v4k3laj" path="res://ui_scenes/spriteEditMenu/layerButtons/8.png" id="22_041y0"]
|
||||
[ext_resource type="Texture2D" uid="uid://byyf5t56u3fq8" path="res://ui_scenes/spriteEditMenu/layerButtons/9.png" id="23_wja1u"]
|
||||
[ext_resource type="Texture2D" uid="uid://dxxj6jvajo37s" path="res://ui_scenes/spriteEditMenu/layerButtons/10.png" id="24_1m26d"]
|
||||
[ext_resource type="Texture2D" uid="uid://41u8egcau00i" path="res://ui_scenes/button sprites/checkmark.png" id="25_checkmark"]
|
||||
[ext_resource type="Texture2D" uid="uid://23rqddatjku3" path="res://ui_scenes/mouse/tooltipBox.png" id="26_8cfad"]
|
||||
[ext_resource type="Texture2D" uid="uid://gflmeocxfnrq" path="res://ui_scenes/settings/deleteHotkey.png" id="27_fgu6g"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_21kva"]
|
||||
size = Vector2(245, 1597)
|
||||
size = Vector2(261, 1794)
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_hxmah"]
|
||||
shader = ExtResource("3_ky0lu")
|
||||
@@ -14290,7 +14291,7 @@ script = ExtResource("1_hp0e3")
|
||||
z_index = -2
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||
position = Vector2(122.5, 798.5)
|
||||
position = Vector2(130.5, 899)
|
||||
shape = SubResource("RectangleShape2D_21kva")
|
||||
|
||||
[node name="NinePatchRect" type="NinePatchRect" parent="."]
|
||||
@@ -14783,7 +14784,6 @@ size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
|
||||
[node name="Layer1" type="Sprite2D" parent="VBoxContainer/LayersSection/HBoxContainer/Layer1Container"]
|
||||
z_as_relative = false
|
||||
position = Vector2(22, 22)
|
||||
texture = ExtResource("15_scank")
|
||||
hframes = 2
|
||||
@@ -14796,6 +14796,11 @@ offset_bottom = 22.0
|
||||
theme = SubResource("Theme_ig6qj")
|
||||
flat = true
|
||||
|
||||
[node name="Checkmark1" type="Sprite2D" parent="VBoxContainer/LayersSection/HBoxContainer/Layer1Container/Layer1"]
|
||||
visible = false
|
||||
position = Vector2(14, 12)
|
||||
texture = ExtResource("25_checkmark")
|
||||
|
||||
[node name="Layer2Container" type="Control" parent="VBoxContainer/LayersSection/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(44, 44)
|
||||
layout_mode = 2
|
||||
@@ -14815,6 +14820,11 @@ offset_bottom = 22.0
|
||||
theme = SubResource("Theme_ig6qj")
|
||||
flat = true
|
||||
|
||||
[node name="Checkmark2" type="Sprite2D" parent="VBoxContainer/LayersSection/HBoxContainer/Layer2Container/Layer2"]
|
||||
visible = false
|
||||
position = Vector2(14, 12)
|
||||
texture = ExtResource("25_checkmark")
|
||||
|
||||
[node name="Layer3Container" type="Control" parent="VBoxContainer/LayersSection/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(44, 44)
|
||||
layout_mode = 2
|
||||
@@ -14834,6 +14844,11 @@ offset_bottom = 22.0
|
||||
theme = SubResource("Theme_ig6qj")
|
||||
flat = true
|
||||
|
||||
[node name="Checkmark3" type="Sprite2D" parent="VBoxContainer/LayersSection/HBoxContainer/Layer3Container/Layer3"]
|
||||
visible = false
|
||||
position = Vector2(14, 12)
|
||||
texture = ExtResource("25_checkmark")
|
||||
|
||||
[node name="Layer4Container" type="Control" parent="VBoxContainer/LayersSection/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(44, 44)
|
||||
layout_mode = 2
|
||||
@@ -14853,6 +14868,11 @@ offset_bottom = 22.0
|
||||
theme = SubResource("Theme_ig6qj")
|
||||
flat = true
|
||||
|
||||
[node name="Checkmark4" type="Sprite2D" parent="VBoxContainer/LayersSection/HBoxContainer/Layer4Container/Layer4"]
|
||||
visible = false
|
||||
position = Vector2(14, 12)
|
||||
texture = ExtResource("25_checkmark")
|
||||
|
||||
[node name="Layer5Container" type="Control" parent="VBoxContainer/LayersSection/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(44, 44)
|
||||
layout_mode = 2
|
||||
@@ -14872,6 +14892,11 @@ offset_bottom = 22.0
|
||||
theme = SubResource("Theme_ig6qj")
|
||||
flat = true
|
||||
|
||||
[node name="Checkmark5" type="Sprite2D" parent="VBoxContainer/LayersSection/HBoxContainer/Layer5Container/Layer5"]
|
||||
visible = false
|
||||
position = Vector2(14, 12)
|
||||
texture = ExtResource("25_checkmark")
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/LayersSection"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 5
|
||||
@@ -14895,6 +14920,11 @@ offset_bottom = 22.0
|
||||
theme = SubResource("Theme_ig6qj")
|
||||
flat = true
|
||||
|
||||
[node name="Checkmark6" type="Sprite2D" parent="VBoxContainer/LayersSection/HBoxContainer2/Layer6Container/Layer6"]
|
||||
visible = false
|
||||
position = Vector2(14, 12)
|
||||
texture = ExtResource("25_checkmark")
|
||||
|
||||
[node name="Layer7Container" type="Control" parent="VBoxContainer/LayersSection/HBoxContainer2"]
|
||||
custom_minimum_size = Vector2(44, 44)
|
||||
layout_mode = 2
|
||||
@@ -14914,6 +14944,11 @@ offset_bottom = 22.0
|
||||
theme = SubResource("Theme_ig6qj")
|
||||
flat = true
|
||||
|
||||
[node name="Checkmark7" type="Sprite2D" parent="VBoxContainer/LayersSection/HBoxContainer2/Layer7Container/Layer7"]
|
||||
visible = false
|
||||
position = Vector2(14, 12)
|
||||
texture = ExtResource("25_checkmark")
|
||||
|
||||
[node name="Layer8Container" type="Control" parent="VBoxContainer/LayersSection/HBoxContainer2"]
|
||||
custom_minimum_size = Vector2(44, 44)
|
||||
layout_mode = 2
|
||||
@@ -14933,6 +14968,11 @@ offset_bottom = 22.0
|
||||
theme = SubResource("Theme_ig6qj")
|
||||
flat = true
|
||||
|
||||
[node name="Checkmark8" type="Sprite2D" parent="VBoxContainer/LayersSection/HBoxContainer2/Layer8Container/Layer8"]
|
||||
visible = false
|
||||
position = Vector2(14, 12)
|
||||
texture = ExtResource("25_checkmark")
|
||||
|
||||
[node name="Layer9Container" type="Control" parent="VBoxContainer/LayersSection/HBoxContainer2"]
|
||||
custom_minimum_size = Vector2(44, 44)
|
||||
layout_mode = 2
|
||||
@@ -14952,6 +14992,11 @@ offset_bottom = 22.0
|
||||
theme = SubResource("Theme_ig6qj")
|
||||
flat = true
|
||||
|
||||
[node name="Checkmark9" type="Sprite2D" parent="VBoxContainer/LayersSection/HBoxContainer2/Layer9Container/Layer9"]
|
||||
visible = false
|
||||
position = Vector2(14, 12)
|
||||
texture = ExtResource("25_checkmark")
|
||||
|
||||
[node name="Layer10Container" type="Control" parent="VBoxContainer/LayersSection/HBoxContainer2"]
|
||||
custom_minimum_size = Vector2(44, 44)
|
||||
layout_mode = 2
|
||||
@@ -14971,6 +15016,11 @@ offset_bottom = 22.0
|
||||
theme = SubResource("Theme_ig6qj")
|
||||
flat = true
|
||||
|
||||
[node name="Checkmark10" type="Sprite2D" parent="VBoxContainer/LayersSection/HBoxContainer2/Layer10Container/Layer10"]
|
||||
visible = false
|
||||
position = Vector2(14, 12)
|
||||
texture = ExtResource("25_checkmark")
|
||||
|
||||
[node name="BoxContainer" type="BoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
@@ -15024,5 +15074,15 @@ centered = false
|
||||
[connection signal="pressed" from="VBoxContainer/Buttons/TrashWrapper/Trash/trash" to="." method="_on_trash_pressed"]
|
||||
[connection signal="toggled" from="VBoxContainer/RenderingSection/ClipLinked" to="." method="_on_clip_linked_toggled"]
|
||||
[connection signal="toggled" from="VBoxContainer/PhysicsSection/BounceVelocity" to="." method="_on_check_box_toggled"]
|
||||
[connection signal="pressed" from="VBoxContainer/LayersSection/HBoxContainer/Layer1Container/Layer1/layerButton1" to="." method="_on_layer_button_1_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/LayersSection/HBoxContainer/Layer2Container/Layer2/layerButton2" to="." method="_on_layer_button_2_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/LayersSection/HBoxContainer/Layer3Container/Layer3/layerButton3" to="." method="_on_layer_button_3_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/LayersSection/HBoxContainer/Layer4Container/Layer4/layerButton4" to="." method="_on_layer_button_4_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/LayersSection/HBoxContainer/Layer5Container/Layer5/layerButton5" to="." method="_on_layer_button_5_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/LayersSection/HBoxContainer2/Layer6Container/Layer6/layerButton6" to="." method="_on_layer_button_6_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/LayersSection/HBoxContainer2/Layer7Container/Layer7/layerButton7" to="." method="_on_layer_button_7_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/LayersSection/HBoxContainer2/Layer8Container/Layer8/layerButton8" to="." method="_on_layer_button_8_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/LayersSection/HBoxContainer2/Layer9Container/Layer9/layerButton9" to="." method="_on_layer_button_9_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/LayersSection/HBoxContainer2/Layer10Container/Layer10/layerButton10" to="." method="_on_layer_button_10_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/BoxContainer/setToggle" to="." method="_on_set_toggle_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/BoxContainer/setToggle/delete" to="." method="_on_delete_pressed"]
|
||||
|
||||
Reference in New Issue
Block a user