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/AppGameKit Studio Showcase / [GUI Plugin] Nuklear an immediate-mode graphical user interface

Author
Message
MadBit
VIP Member
Gold Codemaster
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 4th Mar 2021 19:03
I will let the user decide whether to include both tag files or just one.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 5th Mar 2021 23:24
I noticed that there were some errors with the sample code
MadBit
VIP Member
Gold Codemaster
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 7th Mar 2021 06:46
That's possible, I haven't looked at the sample code lately.
Can you tell me in more detail what these errors are?
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 7th Mar 2021 20:03
One for example in AGK-Projects\extended-demo is
bounds = nkWidget()
main.agc:217:Error: Number of parameters does not match function declaration for "nkwidget", expected 1 parameters

There was another where init(var) no longer requires a parameter
MadBit
VIP Member
Gold Codemaster
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 8th Mar 2021 07:13
Ah, thanks, I'll update it for the next release.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
kazuki
5
Years of Service
User Offline
Joined: 8th Feb 2019
Location: Japan
Posted: 10th Mar 2021 18:40
utf-8 was supported !
I tried to compile & run "Font Exampe 17" from Nuklear Dokumentation.pdf.

Excellent work.
Thank you very much.
MadBit
VIP Member
Gold Codemaster
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 10th Mar 2021 19:13
Thank you.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 13th Mar 2021 02:37
MadBit, can I ask, how did you link to the AppGameKit OpenGL context to Nk, I am trying to setup a UI system in tier 2 but not sure how to set it up to work with AppGameKit, I can get Nk running standalone but cant find any info on adding to an existing context.
MadBit
VIP Member
Gold Codemaster
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 13th Mar 2021 05:18
I just use GLEW for that.


That's about it. There are still a few other things that need to be done to link agk with nuklear.
I have only followed the democode of nuklear. (nuklear_sdl_gl3.h)

If you want you can get the tier2 version of my plugin.
I am almost done with it.
The Linux support is still missing.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 13th Mar 2021 17:29
Quote: "If you want you can get the tier2 version of my plugin."

It interests me, too
MadBit
VIP Member
Gold Codemaster
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 13th Mar 2021 18:54
I have sent you a PM.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 13th Mar 2021 19:31
Quote: "If you want you can get the tier2 version of my plugin."


Yes please.
DewarInversion
3
Years of Service
User Offline
Joined: 27th Mar 2021
Location:
Posted: 28th Mar 2021 19:45
Hi folks. I successfully down loaded Nuklear and added it into Studio as a plugin. However, running from within studio, Nuclear plugin code crashes the app and the window closes. I'm running windows 10. One demo which does work is the Skinning.agk demo. This works for normal skins but the TaharezLook.skin is broken. All of the other widgets look good and work, (colour pickers etc)

My initial thoughts are this is a studio IDE thing. Problems occur around code which use the //~ scripting element. Deleting code code or commenting code after this element breaks at run time.

Is there any plan to implement Nuklear support into studio? I understand Classic 2 works fine with Nuclear and want to try that out at some point, but my focus for the moment is in studio tier 1 and after running Skinning and trying out the functions this looks to be a great feature to implement into my code sometime in the near future. The menu widget is esspecailly appealing.
MadBit
VIP Member
Gold Codemaster
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 29th Mar 2021 05:13
Hello and welcome to the forum,

Nuklear works in Studio only with the OpenGL rederer.
So in the code just put #renderer "Basic" in the first line then it should work.

