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 / [Announcement] - Nuklear-Plugin an immediate mode GUI

Author
Message
MadBit
Valued Member
11
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 16th Jun 2020 09:35
Hi, guys,

I was often asked if I could include some Windows controls in my file explorer plugin. I was of the opinion that the effort is too big to make it available to only one system (Windows). So I searched for other possibilities.

Now AGK-Studio uses ImGui for their IDE as far as I know. This is a very powerful GUI interface. I think the latest hints from TGC suggest that they will include it in AppGameKit. The way it sounded only for the STUDIO version. But what I didn't like about ImGui is the fact that it can't use skins. I mean replacing buttons and other controls with images. While searching for other libraries I stumbled upon Nuclear. This is also a so called 'immediate mode graphical user interface' I don't think it's as powerful as 'Dear ImGui' but it's easier to integrate and you can use your own skins. I think this makes sense for AppGameKit. So you can create and use atmospheric skins for games.

The difference between Event-Based-GUI's and the Immediate Mode-GUI's is very big. This required some rethinking for me. It has its pitfalls and certainly its advantages. Because of the architecture of AppGameKit compared to Nuklear, I haven't been able to move all functions from Nuklear to AGK.
I am not ready to provide this plugin yet. But I have already achieved a lot. Here I show you some GIF's, what is possible with it at the moment. The plugin will be available for Windows and Linux for now.

First you can see the style/skinning demo here. The TaharezLook Skin I took from CEGUI. But it was designed by Lars Rinde. Thanks for that . I only added one or two objects.
The skinning properties of Nuklear were kept very basic. I pimped that a bit for AGK. You can change the skinning either in the program or via an XML file. Nuklear only stretched the included images and so the buttons looked a bit distorted. I gave the engine a so-called 9-patch image. That means the images can now be provided with state edges (top, bottom, left, right).



This gif shows what nuclear could look like in the game. I designed the controls myself. Excuse my artistic skills are not that high. Graphically, there is certainly more to be gained.



Finally, I will show you two standard dialog boxes. There are only two at the moment. A MessageBox and a file selector box. Both can be customized with flags. The fileselection box for example is used to select files which can be loaded or saved. But you can also customize it to select folders.



I'd like to know what you think about that. Should I keep at it? Or is it all nonsense since STUDIO provides a GUI anyway. I'm also open for suggestions and ideas.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
blink0k
Moderator
7
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 16th Jun 2020 10:22
WOW. That is spectacular Mr Bit. Super awesome work
Do you have some code examples for creating/manipulating controls?
When do you think you'll release it?
MadBit
Valued Member
11
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 16th Jun 2020 12:23 Edited at: 16th Jun 2020 12:25
Here's a little taste.

It is necessary to create a style. It all works via xml-tags.

there style items are used - checkbox and col_green_transparent - they must be created before.

The checkbox item uses an image (img_checkbox) in this case a 9-patch image. This must also be created first.

This command sets the final style for the ProgressBar. And does not need to be called again.
nk.StyleSetContext("progress")

If I release the plugin I will also do a small style tutorial. But when I release it I can only say - if I have the feeling that it runs smoothly. I might let someone try it as a closed apha test.

The really biggest problem is that I can't deliver/write good documentation. There are now 266 commands without documentation it is hard to handle. However, there is a documentation on the nuclear site where everybody can derive the description of the commands.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
MadBit
Valued Member
11
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 16th Jun 2020 21:48
I just noticed that the above example is not really understandable. Here I show how to create a small demo window. This is the first test run I had done. Without skinning.



This is the result
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
blink0k
Moderator
7
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 17th Jun 2020 00:12
Cannot wait!
Scraggle
Moderator
16
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 17th Jun 2020 08:00
I think a lot of people would love to be able to use this.
Great work!
MadBit
Valued Member
11
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 21st Jun 2020 11:49
Hi,

Thank you both.

I have now converted a new demo. With the success that I had to add some functions to the library.
First of all - the pie-menu is not a buildin function. It is written with the plugin in AGK.

Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
george++
13
Years of Service
Recently Online
Joined: 13th May 2007
Location: Hellas
Posted: 23rd Jun 2020 05:26
Hi MadBit,
I subscribed to this thread. Excellent work as usual
PartTimeCoder
AGK Tool Maker
5
Years of Service
User Offline
Joined: 9th Mar 2015
Location: Suffolk UK
Posted: 23rd Jun 2020 20:34
Thats pretty smart, I like it, sign me up, when can I preorder?

