Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

clicking a widget to make another widget appear

A topic by one flying squid created Dec 21, 2023 Views: 103 Replies: 2
Viewing posts 1 to 3
(+1)

Hi! I found Decker trough Wiggly paint and was immediately interested. I've downloaded it and have been playing doctor frankesntein by dissecting other people's work to understand how everything works. I have always been a fan of point and click games and this seems like the perfect tool for me to give making one a try! However, I am not the best at coding and even the written guide (super helpful and well organized, may I say) leaves me in the dark sometimes, so I have this one question flowing around my head: If i want to create an invisible button on top of a picture of an object (like a photograph laid on a shelf, for example) and want a field with the description to appear as I click it, do I have to create a new card with the exact same layout but with the added field or is there a way to make the field appear when I click the button and make it dissapear when I click another button or even the same one? I'm aware of the "alert" command, and it is useful and might just give me a way out, but the text appearing every single time right in the middle of the screen just seems like a bit too much in some cases. Thanks a lot for the amazing programm and sorry for the long text. ヾ(•ω•`)o

Developer(+1)

Welcome to the beginning of your Decker adventure!

I wrote a thread with some very short scripting examples a while back over here: https://itch.io/t/2929513/scripting-one-liners

The "Showing and Hiding" section illustrates doing what you're interested in with widget.toggle[...]. The Decker 1.22 release notes, when this feature was added, includes some additional examples.

If you want less obtrusive and more flexible alternatives to alert[], the Dialogizer library might be handy, but you'll probably have more luck if you spend some time coming to grips with the basics before diving into it.

Does any of that help point you in the right direction?

(+1)

Thank you so much!