LÖVE-Nuklear - a lightweight immediate mode GUI
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
No additional configuration was required for me on my platform.
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
Well, I didn't get it to work fully, but so far I've documented my progress in the following issue.
https://github.com/keharriso/love-nuklear/issues/18
Still, if anybody has any more insight, into what lua libraries and headers are needed, feel free to comment
https://github.com/keharriso/love-nuklear/issues/18
Still, if anybody has any more insight, into what lua libraries and headers are needed, feel free to comment
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
Well I'm pretty sure LÖVE is not built with MinGW, and Visual Studio and MinGW linking system is not compatible.
To build I would install Visual Studio 2015 (Communityedition will do), then run a developer command prompt.
In that command prompt you can build LuaJIT 2.0.4 executing the included msvcbuild.bat in the LuaJIT src folder
Then you need to compile nuklear_love.c which is found in the love-nuklear/src folder, make sure that when you download love-nuklear it should also download the nuklear submodule. To compile nuklear_love.c you need to declare the include path in the command line so that the compiler can found lua.h and lauxlib.h which can be found in the LuaJIT src folder. The compile command is CL
You should now have an .obj folder which needs to be linked to to lua51.lib, which again can be found in the LuaJIT src folder. After you link you should have a nuklear.dll file (if it isnt called that then rename it). The linking command is LINK
This is the procedure I have followed with other libraries. Note that I haven't compiled love-nuklear myself, this is just my experience building other binary modules for Lua/LÖVE
Here is an example script
The first command runs msvcbuild.bat which builds LuaJIT, the second compiles the love-nuklear object, and the last one links it against lua51.dll and outputs a dll
To build I would install Visual Studio 2015 (Communityedition will do), then run a developer command prompt.
In that command prompt you can build LuaJIT 2.0.4 executing the included msvcbuild.bat in the LuaJIT src folder
Then you need to compile nuklear_love.c which is found in the love-nuklear/src folder, make sure that when you download love-nuklear it should also download the nuklear submodule. To compile nuklear_love.c you need to declare the include path in the command line so that the compiler can found lua.h and lauxlib.h which can be found in the LuaJIT src folder. The compile command is CL
You should now have an .obj folder which needs to be linked to to lua51.lib, which again can be found in the LuaJIT src folder. After you link you should have a nuklear.dll file (if it isnt called that then rename it). The linking command is LINK
This is the procedure I have followed with other libraries. Note that I haven't compiled love-nuklear myself, this is just my experience building other binary modules for Lua/LÖVE
Here is an example script
Code: Select all
luajit/src/msvcbuild.bat
cl /c /nologo /O2 /I"luajit/src" "love-nuklear/src/nuklear_love.c" /F"nuklear.obj"
link /nologo /dll /out:nuklear.dll "nuklear.obj" "luajit/src/lua51.lib"
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
- alberto_lara
- Party member
- Posts: 372
- Joined: Wed Oct 30, 2013 8:59 pm
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
This is a huge work, I can definitely take some ideas from this and maybe apply them to GÖÖi, thanks for sharing!
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
Thank you, adding a self compiled LuaJIT into the mix did the trick for me. I left a full explanation for any windows user here: https://github.com/keharriso/love-nuklear/issues/18Positive07 wrote: In that command prompt you can build LuaJIT 2.0.4 executing the included msvcbuild.bat in the LuaJIT src folder
-
- Prole
- Posts: 4
- Joined: Mon Nov 09, 2015 12:44 pm
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
Would someone Mind explaining how to use a button to increase a variable? basically i have this. https://hastebin.com/edasefakuy.lua with the GUI file looking like this, https://hastebin.com/rolifolife.lua .. I'm trying to use the "zoom in" button to increase the scale value in the Editor.lua .. How can this be done?
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
It's basically what you did over at line 55 in the rolifolife.lua.HumanRegret wrote: ↑Wed Feb 15, 2017 4:04 am Would someone Mind explaining how to use a button to increase a variable? basically i have this. https://hastebin.com/edasefakuy.lua with the GUI file looking like this, https://hastebin.com/rolifolife.lua .. I'm trying to use the "zoom in" button to increase the scale value in the Editor.lua .. How can this be done?
Code: Select all
if nk.button('Zoom In') then
scaleValue = scaleValue + 1
end
Code: Select all
EditorGUI.scaleValue = EditorGUI.scaleValue + 1
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
Does anyone know how to programmatically collapse a manually expanded tree tab? The user has clicked on the tab to expand it, and later I want to collapse it by program logic. It seems only possible to set the initial state, but not to change it later.
Code: Select all
if nk.treePush("tab", "Tab", nil, "collapsed") then
-- this tree is now expanded. What code do I put here to collapse it again?
nk.treePop()
end
-
- Party member
- Posts: 234
- Joined: Mon Aug 29, 2016 8:51 am
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
How do I get this running?
It says it can't find the package. However, this only happens if I build with Visual Code. If I build with Sublime it builds fine with no errors?
I'd much rather use Visual Code. Any tips?
UPDATE: It runs fine if I build from VSCODE but put the DLL in the LOVE install directory.. This will work for now, but I need a solution.
It says it can't find the package. However, this only happens if I build with Visual Code. If I build with Sublime it builds fine with no errors?
I'd much rather use Visual Code. Any tips?
UPDATE: It runs fine if I build from VSCODE but put the DLL in the LOVE install directory.. This will work for now, but I need a solution.
Re: LÖVE-Nuklear - a lightweight immediate mode GUI
Who says that? Lua? What build errors do you get?KayleMaster wrote: ↑Tue Nov 07, 2017 8:36 pm It says it can't find the package. However, this only happens if I build with Visual Code. If I build with Sublime it builds fine with no errors?
Can you post the error messages you're getting?UPDATE: It runs fine if I build from VSCODE but put the DLL in the LOVE install directory.. This will work for now, but I need a solution.
Who is online
Users browsing this forum: No registered users and 3 guests