The thing you mentioned with the commenting out (//~). I can't say anything about that since I don't have Studio to test it.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
DewarInversion
3
Years of Service
User Offline
Joined: 27th Mar 2021
Location:
Posted: 31st Mar 2021 01:18
Hello, thank you for the reply. Unfortunately this hasn't resolved the issue.

Windows Crash Log states:
Faulting module name: nvoglv64.dll, version: 27.21.14.5671, time stamp: 0x5f75532b




I managed to get extended.agk to work. I have a lot of learning to do with both agk and Nuklear so will try it with Classic and see what I can get.
DewarInversion
3
Years of Service
User Offline
Joined: 27th Mar 2021
Location:
Posted: 31st Mar 2021 01:52 Edited at: 31st Mar 2021 01:53
Sorry, here's the code

Attachments

Login to view attachments
MadBit
VIP Member
Gold Codemaster
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 31st Mar 2021 19:14
Try a driver update.

I can't think of anything else.

P.S.
Please use the code tag of the forum for code snippets. That makes the copy / past easier
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
DewarInversion
3
Years of Service
User Offline
Joined: 27th Mar 2021
Location:
Posted: 1st Apr 2021 04:10 Edited at: 1st Apr 2021 04:15
this is better, thanks. I have nuk working in tier 1 now and it's a lot of fun.

fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 11th Apr 2021 23:14
is there a way to make menu items use a strikethrough character (as if they are not implimented yet

I also cant see a way to increase font size

any help would be greatly appreciated

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 11th Apr 2021 23:48 Edited at: 12th Apr 2021 19:24
For font size, You need to load the font with the size you need and add it to the font stash and set the font when you add the item to the menu.

From the extended demo

load fonts




use font




Not sure about strikeout, for disabled menu items I usually just grey out the text (as OS Menus also do)
MadBit
VIP Member
Gold Codemaster
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 12th Apr 2021 05:45
Changing the font size is as described by PartTimeCoder.

Crossing out or underlining fonts is not supported by nuklear. At least not in a simple way.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 13th Jun 2021 12:16
Hi guys downloaded this to see what it's like and quite like it . Don't know what I'm gonna use it for but nice to know it's there. Played with it for a couple of hours last night . Managed to install the plugin with no problems and was up and running in no time. When the program is packaged and ready to ship am I right in presuming I need the .exe file the media file and the plugin folder to use my finished product. ?
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 13th Jun 2021 17:21
Quote: "I need the .exe file the media file and the plugin folder to use my finished product. ?"


Yes, The IDE will package everything into your project folder just copy the folder and remove the source files, zip and upload.
Bored of the Rings
User Banned
Posted: 14th Jun 2021 21:11
Great plugin. I have an error re: NKWIDGET() command (see pic)



I can't locate the issue at the moment, the command is expecting 1 param but no idea what that is yet, any ideas?

thanks


Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 14th Jun 2021 22:53 Edited at: 14th Jun 2021 22:55
pass 'total_space' into nkWidget()

wkWidget accepts a nk_rect type

nkWindowGetContentRegion() returns a nk_rect type

seems to make sense
MadBit
VIP Member
Gold Codemaster
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 15th Jun 2021 05:20
Thanks for finding it. I had changed the functionality a bit from nkWidget.

PartTimeCoder is right so far.
The result is written to the rect type passed as reference.
From nkWidget you get as return a widget layout state. (NK_WIDGET_INVALID, NK_WIDGET_VALID or NK_WIDGET_ROM)
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Bored of the Rings
User Banned
Posted: 15th Jun 2021 06:14
ah yes, thanks both, makes sense.

Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 15th Jun 2021 06:49 Edited at: 15th Jun 2021 07:33
ok for further info, parsing total_space into nkWidget produces error in log i.e. bounds = nkWidget(total_space) = Error tried to assign integer to Type

bounds = total_space produces no error and is fine because the type structure is the same i.e. nk_rect type contains x,y,w,h float values

[update-seems like parsing bounds = nkWidgetBounds() compiles/works fine, checking my AppGameKit install again as I seem to have 2 different versions of nuklear.agc with different versions of function nkWidget()]

Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
MadBit
VIP Member
Gold Codemaster
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 15th Jun 2021 09:16
As I said before. I made some changes and forgot to adjust the demos.
The correct way would be nkWidget(bound).
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Bored of the Rings
User Banned
Posted: 15th Jun 2021 11:49 Edited at: 16th Jun 2021 20:45
[edited]
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 3rd Jul 2021 07:07
Is there a widget that supports the same functionality as the panels in the ide?
So i can resize them and they grow/shrink to fill the space.
MadBit
VIP Member
Gold Codemaster
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 3rd Jul 2021 16:51
Nuklear does not provide any special functions for this.
But you can programme the behaviour yourself.
An example of this would be in the Overview_new.agc code. From line 1245 to 1414
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 3rd Jul 2021 23:19
I sent you a PM
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 8th Jul 2021 23:38
Having looked at the API (Not in very much detail).
Would you say that it is possible to create an App like the SGK Studio IDE using Nuklear and AppGameKit?
I have been tasked with creating an IDE (For COBOL) and i would like to use Nuklear (Specifically because it is available for Windows and Linux).
From what i have read the only area that i think may be of concern is the editing window.
Is that "per character" level of control available in Nuklear?
MadBit
VIP Member
Gold Codemaster
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 9th Jul 2021 10:52
I think edit_string is unfortunately not suitable for this.
You can calculate the characters using the cursor position in the text, so you have the possibility for code completion and code suggestion.
But what is not possible would be code highlighting.
At least I don't know how.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Yiu435
3
Years of Service
User Offline
Joined: 19th Dec 2020
Location:
Posted: 28th May 2023 16:43
Hi MadBit, your gui is very amazing.
Could I get the c++ tier2 version of nuklear gui?
It would be very helpful to me, I had failed to integrate imgui and nuklear gui to tier2 so I am here to ask for help.
MadBit
VIP Member
Gold Codemaster
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 30th May 2023 20:03
Hi,
I think you are in luck. I recently finished a Tier2 template that allows you to use ImGui.
But since this is a nuclear thread I will create a new topic for it.
https://forum.thegamecreators.com/thread/229146

For Nuklear I have already provided others with a Tier2 project. This uses the code of my plugin. But it is older.
DOWNLOAD

Which one is better for you, you have to decide for yourself.

I hope I could help you.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)

Donations are always welcome.
Yiu435
3
Years of Service
User Offline
Joined: 19th Dec 2020
Location:
Posted: 31st May 2023 09:43
Hi,MadBit.
Thank you very much.
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 7th Aug 2023 14:03 Edited at: 7th Aug 2023 14:17
hi MadBit

I tried to build "extended" demo
I got a error

main.agc:217: error: Number of parameters does not match function declaration for "nkwidget", expected 1 parameters

bounds = nkWidget()

how do I fix this ?

much thanks for creating this

i removed removed " ../ "
i fixed it by copying "Nuklear.agc" to the folder

any on else have this happen ?
MadBit
VIP Member
Gold Codemaster
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 7th Aug 2023 19:55 Edited at: 7th Aug 2023 19:56
Ahh you can find the solution here, from there the next two messages.

SOLUTION - use
nkWidget(bound)
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)

