From 1a6dd05f13d7afb312332c9636436cadcf01639b Mon Sep 17 00:00:00 2001 From: jacob janzen <53062115+JacobJanzen@users.noreply.github.com> Date: Sat, 16 Nov 2024 11:43:41 -0600 Subject: Stonks for real this time (#2) * start labels * stonks * stonks for real this time --- scenes/stockticker/Stock Ticker.tscn | 92 ++++++++++++++++++++++++------------ 1 file changed, 62 insertions(+), 30 deletions(-) (limited to 'scenes/stockticker/Stock Ticker.tscn') diff --git a/scenes/stockticker/Stock Ticker.tscn b/scenes/stockticker/Stock Ticker.tscn index 9352ef8..f3abfc7 100644 --- a/scenes/stockticker/Stock Ticker.tscn +++ b/scenes/stockticker/Stock Ticker.tscn @@ -1,20 +1,21 @@ -[gd_scene load_steps=9 format=3 uid="uid://g2veoq55y14i"] +[gd_scene load_steps=10 format=3 uid="uid://g2veoq55y14i"] [ext_resource type="Texture2D" uid="uid://voruypgyi77e" path="res://scenes/stockticker/UI-Background-Colour.png" id="1_wbfee"] [ext_resource type="Script" path="res://scenes/stockticker/stonks.gd" id="2_pan4m"] [ext_resource type="Theme" uid="uid://ve18rbkeiwti" path="res://UI/text.tres" id="3_dv3dr"] -[ext_resource type="Script" path="res://scenes/stockticker/buy_n_sell.gd" id="4_l8sru"] [ext_resource type="Texture2D" uid="uid://vie3nmimge1t" path="res://scenes/stockticker/BuyButton.png" id="5_mpf30"] [ext_resource type="Texture2D" uid="uid://dvidbk3clx6dn" path="res://scenes/stockticker/BuyButtonPressed.png" id="6_styy2"] [ext_resource type="Texture2D" uid="uid://dw8wpd47me7wu" path="res://scenes/stockticker/SellButton.png" id="7_h6hir"] [ext_resource type="Texture2D" uid="uid://b773rtpy6rtx5" path="res://scenes/stockticker/SellButtonPressed.png" id="8_essj7"] +[ext_resource type="Theme" uid="uid://duy8w6dc8ebi3" path="res://UI/darksouls.tres" id="8_yqn4n"] +[ext_resource type="Texture2D" uid="uid://dpp7abs35p6i5" path="res://scenes/stockticker/fishe/gar.png" id="9_bv8iw"] [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) +position = Vector2(639.75, 359.75) +scale = Vector2(1280.5, 720.5) texture = ExtResource("1_wbfee") [node name="Timer" type="Timer" parent="."] @@ -23,7 +24,15 @@ autostart = true [node name="Stonks" type="Node2D" parent="."] script = ExtResource("2_pan4m") -[node name="Sprite2D" type="Sprite2D" parent="Stonks"] +[node name="SellButton" type="TextureButton" parent="Stonks"] +offset_left = 439.0 +offset_top = 565.0 +offset_right = 794.0 +offset_bottom = 694.0 +texture_normal = ExtResource("7_h6hir") +texture_pressed = ExtResource("8_essj7") + +[node name="StonkWindow" type="Sprite2D" parent="Stonks"] position = Vector2(582, 205) scale = Vector2(1062.25, 337) texture = ExtResource("1_wbfee") @@ -79,44 +88,67 @@ text = "0" horizontal_alignment = 1 [node name="Stonks" type="Line2D" parent="Stonks"] +width = 2.0 +default_color = Color(1, 0, 0, 1) [node name="Price Label" type="Label" parent="Stonks"] -offset_left = 387.0 -offset_top = 387.0 -offset_right = 1112.0 -offset_bottom = 452.0 +offset_left = 26.0 +offset_top = 476.0 +offset_right = 751.0 +offset_bottom = 541.0 theme = ExtResource("3_dv3dr") text = "Price: $" -[node name="BuyNSell" type="Node2D" parent="."] -script = ExtResource("4_l8sru") - -[node name="BuyButton" type="TextureButton" parent="BuyNSell"] +[node name="BuyButton" type="TextureButton" parent="Stonks"] offset_left = 54.0 -offset_top = 475.0 +offset_top = 563.0 offset_right = 409.0 -offset_bottom = 604.0 +offset_bottom = 692.0 texture_normal = ExtResource("5_mpf30") texture_pressed = ExtResource("6_styy2") -[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("7_h6hir") -texture_pressed = ExtResource("8_essj7") - -[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 +[node name="Shares Held Label" type="Label" parent="Stonks"] +offset_left = 29.0 +offset_top = 388.0 +offset_right = 359.0 +offset_bottom = 453.0 theme = ExtResource("3_dv3dr") text = "Shares Held:" +[node name="DarkSoulsTextBox" type="Sprite2D" parent="Stonks"] +visible = false +self_modulate = Color(0, 0, 0, 0.721569) +position = Vector2(639.937, 355.875) +scale = Vector2(1279.88, 260.25) +texture = ExtResource("1_wbfee") + +[node name="DarkSoulsLabel" type="Label" parent="Stonks"] +visible = false +offset_left = 64.0 +offset_top = 258.0 +offset_right = 1209.0 +offset_bottom = 450.0 +theme = ExtResource("8_yqn4n") +text = "Stock Bankrupt" +horizontal_alignment = 1 + +[node name="Sprite2D" type="Sprite2D" parent="."] +position = Vector2(1036, 555) +scale = Vector2(0.671875, 0.622) +texture = ExtResource("9_bv8iw") + +[node name="Label" type="Label" parent="."] +offset_left = 823.0 +offset_top = 588.0 +offset_right = 1082.0 +offset_bottom = 785.0 +theme = ExtResource("3_dv3dr") +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 82 +text = "GAR" + [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"] +[connection signal="button_up" from="Stonks/SellButton" to="Stonks" method="_on_sell_button_button_up"] +[connection signal="button_up" from="Stonks/BuyButton" to="Stonks" method="_on_buy_button_button_up"] -- cgit v1.2.3