Does it support menubars and toolbars?

Jack
15
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 24th Jun 2020 04:58
Awesome GUI.
I really like to customize menus so I really love the possibility in your plugin.

Will it also be possible to create a listview with multiple menu items in it, like images, buttons, text,
something like a server browser for example?:

MadBit
Valued Member
11
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 24th Jun 2020 08:22 Edited at: 24th Jun 2020 08:23
Thank you all.

PartTimeCoder wrote: "Does it support menubars and toolbars?"

Yes of course is also available.

Jack wrote: "Will it also be possible to create a listview with multiple menu items in it, like images, buttons, text,
something like a server browser for example?:"

Something like this should be possible. Such a listbox is not available as buildin function. But you can customize it.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
MadBit
Valued Member
11
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 26th Jun 2020 17:09
I accepted Jack's example as a challenge to rebuild such a listbox.
Just to see how I would implement the listbox with nuklear.

This is what came up.

Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
george++
13
Years of Service
Recently Online
Joined: 13th May 2007
Location: Hellas
Posted: 26th Jun 2020 21:24
Very nice MadBit.
Do you have a time plan for public release? You can count on me if you need a tester!
blink0k
Moderator
7
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 26th Jun 2020 23:25
me too!
MadBit
Valued Member
11
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 27th Jun 2020 08:05
@george++
thanks. I don't have a schedule. When I think it's ready, I'll publish it.

I sent you both (blink0k, george++) a pm.

Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
gosukiwi
User Offline
Joined: 24th May 2020
Location: Argentina
Posted: 27th Jun 2020 19:59
@MadBit: Looks awesome!!

It will be great to have this, even if they implement GUI for Studio, this would still work for Classic, so it's totally worth it IMO. And even if they implement GUI for Classic too, alternatives are always welcome!
MadBit
Valued Member
11
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 27th Jun 2020 20:21
I have written and tested it for the classic version.
If it works with Studio I don't know. But as long as the Studio version provides the same plugin interface and the standard GLSL shaders work, it should work with it.
I can't test it, because I don't own Studio.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Jack
15
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 28th Jun 2020 02:55 Edited at: 28th Jun 2020 03:42
Just awesome.

Your example shows the potential of the plugin to display big chunks of organized data.
Great work


I can help you to test on Studio, once you go beta, but I can't imagine any problem.

If you need some simple media generation, add my 2d Shader primitives shaders to your plugin, so the users can generate images for buttons.
I always had them in my GUI systems to replace a lot of media loading/creation with generation. It was very usful to create
buttons of diffrent type. I even created some games based on primitives with it. The coolest part about it is, that it enables two images to be set as main fill and border fill background. All four years, rounded corners on images/ buttons and elements become a thing
If you need some specific reworks, drop me a line. This may be a usful addition to your already great plugin.

shaders found here:
https://forum.thegamecreators.com/thread/214598?page=3

Example Image:

DannyD
2
Years of Service
Recently Online
Joined: 29th Aug 2017
Location:
Posted: 28th Jun 2020 16:07
awesome. Will this be for Windows only? or android /HTML5 support?
MadBit
Valued Member
11
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 29th Jun 2020 17:07
@jack
Thanks for your offer / suggestion. But I would have to change too much of the nuclear code that isn't mine. I want to implement the basics first. but thank you.

@DannyD
it's for desktop systems, so Windows and Linux. If I ever get a Mac between my fingers I will put it on it.
As far as I know the AppGameKit player for Android, iOS and Html do not support the plugin interface.

Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
DannyD
2
Years of Service
Recently Online
Joined: 29th Aug 2017
Location:
Posted: 30th Jun 2020 14:18
@madbit

Thanks. Let me know if you need testers.

Will this be commercial / Free? Will be interested in this plugin...

Login to post a reply

Server time is: 2020-07-04 17:15:37
Your offset time is: 2020-07-04 17:15:37