diff options
author | jacob janzen <53062115+JacobJanzen@users.noreply.github.com> | 2024-11-15 19:55:44 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-15 19:55:44 -0600 |
commit | 33a6215be1c05efe3628509a1e0bb53f40b2a3ca (patch) | |
tree | 8c29790ef9c808b2e3b825d3c9a56125b0b10cda /Stock Ticker.tscn | |
parent | 7a468e63650bd5f10e8402f416ea988883844f89 (diff) | |
parent | 4f5d964c6890f3281e8673905ab0158dca0ebcf8 (diff) |
Merge pull request #1 from cssa-game-jam-2024/stock-ticker-mvp
Stock ticker mvp
Diffstat (limited to 'Stock Ticker.tscn')
-rw-r--r-- | Stock Ticker.tscn | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/Stock Ticker.tscn b/Stock Ticker.tscn new file mode 100644 index 0000000..ad5bfc3 --- /dev/null +++ b/Stock Ticker.tscn @@ -0,0 +1,122 @@ +[gd_scene load_steps=9 format=3 uid="uid://g2veoq55y14i"] + +[ext_resource type="Texture2D" uid="uid://c6ed1ks2h58s7" path="res://UI-Background-Colour.png" id="1_1j58d"] +[ext_resource type="Texture2D" uid="uid://dcsaf0afsn76" path="res://BuyButton.png" id="2_8qhml"] +[ext_resource type="Texture2D" uid="uid://ckd5ppryxuuum" path="res://BuyButtonPressed.png" id="3_4kqfi"] +[ext_resource type="Script" path="res://buy_n_sell.gd" id="4_312bm"] +[ext_resource type="Texture2D" uid="uid://du8xy83ve1lm7" path="res://SellButton.png" id="5_salj8"] +[ext_resource type="Texture2D" uid="uid://qgsvhv16ghwf" path="res://SellButtonPressed.png" id="6_ifhss"] +[ext_resource type="Script" path="res://stonks.gd" id="7_ecbtd"] +[ext_resource type="Theme" uid="uid://cte81ypvmrsrv" path="res://text.tres" id="7_rtyuw"] + +[node name="Node2D" type="Node2D"] + +[node name="Background" type="Sprite2D" parent="."] +modulate = Color(0.796078, 0.796078, 0.796078, 1) +position = Vector2(576.25, 323.75) +scale = Vector2(1153.5, 648.5) +texture = ExtResource("1_1j58d") + +[node name="Timer" type="Timer" parent="."] +autostart = true + +[node name="Stonks" type="Node2D" parent="."] +script = ExtResource("7_ecbtd") + +[node name="Sprite2D" type="Sprite2D" parent="Stonks"] +position = Vector2(582, 205) +scale = Vector2(1062.25, 337) +texture = ExtResource("1_1j58d") + +[node name="TopLine" type="Line2D" parent="Stonks"] +points = PackedVector2Array(50, 60, 1000, 60) +width = 1.0 +default_color = Color(0.458824, 0.458824, 0.458824, 1) + +[node name="MidLine" type="Line2D" parent="Stonks"] +position = Vector2(0, 1) +points = PackedVector2Array(50, 208, 1000, 208) +width = 1.0 +default_color = Color(0.458824, 0.458824, 0.458824, 1) + +[node name="BottomLine" type="Line2D" parent="Stonks"] +position = Vector2(0, -1) +points = PackedVector2Array(50, 356, 1000, 356) +width = 1.0 +default_color = Color(0.46, 0.46, 0.46, 1) + +[node name="Top" type="Label" parent="Stonks"] +offset_left = 1021.0 +offset_top = 58.0 +offset_right = 1114.0 +offset_bottom = 89.0 +theme = ExtResource("7_rtyuw") +theme_override_colors/font_color = Color(0.63, 0.63, 0.63, 1) +theme_override_font_sizes/font_size = 12 +text = "0" +horizontal_alignment = 1 + +[node name="Middle" type="Label" parent="Stonks"] +offset_left = 1022.0 +offset_top = 208.0 +offset_right = 1115.0 +offset_bottom = 239.0 +theme = ExtResource("7_rtyuw") +theme_override_colors/font_color = Color(0.63, 0.63, 0.63, 1) +theme_override_font_sizes/font_size = 12 +text = "0" +horizontal_alignment = 1 + +[node name="Bottom" type="Label" parent="Stonks"] +offset_left = 1022.0 +offset_top = 356.0 +offset_right = 1115.0 +offset_bottom = 387.0 +theme = ExtResource("7_rtyuw") +theme_override_colors/font_color = Color(0.63, 0.63, 0.63, 1) +theme_override_font_sizes/font_size = 12 +text = "0" +horizontal_alignment = 1 + +[node name="Stonks" type="Line2D" parent="Stonks"] + +[node name="Price Label" type="Label" parent="Stonks"] +offset_left = 387.0 +offset_top = 387.0 +offset_right = 1112.0 +offset_bottom = 452.0 +theme = ExtResource("7_rtyuw") +text = "Price: +$" + +[node name="BuyNSell" type="Node2D" parent="."] +script = ExtResource("4_312bm") + +[node name="BuyButton" type="TextureButton" parent="BuyNSell"] +offset_left = 54.0 +offset_top = 475.0 +offset_right = 409.0 +offset_bottom = 604.0 +texture_normal = ExtResource("2_8qhml") +texture_pressed = ExtResource("3_4kqfi") + +[node name="SellButton" type="TextureButton" parent="BuyNSell"] +offset_left = 441.0 +offset_top = 477.0 +offset_right = 796.0 +offset_bottom = 606.0 +texture_normal = ExtResource("5_salj8") +texture_pressed = ExtResource("6_ifhss") + +[node name="Shares Held Label" type="Label" parent="BuyNSell"] +offset_left = 6.0 +offset_top = 390.0 +offset_right = 336.0 +offset_bottom = 455.0 +theme = ExtResource("7_rtyuw") +text = "Shares +Held:" + +[connection signal="timeout" from="Timer" to="Stonks" method="_on_timer_timeout"] +[connection signal="button_up" from="BuyNSell/BuyButton" to="BuyNSell" method="_on_buy_button_button_up"] +[connection signal="button_up" from="BuyNSell/SellButton" to="BuyNSell" method="_on_sell_button_button_up"] |