Button.tscn 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. [gd_scene load_steps=23 format=2]
  2. [ext_resource path="res://ui/TouchScreenButton.gd" type="Script" id=1]
  3. [ext_resource path="res://icon.png" type="Texture" id=2]
  4. [ext_resource path="res://sounds/sfx1.ogg" type="AudioStream" id=3]
  5. [ext_resource path="res://newdynamicfont.tres" type="DynamicFont" id=4]
  6. [ext_resource path="res://sounds/sfx2.ogg" type="AudioStream" id=5]
  7. [ext_resource path="res://sprite/symbols/icons/health.PNG" type="Texture" id=6]
  8. [ext_resource path="res://sprite/symbols/icons/speed.PNG" type="Texture" id=7]
  9. [ext_resource path="res://sprite/symbols/icons/swordred.PNG" type="Texture" id=8]
  10. [ext_resource path="res://sprite/symbols/icons/range.PNG" type="Texture" id=9]
  11. [ext_resource path="res://sprite/symbols/icons/icons/2Estrelas.PNG" type="Texture" id=10]
  12. [ext_resource path="res://sprite/symbols/icons/icons/5Estrelas.PNG" type="Texture" id=11]
  13. [ext_resource path="res://sprite/symbols/icons/icons/6Estrelas.PNG" type="Texture" id=12]
  14. [ext_resource path="res://sprite/symbols/icons/icons/7Estrelas.PNG" type="Texture" id=13]
  15. [ext_resource path="res://sprite/symbols/icons/starbase.PNG" type="Texture" id=14]
  16. [ext_resource path="res://sprite/symbols/icons/attackspeed.png" type="Texture" id=15]
  17. [ext_resource path="res://sprite/symbols/icons/swordpurple.PNG" type="Texture" id=16]
  18. [ext_resource path="res://sprite/symbols/icons/icons/8Estrelas.PNG" type="Texture" id=17]
  19. [ext_resource path="res://sprite/symbols/icons/icons/4Estrelas.PNG" type="Texture" id=18]
  20. [ext_resource path="res://sprite/symbols/icons/icons/3Estrelas.PNG" type="Texture" id=19]
  21. [ext_resource path="res://sprite/symbols/icons/icons/1Estrela.PNG" type="Texture" id=20]
  22. [sub_resource type="SpriteFrames" id=2]
  23. animations = [ {
  24. "frames": [ ExtResource( 6 ), ExtResource( 9 ), ExtResource( 7 ), ExtResource( 8 ), ExtResource( 16 ), ExtResource( 15 ) ],
  25. "loop": true,
  26. "name": "default",
  27. "speed": 5.0
  28. }, {
  29. "frames": [ ExtResource( 20 ), ExtResource( 10 ), ExtResource( 19 ), ExtResource( 18 ), ExtResource( 11 ), ExtResource( 12 ), ExtResource( 13 ), ExtResource( 17 ) ],
  30. "loop": true,
  31. "name": "stars",
  32. "speed": 5.0
  33. }, {
  34. "frames": [ ExtResource( 14 ) ],
  35. "loop": true,
  36. "name": "starbase",
  37. "speed": 5.0
  38. } ]
  39. [sub_resource type="RectangleShape2D" id=1]
  40. [node name="Button" type="TouchScreenButton"]
  41. normal = ExtResource( 2 )
  42. script = ExtResource( 1 )
  43. [node name="Button" type="Button" parent="."]
  44. margin_right = 63.0
  45. margin_bottom = 66.0
  46. flat = true
  47. [node name="Label" type="Label" parent="."]
  48. margin_left = -275.0
  49. margin_top = 2.0
  50. margin_right = -6.0
  51. margin_bottom = 62.0
  52. custom_fonts/font = ExtResource( 4 )
  53. text = "stuff"
  54. align = 1
  55. valign = 2
  56. [node name="Label" type="Label" parent="Label"]
  57. anchor_right = 1.0
  58. anchor_bottom = 1.0
  59. custom_fonts/font = ExtResource( 4 )
  60. align = 1
  61. autowrap = true
  62. [node name="ColorRect" type="ColorRect" parent="Label"]
  63. show_behind_parent = true
  64. anchor_right = 1.0
  65. anchor_bottom = 1.0
  66. color = Color( 0, 0, 0, 0.321569 )
  67. [node name="icons" type="Node2D" parent="Label"]
  68. position = Vector2( 9, 3 )
  69. scale = Vector2( 0.8, 0.8 )
  70. [node name="icon1" type="AnimatedSprite" parent="Label/icons"]
  71. position = Vector2( 27.5, 21.5 )
  72. frames = SubResource( 2 )
  73. [node name="starsback" type="AnimatedSprite" parent="Label/icons/icon1"]
  74. visible = false
  75. position = Vector2( 51, 0 )
  76. frames = SubResource( 2 )
  77. animation = "starbase"
  78. [node name="stars" type="AnimatedSprite" parent="Label/icons/icon1"]
  79. position = Vector2( 51, 0 )
  80. frames = SubResource( 2 )
  81. animation = "stars"
  82. [node name="icon2" type="AnimatedSprite" parent="Label/icons"]
  83. position = Vector2( 134.5, 21.5 )
  84. frames = SubResource( 2 )
  85. frame = 1
  86. [node name="starsback" type="AnimatedSprite" parent="Label/icons/icon2"]
  87. visible = false
  88. position = Vector2( 51, 0 )
  89. frames = SubResource( 2 )
  90. animation = "starbase"
  91. [node name="stars" type="AnimatedSprite" parent="Label/icons/icon2"]
  92. position = Vector2( 51, 0 )
  93. frames = SubResource( 2 )
  94. animation = "stars"
  95. [node name="icon3" type="AnimatedSprite" parent="Label/icons"]
  96. position = Vector2( 238, 21.5 )
  97. frames = SubResource( 2 )
  98. frame = 2
  99. [node name="starsback" type="AnimatedSprite" parent="Label/icons/icon3"]
  100. visible = false
  101. position = Vector2( 51, 0 )
  102. frames = SubResource( 2 )
  103. animation = "starbase"
  104. [node name="stars" type="AnimatedSprite" parent="Label/icons/icon3"]
  105. position = Vector2( 51, 0 )
  106. frames = SubResource( 2 )
  107. animation = "stars"
  108. [node name="col" type="Area2D" parent="."]
  109. collision_layer = 0
  110. collision_mask = 0
  111. [node name="CollisionShape2D" type="CollisionShape2D" parent="col"]
  112. position = Vector2( 32, 32 )
  113. shape = SubResource( 1 )
  114. [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
  115. stream = ExtResource( 3 )
  116. bus = "menu"
  117. [node name="AudioStreamPlayer2" type="AudioStreamPlayer" parent="."]
  118. stream = ExtResource( 5 )
  119. bus = "menu"
  120. [connection signal="pressed" from="." to="AudioStreamPlayer" method="play"]
  121. [connection signal="released" from="." to="AudioStreamPlayer2" method="play"]
  122. [connection signal="mouse_entered" from="Button" to="." method="_on_Button_mouse_entered"]
  123. [connection signal="mouse_exited" from="Button" to="." method="_on_Button_mouse_exited"]