Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / Loki GUI - Virtual Buttons [ code ]

Author
Message
Yeshu777
4
Years of Service
User Offline
Joined: 26th Feb 2020
Location: Cymru
Posted: 20th Aug 2023 22:48 Edited at: 21st Aug 2023 01:29
Hi All,

Thought I'd share this.. as the inbuilt Virtual Button functionality has various drawbacks.

It's a snippet from my new GUI system, it's a WIP but thought this might help others.



So quite simply..

On intialise / start of program.. to create a button



Then in main loop.. call this function to update the on and off press



The VirtualButton functionally can process the selection / mouse click in the usual manner..

All the best,

Yeshu777
Yeshu777
4
Years of Service
User Offline
Joined: 26th Feb 2020
Location: Cymru
Posted: 21st Aug 2023 21:23 Edited at: 22nd Aug 2023 14:00
Updated - sprite_id and text_id are now assigned dynamically...



Creation and event handling :



And an example of how it looks ..

Attachments

Login to view attachments
Aidan
User Banned
Posted: 22nd Aug 2023 09:25
Hello.

I can't test any of this as yet but from what I've seen of your works already

https://forum.thegamecreators.com/thread/229182#msg2674770

I'm pretty sure that this is good and useful also.

Thanks for your codings for later
Yeshu777
4
Years of Service
User Offline
Joined: 26th Feb 2020
Location: Cymru
Posted: 22nd Aug 2023 12:32
Hi Aidan,

It's simply a starting point for others to expand upon - and it's always nice to contribute.

There should be space in the November / December Newsletter detailing what I've been up to using AGK.

Diolch!







Login to post a reply

Server time is: 2024-05-02 22:59:50
Your offset time is: 2024-05-02 22:59:50