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 Classic Chat / [SOLVED] Message with 2 Buttons

Author
Message
dbenv9
6
Years of Service
User Offline
Joined: 24th May 2017
Location:
Posted: 10th Dec 2019 22:09
How can I show a message box with two buttons (For example: "Yes" or "No")? Is there already any similar function?

The author of this post has marked a post as an answer.

Go to answer

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 11th Dec 2019 09:38 Edited at: 11th Dec 2019 10:41
This post has been marked by the post author as the answer.
OryUI has a script that lets you add dialogs with as many buttons as you need and they are quite customisable. It has been built for percentage based positioning and sizing. Not really tested with pixel sizing and positioning, but should work.

Some examples can be found here https://forum.thegamecreators.com/thread/223719#msg2642121

Link to framework in signature below. You wouldn't need to include all files if you want dialogs only. You'd only need the main one, dialogs, and maybe the touch script.

You're welcome to extract anything useful from it and create a simpler version for your needs and project

I probably should add a disclaimer that the latest version of AppGameKit may have broken OryUI completely as they've changed the way ScreenToWorldX and ScreenToWorldY work. If they don't revert it back to how it used to be I would have to update the framework but I can't do that at the moment due to time and not being able to get the latest version of AppGameKit running on my laptop.
OryUI - A WIP AGK2 UI Framework
dbenv9
6
Years of Service
User Offline
Joined: 24th May 2017
Location:
Posted: 11th Dec 2019 19:01
Thank you, both of you. OryUI seems more interesting to me because it would also work with android and ios. Now I just have to understand how it works.
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 11th Dec 2019 20:23
Feel free to message me if you have any problems/questions with it. There is a wiki section on github and I started to work on a kitchen sink demo but not finished it yet. I'll try and put together a dialog demo for you shortly. The wiki page on github shows you how to create and show a dialog, but the demos look like you'd only use them the once when actually you can show/hide the same dialog as often as you want and change the text and buttons each time.
OryUI - A WIP AGK2 UI Framework
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 11th Dec 2019 22:14 Edited at: 11th Dec 2019 22:21
Below you'll find an example project that has 3 different dialogs. It re-uses the same dialog each time a dialog is shown. I haven't changed the style/colours in this example but this page has examples showing how you can change the colours: https://github.com/KevinCrossDCL/OryUI/wiki/OryUIDialog

It turns out that the DefaultSettings file is reliant on some of the other files being included so I've included them all. That may seem like a lot if you only want dialogs but like I say you're welcome to extract/adapt code from it and create a simpler version for your dialogs if that's all you want from it.

I've not tested this on the latest version of AppGameKit as I can't install it.



I posted some screenshots where I'm using OryUI in an app on this thread https://forum.thegamecreators.com/thread/225422
OryUI - A WIP AGK2 UI Framework

Login to post a reply

Server time is: 2024-03-29 06:28:44
Your offset time is: 2024-03-29 06:28:44