Hi,
now I am ready to release the plugin. I know there are still some flaws in it. But I think together we will be able to find them and hopefully fix them. Some of them are already known but I can't solve them easily because they are deep inside the nuclear library.
I will update this first post from time to time. Here I will keep a todo list, list fixed bugs and update the download of the plugin.
It might be worth to have a look from time to time. I will announce new versions in this thread as well.
The second post in this thread is kept free for documentation. So the plan!
I hope I will have the discipline to do this regular.
To the plugin:
This plugin is a kind of wrapper around the NuclearUI library for AGK. With over 300 new commands.
A quotation from the nuclear project side.
Quote: ""This is a minimal-state, immediate-mode graphical user interface toolkit written in ANSI C and licensed under public domain. It was designed as a simple embeddable user interface for application and does not have any dependencies, a default render backend or OS window/input handling but instead provides a highly modular, library-based approach, with simple input state for input and draw commands describing primitive shapes as output. So instead of providing a layered library that tries to abstract over a number of platform and render backends, it focuses only on the actual UI.""
Since this library works a lot with pointers I had to write some workarounds for AppGameKit to preserve the functionality.
What do you find in this package?
Two directories and a text file.
In the directory AGK-Project you can find several example projects. These are not very well documented but it is worth to have a look inside.
The directory Plugins contains the actual plugin.
How a Plugin is installed, you can find out here. The Plugin is for Windows, Windows64 and Linux.
The text file is a not quite complete function overview. This can be helpful for the many function parameters, which require some functions.
Known issues:
- Progressbar: When setting values the bar loses focus when leaving the widget.
- AGK-Window: When scaling the AGK-window the nuclear surface is not scaled. I assumed I had fixed this problem but then found that there were errors within group windows with scrollbar. So I had to go back to the old method. This method automatically adjusts the virtual resolution to the window size.
- Transparent line under the title when a window is opened in dynamicmode.
TODO:
-
Dokumentation of all commands.
-
UTF-8 support
-
Additional command TooltipBegin with offset parameters.
-
Additional command to set the output path for the log file.
Bugs:
Overlapping windows where the close buttons are on top of each other are partially closed together.
UTF-8 support for clipboard (cut/copy/paste)
Bug with 3d scene display and moving camera. Appearing of a box.
![](/images/emoticons/bighammer.gif)
On some devices the screen remains black and only images are rendered.
Change Log:
[2020-10-18]
- [CHG] TreeElementPush & TreeElementImagePush do not work as they should. For internal node identification C/C++ uses the source code name and the source code line of the calling program. This function is missing in AppGameKit and cannot be simulated. It is recommended to use TreeElementPushID & TreeElementImagePushID instead.
- [ADD] EditGetCursorPosition
- [ADD] EditGetMarkStart
- [ADD] EditGetMarkEnd
- [ADD] EditSetMarkStart
- [ADD] EditSetMarkEnd
- [ADD] EditSetCursorPosition
- [FIX] No images were handled under AGK-Studio.
- [FIX] Crash of the app under AGK-Studio. Fixed by creating a dummy object.
[2020-11-19]
- [FIX] UTF-8 glyphs were not created or read correctly.
- [FIX] Horizontal scroll function with the mouse wheel switched off.
- [FIX] StyleLoadFromString could not load the style correctly.
- [FIX] ContextualItemImageText does not find image by name.
- [FIX] Chartvalues capped internaly at their limits (min/max) to avoid display errors.
- [ADD] FontSetGlyphRange and FontAddGlyphRange for UTF-8 support.
- [ADD] nkInputIsMouseClickInRect(button as integer, rect ref as nk_rect)
- [ADD] nkInputHasMouseClickInRect(button as integer, rect ref as nk_rect)
- [ADD] nkInputHasMouseClickDownInRect(button as integerd, rect ref as nk_rect, down as integer)
- [ADD] nkInputIsMouseClickDownInRect(button as integer, rect ref as nk_rect, down as integer)
- [ADD] nkInputAnyMouseClickInRect(rect ref as nk_rect)
- [ADD] nkInputIsMousePrevHoveringRect(rect ref as nk_rect)
- [ADD] nkInputIsMouseHoveringRect(rect ref as nk_rect)
- [ADD] nkInputMouseClicked(button as integer, rect ref as nk_rect)
- [ADD] nkInputGetMouseDelta()
- [ADD] nkWidgetSize()
- [ADD] nkStrokeLine(canvas_slot as integer, p0 as nk_vec2, p1 as nk_vec2, thickness as float, color as nk_color)
- [ADD] nkStrokeCurve(canvas_slot as integer, p0 as nk_vec2, ctrl0 as nk_vec2, ctrl1 as nk_vec2, p1 as nk_vec2, thickness as float, color as nk_color)
- [ADD] nkStrokeRect(canvas_slot as integer, rect as nk_rect, rounding as float, thickness as float, color as nk_color)
- [ADD] nkFillRect(canvas_slot as integer, rect as nk_rect, rounding as float, color as nk_color)
- [ADD] nkFillRectMultiColor(canvas_slot as integer, rect as nk_rect, lt as nk_color, rt as nk_color, rb as nk_color, lb as nk_color)
- [ADD] nkStrokeCircle(canvas_slot as integer, center as nk_vec2, radius as float, thickness as float, color as nk_color)
- [ADD] nkFillCircle(canvas_slot as integer, center as nk_vec2, radius as float, color as nk_color)
- [ADD] nkStrokeArc(canvas_slot as integer, center as nk_vec2, radius as float, a_min as float, a_max as float, thickness as float, color as nk_color)
- [ADD] nkFillArc(canvas_slot as integer, center as nk_vec2, radius as float, a_min as float, a_max as float, color as nk_color)
- [ADD] nkStrokeTriangle(canvas_slot as integer, p0 as nk_vec2, p1 as nk_vec2, p3 as nk_vec2, thickness as float, color as nk_color)
- [ADD] nkFillTriangle(canvas_slot as integer, p0 as nk_vec2, p1 as nk_vec2, p3 as nk_vec2, color as nk_color)
- [ADD] nkDrawText(canvas_slot as integer, rect as nk_rect, label as String, font_name as String, back_col as nk_color, front_col as nk_color)
- [ADD] nkDrawImage(canvas_slot as integer, rect as nk_rect, img_slot as integer, color as nk_color)
[2020-12-12]
- [ADD] TooltipBegin command with additional offset parameters.
- [ADD] Tooltip command with additional offset parameters.
- [FIX] Mouse cursor covers the beginning of the tooltip texts.
- [FIX] Font loading fails in debug mode.
[2021-01-30]
- [ADD] LogSetLocation(path) - Sets the location of the log file.
- [ADD] WindowGetFlags() - Get the current flags of current window.
- [ADD] GetAgkRenderSprite - You can get the render sprite. Supported only if FixedVirtualResulotion is set to 1.
- [ADD] GetAgkRenderImage - You can get the render image to do something special
![](/images/smilies/wink.gif)
. Supported only if FixedVirtualResulotion is set to 1.
- [ADD] HandleInput(x,y) - Offers the possibility to pass own mouse coordinates.
- [ADD] FixedVirtualResulotion(state) if state is set to 1, the UI scales with the AppGameKit window. default is 0 Virtual resolution is set to device size.
- [FIX] Bug with 3d scene display and moving camera. Appearing of a box.
- [FIX] Solve an Input issue. (repeated chars in input box).
- [FIX] UTF-8 support for clipboard (cut/copy/paste).
- [FIX] Overlapping windows where the close buttons are on top of each other are partially closed together.
- [FIX] UI scaled similar to AGK-Window shrinking - growing with left/right or top/bottom border.
- [FIX] Adjusted window behaviour when scaling.
[2021-02-04]
- [ADD] Style helper function nkStyleSetWindow / nkStyleGetWindow
- [ADD] Style helper function nkStyleSetWindowHeader / nkStyleGetWindowHeader
- [ADD] Style helper function nkStyleSetTab / nkStyleGetTab
- [ADD] Style helper function nkStyleSetProperty / nkStyleGetProperty
- [ADD] Style helper function nkStyleSetScrollbar / nkStyleGetScrollbar
- [ADD] Style helper function nkStyleSetSlider / nkStyleGetSlider
- [ADD] Style helper function nkStyleSetCombo / nkStyleGetCombo
- [ADD] Style helper function nkStyleSetChart / nkStyleGetChart
- [ADD] Style helper function nkStyleSetProgress / nkStyleGetProgress
- [ADD] Style helper function nkStyleSetSelectable / nkStyleGetSelectable
- [ADD] Style helper function nkStyleSetOption / nkStyleGetOption
- [ADD] Style helper function nkStyleSetCheckbox / nkStyleGetCheckbox
- [ADD] Style helper function nkStyleSetButton / nkStyleGetButton
- [ADD] Style helper function nkStyleSetText / nkStyleGetText
- [ADD] Nuklear tags for geany (copy 'nk.agc.tags' file to $(AppGameKit2_Folder)/Tier 1/Editor/data/tags).
- [FIX] Prevents a transparent line from appearing below the title bar when using the NK_WINDOW_DYNAMIC flag.
- [FIX] Drawing correct border color for property-widget.
- [FIX] Typo in LogSetLocation. Now it works correctly.
- [FIX] Linux - fix render position of combined marks.
- [FIX] Copying from one editbox to the next caused the app to crash.
- [FIX] Support for combined marks in utf8 strings.
[2021-02-28]
- [ADD] nkInitStyle in Nuklear.agc was added. If you set the flag parameter to 1 - a dark theme is used. Set it to 2 a light theme will be used. If it is set to 0, leave it at the default theme.
- [ADD] nk.Init now accepts an additional flag. If it is set to 1 (dark) or 2 (light), a new colour and symbol design is used.
- [ADD] New Symbols flags to modify the symbols NK_SYMBOL_INVERT, NK_SYMBOL_COMBINE_RECT, NK_SYMBOL_COMBINE_CIRCLE, NK_SYMBOL_COMBINE_FILLED
- [ADD] New Symbols NK_SYMBOL_CHECK_MARK, NK_SYMBOL_CROSS,
NK_SYMBOL_ANGLE_UP, NK_SYMBOL_ANGLE_DOWN, NK_SYMBOL_ANGLE_LEFT, NK_SYMBOL_ANGLE_RIGHT,
NK_SYMBOL_MENU, NK_SYMBOL_POWER,
NK_SYMBOL_ANGLE_DBL_UP, NK_SYMBOL_ANGLE_DBL_DOWN, NK_SYMBOL_ANGLE_DBL_LEFT, NK_SYMBOL_ANGLE_DBL_RIGHT,
NK_SYMBOL_VLINE, NK_SYMBOL_DBL_VLINE, NK_SYMBOL_HLINE, NK_SYMBOL_DBL_HLINE,
NK_SYMBOL_SKIP_LEFT, NK_SYMBOL_SKIP_RIGHT, NK_SYMBOL_SKIP_UP, NK_SYMBOL_SKIP_DOWN,
NK_SYMBOL_LINE_LEFT, NK_SYMBOL_LINE_RIGHT, NK_SYMBOL_LINE_UP, NK_SYMBOL_LINE_DOWN.
- [CHG] Checkbox draw now a check mark.
- [CHG] When drawing the menu, the complete line is coloured in the back colour of the menu button 'normal'.
- [FIX] Correct Slider names in tag def file.
- [FIX] Correct Checkbox names in tag def file.
- [FIX] Solved another case of transparent lines.
If you would like to support this wrapper you are welcome to donate some coins. I am happy about every cent I get.
Please enjoy this plugin and stay healthy.