Maybe compile is a better word?
I'm just trying to include the dll to my project via require.
Same thing if the dll is in the same folder as main.lua.
Only works if the dll is in C:\Program Files\LOVE (love's install directory) but that means I can't distribute my game.
LÖVE-Nuklear - a lightweight immediate mode GUI
-
- Party member
- Posts: 234
- Joined: Mon Aug 29, 2016 8:51 am
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
I'm confused. So, the DLL compiles just fine? Is this about build errors or runtime errors?KayleMaster wrote: ↑Wed Nov 08, 2017 2:20 pm Maybe compile is a better word?
I'm just trying to include the dll to my project via require.
Anyway, if you require the DLL like this
Code: Select all
local nk = require("libraries.nuklear")
Try this:
Code: Select all
local lib, errmsg = package.loadlib("./libraries/nuklear.dll", "luaopen_nuklear")
assert(lib, errmsg)
local nk = lib()
If you can't fix it that way, use this as the lib path:
Code: Select all
love.filesystem.getSource() .. "/libraries/nuklear.dll"
-
- Party member
- Posts: 234
- Joined: Mon Aug 29, 2016 8:51 am
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
Thanks, this works:
local lib, errmsg = package.loadlib(love.filesystem.getSource() .. "./libraries/nuklear.dll", "luaopen_nuklear")
assert(lib, errmsg)
local nk = lib()
I'll keep the assert just in case for now.
local lib, errmsg = package.loadlib(love.filesystem.getSource() .. "./libraries/nuklear.dll", "luaopen_nuklear")
assert(lib, errmsg)
local nk = lib()
I'll keep the assert just in case for now.
-
- Prole
- Posts: 1
- Joined: Mon Apr 18, 2016 1:50 pm
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
Several months, ago, I started writing an object-oriented wrapper for love-nuklear. I named it "fuzion" as a play on "nuklear". I stopped working on it, though, due to running into a lot of bugs. I don't know if they are in the Lua library or in the core C library.
I recently unearthed my work and decided to put it on GitHub. I don't know if I'll continue working on it, since I don't really have a need to. It was more of a proof of concept, and not worth continue as long as these bugs exist, imo.
Repo: https://github.com/SinisterRectus/fuzion
Summary of the bugs that I have found:
- "static" mode fails for spaces
- line-wrap not working for dynamic rows
- the state value on checkboxes is backwards
- combobox out-of-bounds values are not caught
- 100% displays off the screen for progress bars
- "inc" doesn't seem to have any affect on properties
- left align cuts through images on selectables
- the logical cursor does not match the gui cursor on sliders
These are based on notes I took a few months ago, so I don't have detail for each bug explanations at the moment.
I recently unearthed my work and decided to put it on GitHub. I don't know if I'll continue working on it, since I don't really have a need to. It was more of a proof of concept, and not worth continue as long as these bugs exist, imo.
Repo: https://github.com/SinisterRectus/fuzion
Summary of the bugs that I have found:
- "static" mode fails for spaces
- line-wrap not working for dynamic rows
- the state value on checkboxes is backwards
- combobox out-of-bounds values are not caught
- 100% displays off the screen for progress bars
- "inc" doesn't seem to have any affect on properties
- left align cuts through images on selectables
- the logical cursor does not match the gui cursor on sliders
These are based on notes I took a few months ago, so I don't have detail for each bug explanations at the moment.
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
How to use nk.radio ?
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
Code: Select all
selected = selected or { value = '1' }
nk.radio('1', selected)
nk.radio('2', selected)
nk.radio('3', selected)
nk.label(selected.value)
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
Is this still working in 11.0?
I'm super new to Lua and Löve, so I've tried running the example code and all I get is a white square.
I'm super new to Lua and Löve, so I've tried running the example code and all I get is a white square.
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
Hi and welcome to the forums.
The first release of 11.0 has an issue with canvases not exactly working, so that may be the most noticeable issue; devs are aware and i think they already fixed it, but the fix only exists in a nightly for now, if i recall correctly.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
The white square is because nuklear hasn't been updated for 11.0's 0-1 color range yet.
Nuklear calls the setColor function from lua though, so a temporary fix is to drop
somewhere in your code.
Nuklear calls the setColor function from lua though, so a temporary fix is to drop
Code: Select all
local old_set_color = love.graphics.setColor
function love.graphics.setColor(r,g,b,a)
a = a or 255
old_set_color(r/255, g/255, b/255, a/255)
end
-
- Prole
- Posts: 1
- Joined: Tue May 01, 2018 12:59 pm
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
@DekuJuice thank you . saved my day . i had that white square problem with Nuklear . your workaround works for me . my OS : Lubuntu 16.04
Who is online
Users browsing this forum: No registered users and 3 guests