From a11b25379447c206003f9603304d33902abd672d Mon Sep 17 00:00:00 2001 From: elioat Date: Mon, 4 Dec 2023 16:16:19 -0500 Subject: deck go brrrrr --- decker/global.deck | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ decker/learning.txt | 4 ++++ 2 files changed, 58 insertions(+) create mode 100644 decker/global.deck create mode 100644 decker/learning.txt diff --git a/decker/global.deck b/decker/global.deck new file mode 100644 index 0000000..50921a0 --- /dev/null +++ b/decker/global.deck @@ -0,0 +1,54 @@ +{deck} +version:1 +card:0 +size:[512,342] +name:"global.deck" + +{card:home} +script:"home.0" +{widgets} +up:{"type":"button","size":[60,20],"pos":[272,123],"script":"home.1","text":"Up"} +down:{"type":"button","size":[60,20],"pos":[272,160],"script":"home.2","text":"Down"} +counter:{"type":"field","size":[100,20],"pos":[140,140],"script":"home.3","value":"10"} + +{script:home.0} +on view do + +end +{end} + +{script:home.1} +on click do + counter.text:counter.text+1 +end +{end} + +{script:home.2} +on click do + counter.text:counter.text-1 +end +{end} + +{script:home.3} +on change val do + +end +{end} + +{card:banana} +script:"banana.0" +{widgets} +warp:{"type":"field","size":[100,20],"pos":[206,161],"script":"banana.1","value":"Counter is 10"} + +{script:banana.0} +on view do + warp.text:"Counter is ",home.widgets.counter.text +end +{end} + +{script:banana.1} +on change do + +end +{end} + diff --git a/decker/learning.txt b/decker/learning.txt new file mode 100644 index 0000000..aa4c5b3 --- /dev/null +++ b/decker/learning.txt @@ -0,0 +1,4 @@ +Info on having data persist between cards in a deck: + +- https://itch.io/t/2702720/how-to-have-interaction-between-cards +- https://itch.io/post/8476011 \ No newline at end of file -- cgit 1.4.1-2-gfad0