Donations are always welcome.
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 8th Aug 2023 12:43
@MadBit

thanks you ...

umm when is or where is info ?

" About Text, Buttons, Toggles coming soon"

I was looking for an example menu system like agk2 has for doing things
but nun exists

Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 8th Aug 2023 13:08
@MadBit

I changed line 217 in main.agc

from " bounds = nkWidget()"
to
"bounds =total_space"

that solved the problem for me
copying the file "Nuklear.agc" to the folder also fixed the problem

2 ways to solved the problem .. interesting out out come either way
MadBit
VIP Member
Gold Codemaster
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 8th Aug 2023 16:44
Quote: "umm when is or where is info ?

" About Text, Buttons, Toggles coming soon""


There is a doc folder in the download. There you will find a PDF containing further information.
I have not continued the "About ..." series because someone in the forum told me not to spam the forum so I left it.
But the PDF contains everything I wanted to write in the About series.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)

Donations are always welcome.
Resourceful
10
Years of Service
User Offline
Joined: 29th Jan 2014
Location: every ware
Posted: 10th Aug 2023 05:22
@MadBit

that person is not nice
to tell you it was spam

I found the pdf

but it will be some time before I can fully
build what I need

umm you could post the now since it's been 2 year since you started
just saying that is


PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 16th Aug 2023 02:01
@blink0k, if you use tier2 and ImGui you can use the ColorTextEdit addon for syntax highlighting
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 16th Aug 2023 18:39
Thanks PTC

Login to post a reply

Server time is: 2024-11-21 16:27:17
Your offset time is: 2024-11-21 16:27:17