From 29983fef392ab37c6ccbddab28efe3d97746b1fa Mon Sep 17 00:00:00 2001 From: Jacob Janzen Date: Fri, 15 Nov 2024 18:31:43 -0600 Subject: [PATCH 1/3] partially done --- ButtonBase.xcf | Bin 0 -> 11607 bytes ButtonBasePressed.xcf | Bin 0 -> 14164 bytes BuyButton.png | Bin 0 -> 1344 bytes BuyButton.png.import | 34 ++++++++++++++++++++++++++++++++ BuyButtonPressed.png | Bin 0 -> 1357 bytes BuyButtonPressed.png.import | 34 ++++++++++++++++++++++++++++++++ SellButton.png | Bin 0 -> 1462 bytes SellButton.png.import | 34 ++++++++++++++++++++++++++++++++ SellButtonPressed.png | Bin 0 -> 1475 bytes SellButtonPressed.png.import | 34 ++++++++++++++++++++++++++++++++ Stock Ticker.tscn | 33 +++++++++++++++++++++++++++++++ UI-Background-Colour.png | Bin 0 -> 546 bytes UI-Background-Colour.png.import | 34 ++++++++++++++++++++++++++++++++ UI-Background-Colour.xcf | Bin 0 -> 687 bytes buy_button.gd | 11 +++++++++++ 15 files changed, 214 insertions(+) create mode 100644 ButtonBase.xcf create mode 100644 ButtonBasePressed.xcf create mode 100644 BuyButton.png create mode 100644 BuyButton.png.import create mode 100644 BuyButtonPressed.png create mode 100644 BuyButtonPressed.png.import create mode 100644 SellButton.png create mode 100644 SellButton.png.import create mode 100644 SellButtonPressed.png create mode 100644 SellButtonPressed.png.import create mode 100644 Stock Ticker.tscn create mode 100644 UI-Background-Colour.png create mode 100644 UI-Background-Colour.png.import create mode 100644 UI-Background-Colour.xcf create mode 100644 buy_button.gd diff --git a/ButtonBase.xcf b/ButtonBase.xcf new file mode 100644 index 0000000000000000000000000000000000000000..4c3e2f4e5b8125e1c863bd81cec310c53cbd38ff GIT binary patch literal 11607 zcmeHNU1(!P6rQwdv#qX0t-Z~rZTb^z^g%?H+uiCeixx$Z^+AzrdYfLFCTo(q zTT#-AA|iq-{vcS|MMOnKd=l}86ajOg&g9Ib?fLV@#ng=P#CRehgb1YQvP{J3b)uVy0s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gkR?m)cHp~_dJqg{(kcz{#||CeGb;q>)|fH6XE<0@H*DgF7z(e(nktuEp@^> zgA!WPoa0E~XU%a5-mR!YQtBOxWgxv)gEsJL)~U-z{_|3!zEvyGu^@G5|EITzO8YQ^-t)cVoLgE|B|?pQFu||+Y+gF(|7(G>3{XM#5pzB98>li3O|uJuW<1< zX)pe%@E?gw#5>wjT;dA7VTHDGMq%Iova)9sz9Lc69PR7grM*Cp?_F&B{exk^#rdw7 z(eEeDfQ$2v;N0&g&VZxs^m2PnY^}Yo?e1%xeeJ#1 z-(&J%Rxy8;gAC;2!Z-2N%%9~T1B&~JuWDjuf0h9Ta&ag2OI!52qVJ6B@#K0f_9!#n pTc`K;C5YW)YxLcCXX3ddKYE-#sMmjltf{*FBOp`y9Pl*h{{sDdWSIZ} literal 0 HcmV?d00001 diff --git a/BuyButton.png b/BuyButton.png new file mode 100644 index 0000000000000000000000000000000000000000..8b35891120c9ea3d867f04e6d262c35748d7b040 GIT binary patch literal 1344 zcmeAS@N?(olHy`uVBq!ia0y~yU`z(G8#&m3q^RZXJ3xV!OlRi+PiJR^f};Gi%$!sP z291fe6Ky>XJIEZ34_>-xDxX+j;E8~_Zx$)_ZRK)Z5s=jyChMd3S74Tjil$y)Q})4w z{YO_dcW++Dx2{Ry2jinR50<=8QvIi|xuxUdgB|kk-`T#q$LO^8Ovq+swiUBdmk1Xc z&W;vjUjM?8dWm71!K7eEj-ujq{)EzCV8v`bmwsMyaspWt;0BKbyUo zFXw#kJiJCl^T_ifkJ(};{FwN9)9L&<-F)0O#yKgMijO2FZM<=;NP6?6g+l&Fdh=f}3AlO5WBc;4)B1vcxr_#5q4VH#M(>!MP|ku_QG`p**uBL&4qC zHz2%`Pn>~)SgPRwQr3`MyGzBSky6C^5`Gkj%wk$mY<)ctiq7 z3nVifkpOalG>L*zS=WVXdX_I=zG79D_W8AU^N!!UcP}iieBSeksWW#<8<{8V`MPRV z*XGTe*V=5qm?6@9FhP6$Zk^K_U5D=Q&Xn%g1X_&bfC}lj-0Y5r1rl@pmS5ZW`m5Ek z#~+V<+`W7ElaKA~?eD+I87Um=z4ZEP*8bl+qt;G(eEFq`W!$u-5{Ion&tM|#fd-N2 z46`HIbya`k-4+M(urYW4Y3o|l@%r`a-p8A7>a1J0uIBy@W7Oby;0kim;>C+Iw%^{` zS6frlbNlw~-p4?<{p7w>InRAs>b@59E&KP&A3uIv`uOwDm3Qvnzy9k@b93{H@4rv( z6im*tvb5}6q>&}N8|Y#~x&GrPAD`Z|#@1Z_b=mHVZ_6hC4>mvcx6aV`@m#&F)lF`gPS@w^o00V1pT>j&VdC#|=w?6+_<8;yE zA4wZM@*dv2@|w-?-=d)3g8RdkU#{H#w`;SGcip$chYwHRllLQDE*NMHlF1*o&t0`@ zp0ZNZ+Ay8z-r7tb7{&J2xw#y9`m@zKxgl2(r)#h}k#xZit#ADDmW44Mm}|&j?HXtk h&BjoEjN$&h{Dnyy4RYFkE(2yQ22WQ%mvv4FO#m_$ME3vy literal 0 HcmV?d00001 diff --git a/BuyButton.png.import b/BuyButton.png.import new file mode 100644 index 0000000..0aab002 --- /dev/null +++ b/BuyButton.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dcsaf0afsn76" +path="res://.godot/imported/BuyButton.png-1c1b0b8028f98a92082f37a9e5446c45.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://BuyButton.png" +dest_files=["res://.godot/imported/BuyButton.png-1c1b0b8028f98a92082f37a9e5446c45.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/BuyButtonPressed.png b/BuyButtonPressed.png new file mode 100644 index 0000000000000000000000000000000000000000..c028e5acb39406e73fd181eec69a9ea3389b92b6 GIT binary patch literal 1357 zcmeAS@N?(olHy`uVBq!ia0y~yU`z(G8#&m3q^RZXJ3xV!OlRi+PiJR^f};Gi%$!sP z291fe6Ky>XJIEZ34_>-xDxX+j;E8~_Zx$)_ZRK)Z5s=jyChMd3S74Tjil$y)Q})4w z{YO_dcW++Dx2{Ry2jinR50<=8QvIi|xuxUdgB|kk-`T#q$LO^8Ovq+swiUBdmk1Xc z&W;vjUjM?8dWm71!K7eEj-ujq{)EzCV8v`bmwsMyaspWt;0BKbyUo zFXw#kJiJCl^T_ifkJ(};{FwN9)9L&<-F)0O#yKgMijO2FZM<=;NP6?6g+l&Fdh=f}3Al-f+&`m61Rp$r9Iy66gHf+|;}h2Ir#G#FEq$h4Rdj3F!Z|~as3n$7P_$dEvnpVu@LkBK-WU))9gs9)#pwCb%xFp}f z`Ae)se2Y+owzS`Y4o~^;bk(`7IA+Pod)Ql)NJqZ+iXQK7Knp zd!x$im-30g0nX%+hF#>E%WIect8 zAG^D|w;sPgclPcr-zP8{uAAbwJowk$^ND6UJs;nF^Lvx`{z>2ZFTay`rk_dXVlZTL z=wUn}0i*?z8IDK*IY1gkuPo%dzBpIEc}%#*)vNR@cfw=ep~C&!9z}0@~8i9eI|du{>bvZd+&S%I+AB|;=2lvr~j;uSzNn~SdnrqFSTUOWWj=4^& z+WVr!YUkrjW!>6)naaIW>+H+_Jb196;P<&zapoN#c|*6zf2>^k^2*Y;;d4|xAEqyl zU!M1*^zi;qGni1qtKq(HN@SUsVBqSjNx8{)yBJ~?UKQ8BE6Lo$jXQX;hB=vnc{4h1 m-n?min&H7Yi3j_?3qSv{_UdT`kuSh}#^CAd=d#Wzp$P!l*G-53 literal 0 HcmV?d00001 diff --git a/BuyButtonPressed.png.import b/BuyButtonPressed.png.import new file mode 100644 index 0000000..fc7c10e --- /dev/null +++ b/BuyButtonPressed.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ckd5ppryxuuum" +path="res://.godot/imported/BuyButtonPressed.png-52bdb0fc073bf2229b077e5e2c770886.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://BuyButtonPressed.png" +dest_files=["res://.godot/imported/BuyButtonPressed.png-52bdb0fc073bf2229b077e5e2c770886.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/SellButton.png b/SellButton.png new file mode 100644 index 0000000000000000000000000000000000000000..55818d45fca74c63f69eb89f0e952b59b53ca68e GIT binary patch literal 1462 zcmeAS@N?(olHy`uVBq!ia0y~yU`z(G8#&m3q^RZXJ3xWfOlRi+PiJR^f};Gi%$!sP z291fe6Ky>XJIEZ3kKVdyDxa80;fa9QE!|xf*R(_yI;{|mDmB>o#W~~Bge5yHxYn_< z+l#H{(>u4zY6n--1NM&1&65{(Px-Nb$pxij&5!H$?Eb!^n*GP?)Mc||3mvZND9`ob zxOt~bpvG1Iki-FrT`Fm>HZPjd^!&%J_Wt$dhV!1*zB_+$`4eBZA1se7F7tL*%&n-p ze97{?uzQ4OP{;Ys&kMSDv?fWP&OPJR=4In56B^R{ z>2Kt8(R0yrt`R~u>+25A-`V$|! zpG-QrmC>!QGGu{M(VqwPA9hD?Hn4oC)+*%iygRqPhv8uCg22sh-zVSBo5RqU{=h5y zr*>(=v&mngyu0NXALc%Iv}@_f>H|;t41O%}ZhPXvIP0GiV}z9)bvwFP zemTEG+b*xW4D9U(GA3@iZgcPM-Fvt9r_cKPmtoS&qRl5ip5G3P7q%pCcNd1!Ao%SR zgAP!Hv%n*=n1Ml08H5=tmfDvA1=&kHeO=jKaPy1nGo~`F2gRsliEBiObAE1aYF-J0 zb5UwyNotBhd1gt5g1e`0KzJjcI0FN7ucwP+NX4zUcMbg>N5~v_XfGY(DyWoK)F_e} z^pvTikEyU-ra|jc&ohn?I|n`o@l?J8tSc_8Q<^eOsrPckI*l1wOV*?r2JJcKuy4K7 zrku}l57bXrRau_;{703cBD{P4>5h&cAKzBHxco`=Vz^cQ=Xbl`@?Ok zDKqGPn8oDK!zhrhD#1UzF|cjrsla zr{yP`|5N6B&RRB6#Z&w7y5jd{vafa={lOi%HmtC?`0}Z}>6;^c)F!*FoBO;nCO*FY z)OnTDn{-Tu;-rM@j(WM;r;Wl^UtN7%US3}N{CvOV7vF#X zzUw>C(w{Z^zVCHk9GLui!u_E1JEdQ%Z2zzA_!u56;<~o<$m5R{@4rr;eRkQWA4NOY z*vw0f%r;zSoVQ@sbrFUno(2i#4nrWVaE#&2rq*ZH-j_`_>8vibQ#f{Iic06!T?gc` zx<#6Yt+2ZK_p6V;fB!zEYc~7OuHQFv#3rA7;(YG*!aivmNw}#UhCnMm+eHl+H>%_BFVfKJ_g{WlqW}2R z{ngR0dUmht?(Vj*wKdIqEcST4isz(LwUzVd&C@!+{#O5vb#?pyCw}M2E4q_!X>V_y z_xRf^CL~J)k{g-}r#%1Z?c%cha_85oTsMY$2M^oVySp6e&%bXg$y_4>4t{Vz0iyvW zPN*apf8yh#=a+OCDva13WEe>7nZd^3e~f|sy?D{DgFEj0jr9iRUItHBKbLh*2~7Zg C9fR-y literal 0 HcmV?d00001 diff --git a/SellButton.png.import b/SellButton.png.import new file mode 100644 index 0000000..45ff4e1 --- /dev/null +++ b/SellButton.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://du8xy83ve1lm7" +path="res://.godot/imported/SellButton.png-a940d0a74daec8a650b2d33b6c2a6925.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://SellButton.png" +dest_files=["res://.godot/imported/SellButton.png-a940d0a74daec8a650b2d33b6c2a6925.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/SellButtonPressed.png b/SellButtonPressed.png new file mode 100644 index 0000000000000000000000000000000000000000..3a3b2eec408e9f61ad0454bbe881175195daff79 GIT binary patch literal 1475 zcmeAS@N?(olHy`uVBq!ia0y~yU`z(G8#&m3q^RZXJ3xWfOlRi+PiJR^f};Gi%$!sP z291fe6Ky>XJIEZ3kKVdyDxa80;fa9QE!|xf*R(_yI;{|mDmB>o#W~~Bge5yHxYn_< z+l#H{(>u4zY6n--1NM&1&65{(Px-Nb$pxij&5!H$?Eb!^n*GP?)Mc||3mvZND9`ob zxOt~bpvG1Iki-FrT`Fm>HZPjd^!&%J_Wt$dhV!1*zB_+$`4eBZA1se7F7tL*%&n-p ze97{?uzQ4OP{;Ys&kMSDv?fWP&OPJR=4In56B^R{ z>2Kt8(R0yrt`R~u>+25A-`V$|! zpG-QrmC>!QGGu{M(VqwPA9hD?Hn4oC)+*%iygRqPhv8uCg22sh-zVSBo5RqU{=h5y zr*>(=v&mngyu0NXALc%Iv}@_f>H|;t41O%}ZhPXvIP0GiV}z9)bvwFP zemTEG+b*xW4D9U(GA3@iZgcPM-Fvt9r_cKPmtoS&qRl5ip5G3P7q%pCcNd1!Ao%SR zgAP!Hv%n*=n1Ml08H5=tmfDvA1=&kHeO=jKaPy1n^X6=MtP2#9EOCt}an8@pP0cG| za4t$sEJ;mKD9o4dX&~o_1c`zT(XZyI{s@em7AWSbeg56D%#z)A-QLyK)yd8G z^UHghe(CjhWzR`r&tjk7%#FHU+5J(r$YkcRCy$SZ&9l9CyW8Dg&b;Wozq#MJC z|73jA-ln6y*-`uRy3cRS*1q18uf1Lq=qMz|MQocEef!j=p2a6io>ojdtG)jIy_=mT zzU#ldS)`F9oPMvgG`dQ!qj0jJURTub4)@0wr+$x@OOH(L z`Fy_e$^6e#A2+{s%r;zSoWEe!brFUno(2i#4nrWVaEw8xxaFDY>#x5z)>j0)u5##E zsp%wEC$?aScf^-j)v zmNB42WWvp;yj<R^L43cV zsK#n$m|XJD@4vr?+g&f;7!lH!|NhO944YMd?%oap2C{ASKbyL@U(ej$bM%Lv=cFZ{ zV(#V43yrJ)^>oXph96d!O!jU}XEV2ae|pZ`xihy{R{Js{g>#4Dfm=6DeEy@PwCM87 zBeTo%*K!;%t@`<>{C*E(9v6AZlGIfFZbt9gwQIRgGd!3Lbj@$B-^N$HHb01Z4a~|6 Mp00i_>zopr0IbxOW&i*H literal 0 HcmV?d00001 diff --git a/SellButtonPressed.png.import b/SellButtonPressed.png.import new file mode 100644 index 0000000..de8adba --- /dev/null +++ b/SellButtonPressed.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://qgsvhv16ghwf" +path="res://.godot/imported/SellButtonPressed.png-b273be20baf4b6e42e2e343931e3265f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://SellButtonPressed.png" +dest_files=["res://.godot/imported/SellButtonPressed.png-b273be20baf4b6e42e2e343931e3265f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Stock Ticker.tscn b/Stock Ticker.tscn new file mode 100644 index 0000000..425adef --- /dev/null +++ b/Stock Ticker.tscn @@ -0,0 +1,33 @@ +[gd_scene load_steps=7 format=3 uid="uid://by18nc16h76y0"] + +[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_button.gd" id="4_lfir0"] +[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"] + +[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="BuyButton" type="TextureButton" parent="."] +offset_left = 168.0 +offset_top = 450.0 +offset_right = 523.0 +offset_bottom = 579.0 +texture_normal = ExtResource("2_8qhml") +texture_pressed = ExtResource("3_4kqfi") +script = ExtResource("4_lfir0") + +[node name="TextureButton" type="TextureButton" parent="."] +offset_left = 649.0 +offset_top = 450.0 +offset_right = 1004.0 +offset_bottom = 579.0 +texture_normal = ExtResource("5_salj8") +texture_pressed = ExtResource("6_ifhss") diff --git a/UI-Background-Colour.png b/UI-Background-Colour.png new file mode 100644 index 0000000000000000000000000000000000000000..ddec89e846685bd4d17dda18a919a85b78d88719 GIT binary patch literal 546 zcmV+-0^R+IP)EX>4Tx04R}tkv&MmKpe$iQ>CJn4i-^S$WWc^q9Ts93Pq?;YK2xEOfLNpnlvOS zE{=k0!NHHks)LKOt`4q(Aou~|?BJy6A|?JWDYS_3;J6>}?mh0_0YbgZRI?)nsG4P@ z6LB${TM+}V=s^hm7{rLgOno+$O2Tt|-NVP%yC~1{KKJM7Rq`eSd?Im->4rtTPCUJ7 z>74h8!>lAJ#OK8023?T&k?XR{Z=8z`3p_JyWYTlQVPdh^#&R38lA#h$5l0kNqkJLj zvch?bvs$jQ<~{ifgL!RviR(0nk-!2Lk%9;rRcxRP3sG7%QcR?2Kknfla{MWB$>iDq zBgZ@{P$4;f@IUz7ty!3yaFc>@p!3DHKSqJTF3_mi_V=-EH%7!o38RxFxHau$~C6CjZVVu8dJ9J}3V@DO=`WS1+j;SNaLjsuuq z9UE1oRO`E54KCXyE1k~7JdDM==ld3{*NXTHI;NPCr_kOQDH7}q+J1j8_K>ghsyJE7KA!e!uJp@)}l6W>r7WdXW>+qbVnY?rL2VM zXS~AoW_o94y;l}=$agz<2*Nj2G7#}bmGCl;;^E%rF(6ed&UCVIREpY>bzhTV(45T}=>yF^NRcx(t_UDEgQug void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass From 7059818b6fc7a1ce7a305b07ec3e5870ac31ec99 Mon Sep 17 00:00:00 2001 From: Jacob Janzen Date: Fri, 15 Nov 2024 19:15:35 -0600 Subject: [PATCH 2/3] add stock screen --- Stock Ticker.tscn | 102 +++++++++++++++++++++++++++++++++++---- stonks.gd | 15 ++++++ templeos_font.ttf | Bin 0 -> 84460 bytes templeos_font.ttf.import | 34 +++++++++++++ text.tres | 8 +++ 5 files changed, 150 insertions(+), 9 deletions(-) create mode 100644 stonks.gd create mode 100644 templeos_font.ttf create mode 100644 templeos_font.ttf.import create mode 100644 text.tres diff --git a/Stock Ticker.tscn b/Stock Ticker.tscn index 425adef..3cc6378 100644 --- a/Stock Ticker.tscn +++ b/Stock Ticker.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=3 uid="uid://by18nc16h76y0"] +[gd_scene load_steps=9 format=3 uid="uid://by18nc16h76y0"] [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"] @@ -6,6 +6,8 @@ [ext_resource type="Script" path="res://buy_button.gd" id="4_lfir0"] [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://dx1tiwi1lo7om" path="res://text.tres" id="7_rtyuw"] [node name="Node2D" type="Node2D"] @@ -16,18 +18,100 @@ scale = Vector2(1153.5, 648.5) texture = ExtResource("1_1j58d") [node name="BuyButton" type="TextureButton" parent="."] -offset_left = 168.0 -offset_top = 450.0 -offset_right = 523.0 -offset_bottom = 579.0 +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") script = ExtResource("4_lfir0") [node name="TextureButton" type="TextureButton" parent="."] -offset_left = 649.0 -offset_top = 450.0 -offset_right = 1004.0 -offset_bottom = 579.0 +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="Price Label" type="Label" parent="."] +offset_left = 387.0 +offset_top = 387.0 +offset_right = 1112.0 +offset_bottom = 452.0 +theme = ExtResource("7_rtyuw") +text = "Price: +$" + +[node name="Shares Held Label" type="Label" parent="."] +offset_left = 6.0 +offset_top = 390.0 +offset_right = 336.0 +offset_bottom = 421.0 +theme = ExtResource("7_rtyuw") +text = "Shares +Held:" + +[node name="Timer" type="Timer" parent="."] + +[node name="Node2D" type="Node2D" parent="."] +script = ExtResource("7_ecbtd") + +[node name="Sprite2D" type="Sprite2D" parent="Node2D"] +position = Vector2(582, 205) +scale = Vector2(1062.25, 337) +texture = ExtResource("1_1j58d") + +[node name="TopLine" type="Line2D" parent="Node2D"] +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="Node2D"] +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="Node2D"] +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="Node2D"] +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="Node2D"] +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="Node2D"] +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="Node2D"] + +[connection signal="timeout" from="Timer" to="Node2D/Sprite2D" method="_on_timer_timeout"] diff --git a/stonks.gd b/stonks.gd new file mode 100644 index 0000000..a853edf --- /dev/null +++ b/stonks.gd @@ -0,0 +1,15 @@ +extends Node2D + + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass + + +func _on_timer_timeout() -> void: + pass # Replace with function body. diff --git a/templeos_font.ttf b/templeos_font.ttf new file mode 100644 index 0000000000000000000000000000000000000000..517ad2a674995541bd44e39d12253b4e37c969f8 GIT binary patch literal 84460 zcmeHw34C3}b@$AbEDJEkY({_q*+yV6Hqz6REQ2uKWJChkU>36kWV~Zx3olp%Z|n+C z;sBvENfWXWXK6yxB&AJC+$42q>Qb7dga#7aBu)9!l=w?2as4^=_dhdp=FQAq-hEGU zmfx>ens;WqGw1xzIWu$T-Fu&qLWoiLs1;)7>^Y6keEgQr3VFd(LdZ>BGiP761vmi1e7b^Up1;`{!r3;oJeF zdlucgu&?X2Uwv7KI@GUUyy*6IjbdzchY%y5M0xG9g=_l`9uzg`kJ9zadhb}ev+yUs z65^Pj3fa)Te96Ma-wjDu(==U*U{W1y{i{3 ze5~%W1!(^RNYA--VSiurG1-Fh<*47dYT>O*c0T>a3Lz(+BSf^YZ}r-BpZwrOdxe|? zo<|K6gayL#SDs&c(@~xOEsm%`yF$G7xOjVs9=xaK^_rDP*Ncd9ap0Vql?U$;*XjEB zq?X*HmU5zT_?WJ;=}f6=O&60@PHoNWa+?^2S`S8FMb5*T%H5(xqIM*P9j5Auts;8& zF`}WLJD<0-YcVn#4<0l;tQ4E5=8jP~>o&z{qmbZfEaei1ipzbdW&Y#_u@8Tg!Y5L; z#Eq$1rjDCmVVwFArZ=}A+kaMjh6fVle~&+01onBXD{D>6iI)gvJziy-@N4@iTj`KS z{60-eZh+Ma4z~Y&%9afhX>nWIZyDM0P54m!AdfN!^=Q1A`YIjl>!lp+k8V04u6X2p zj8ho5g}^vUGe^xFHI|9tH_~XX@@vH5D!;boB&6qI+#4oFiOu5E;>+S|;_t*u;-})5 z;-GAe&a8Q?=94wwtd+H=*G{aRT|2k-^2SrgjvhOI?832+jXQN*_qZiZQPY^F)0@s| zDmHaC^)@{=an0_jyQgFB5Ta3hSbSc5MSK%2zAAnueuWm#K#L!(`8--YruK~5NwpWD z#Zy#^J!9W9?j*Fhut_wHur1DO+B&gsx1<&i{se7`gU=xRDZ*n2*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gc`QtZy3HXP3%`4;f+}A&kdAu8YvvdUeY{{(-0?$?i8hRI`$$^y@Qm%!R=5Q zx%8$j(QXcEmCmF37a|Xz%~KTJYuh=X(g*6^0!6Q?Uqst4RP9V@CQ7{$AC!MU(YNY| zs`_Z3@~K^Xs`gcVlmC{=e@nHm_%r+*L_Vc|4N6il-&<7szgB6LZ`z@H?d`u-^$+4e zHFZ#&k3Hr%${geB_1{&W(tkhPp#QdRduH!5+qR1O?&W)zcat6Qv2n+ajdh)SUViz_ zT|e42QtTCb;gHbSu3zkbb(iSu?VUywFGhPzX6l^%7zXIrk7*st0MdWY4vYqLh><6s z4DQYG^2>d+-cYp(Iz;-7*P}%orbPWNOJn!8?nY!ZZtLC#I}`9)*lz=@u(5H6Xq-2F z&-Cg2`ULU|RKx)S`@~99(|P!o=JiqJ@8adY#=e(@cxw7~mEJnAeed>xtzzr$0bNcW zKCqyE6g7cko+hIE866qbsQm;57+jFohwA8NVB7Wu&%zItpESZ>_NqUz0~1mYs!e}t z_xAb;{f*Q6ruQT42KRdr`ta4~>tgw+j!}K1_8@ead@*XFNvk`pkghZ7;}NH$4z=k@0Kc9kXgnQWzaLi#`U*k3 S_Q;oLjW1q%oPO6;)Bg`2DVI9{ literal 0 HcmV?d00001 diff --git a/templeos_font.ttf.import b/templeos_font.ttf.import new file mode 100644 index 0000000..bcfd2cb --- /dev/null +++ b/templeos_font.ttf.import @@ -0,0 +1,34 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://3e6fuwt5giyn" +path="res://.godot/imported/templeos_font.ttf-3df095bd9bdc9ad857a60b3667a243a3.fontdata" + +[deps] + +source_file="res://templeos_font.ttf" +dest_files=["res://.godot/imported/templeos_font.ttf-3df095bd9bdc9ad857a60b3667a243a3.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/text.tres b/text.tres new file mode 100644 index 0000000..33c1755 --- /dev/null +++ b/text.tres @@ -0,0 +1,8 @@ +[gd_resource type="Theme" load_steps=2 format=3 uid="uid://dx1tiwi1lo7om"] + +[ext_resource type="FontFile" uid="uid://3e6fuwt5giyn" path="res://templeos_font.ttf" id="1_3hk8o"] + +[resource] +Label/colors/font_color = Color(0, 0, 0, 1) +Label/font_sizes/font_size = 30 +Label/fonts/font = ExtResource("1_3hk8o") From 4f5d964c6890f3281e8673905ab0158dca0ebcf8 Mon Sep 17 00:00:00 2001 From: Jacob Janzen Date: Fri, 15 Nov 2024 19:55:15 -0600 Subject: [PATCH 3/3] complete stock mostly --- Stock Ticker.tscn | 101 ++++++++++++++++++++++++---------------------- buy_button.gd | 11 ----- buy_n_sell.gd | 25 ++++++++++++ stonks.gd | 41 ++++++++++++++++++- text.tres | 2 +- 5 files changed, 118 insertions(+), 62 deletions(-) delete mode 100644 buy_button.gd create mode 100644 buy_n_sell.gd diff --git a/Stock Ticker.tscn b/Stock Ticker.tscn index 3cc6378..ad5bfc3 100644 --- a/Stock Ticker.tscn +++ b/Stock Ticker.tscn @@ -1,13 +1,13 @@ -[gd_scene load_steps=9 format=3 uid="uid://by18nc16h76y0"] +[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_button.gd" id="4_lfir0"] +[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://dx1tiwi1lo7om" path="res://text.tres" id="7_rtyuw"] +[ext_resource type="Theme" uid="uid://cte81ypvmrsrv" path="res://text.tres" id="7_rtyuw"] [node name="Node2D" type="Node2D"] @@ -17,69 +17,35 @@ position = Vector2(576.25, 323.75) scale = Vector2(1153.5, 648.5) texture = ExtResource("1_1j58d") -[node name="BuyButton" type="TextureButton" parent="."] -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") -script = ExtResource("4_lfir0") - -[node name="TextureButton" type="TextureButton" parent="."] -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="Price Label" type="Label" parent="."] -offset_left = 387.0 -offset_top = 387.0 -offset_right = 1112.0 -offset_bottom = 452.0 -theme = ExtResource("7_rtyuw") -text = "Price: -$" - -[node name="Shares Held Label" type="Label" parent="."] -offset_left = 6.0 -offset_top = 390.0 -offset_right = 336.0 -offset_bottom = 421.0 -theme = ExtResource("7_rtyuw") -text = "Shares -Held:" - [node name="Timer" type="Timer" parent="."] +autostart = true -[node name="Node2D" type="Node2D" parent="."] +[node name="Stonks" type="Node2D" parent="."] script = ExtResource("7_ecbtd") -[node name="Sprite2D" type="Sprite2D" parent="Node2D"] +[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="Node2D"] +[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="Node2D"] +[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="Node2D"] +[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="Node2D"] +[node name="Top" type="Label" parent="Stonks"] offset_left = 1021.0 offset_top = 58.0 offset_right = 1114.0 @@ -90,7 +56,7 @@ theme_override_font_sizes/font_size = 12 text = "0" horizontal_alignment = 1 -[node name="Middle" type="Label" parent="Node2D"] +[node name="Middle" type="Label" parent="Stonks"] offset_left = 1022.0 offset_top = 208.0 offset_right = 1115.0 @@ -101,7 +67,7 @@ theme_override_font_sizes/font_size = 12 text = "0" horizontal_alignment = 1 -[node name="Bottom" type="Label" parent="Node2D"] +[node name="Bottom" type="Label" parent="Stonks"] offset_left = 1022.0 offset_top = 356.0 offset_right = 1115.0 @@ -112,6 +78,45 @@ theme_override_font_sizes/font_size = 12 text = "0" horizontal_alignment = 1 -[node name="Stonks" type="Line2D" parent="Node2D"] +[node name="Stonks" type="Line2D" parent="Stonks"] -[connection signal="timeout" from="Timer" to="Node2D/Sprite2D" method="_on_timer_timeout"] +[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"] diff --git a/buy_button.gd b/buy_button.gd deleted file mode 100644 index 474dd4c..0000000 --- a/buy_button.gd +++ /dev/null @@ -1,11 +0,0 @@ -extends TextureButton - - -# Called when the node enters the scene tree for the first time. -func _ready() -> void: - pass # Replace with function body. - - -# Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta: float) -> void: - pass diff --git a/buy_n_sell.gd b/buy_n_sell.gd new file mode 100644 index 0000000..be0e777 --- /dev/null +++ b/buy_n_sell.gd @@ -0,0 +1,25 @@ +extends Node2D + +var stonks = 0 + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + var label = $"Shares Held Label" + label.text = "Shares\nHeld:%d" % stonks + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass + + +func _on_buy_button_button_up() -> void: + if stonks < 100: + stonks += 1 + var label = $"Shares Held Label" + label.text = "Shares\nHeld:%d" % stonks + +func _on_sell_button_button_up() -> void: + if stonks > 0: + stonks -= 1 + var label = $"Shares Held Label" + label.text = "Shares\nHeld:%d" % stonks diff --git a/stonks.gd b/stonks.gd index a853edf..9b7b845 100644 --- a/stonks.gd +++ b/stonks.gd @@ -1,9 +1,22 @@ extends Node2D +var price_history = [] +var max_prices = 15 +var max_up_multiplier = 2 +var max_down_multiplier = 2 +var bailout_counter = 0 +var bailout_time = 1 + +var bailout_price = 5 +var start_val = 5 +var prev_price = start_val # Called when the node enters the scene tree for the first time. func _ready() -> void: - pass # Replace with function body. + print(start_val) + var label = $"Price Label" + label.text = "Price:\n$%f" % start_val + price_history.push_front(start_val) # Called every frame. 'delta' is the elapsed time since the previous frame. @@ -12,4 +25,28 @@ func _process(delta: float) -> void: func _on_timer_timeout() -> void: - pass # Replace with function body. + var new_price = prev_price + + if prev_price <= 0: + if bailout_counter < bailout_time: + new_price = 0 + bailout_counter += 1 + else: + new_price = bailout_price + bailout_counter = 0 + elif randf() < 0.5: + new_price += 1 * max_up_multiplier * randf() + else: + new_price -= 1 * max_down_multiplier * randf() + + if new_price < 0: new_price = 0 + + if len(price_history) >= max_prices: + price_history.pop_front() + price_history.push_back(new_price) + prev_price = new_price + + var label = $"Price Label" + label.text = "Price:\n$%f" % new_price + + print(new_price) diff --git a/text.tres b/text.tres index 33c1755..a724622 100644 --- a/text.tres +++ b/text.tres @@ -1,4 +1,4 @@ -[gd_resource type="Theme" load_steps=2 format=3 uid="uid://dx1tiwi1lo7om"] +[gd_resource type="Theme" load_steps=2 format=3 uid="uid://cte81ypvmrsrv"] [ext_resource type="FontFile" uid="uid://3e6fuwt5giyn" path="res://templeos_font.ttf" id="1_3hk8o"]