mirror of
https://github.com/keharriso/love-nuklear.git
synced 2025-09-10 16:17:47 -04:00
Compare commits
18 commits
Author | SHA1 | Date | |
---|---|---|---|
|
5336818494 | ||
|
8d092eefa4 | ||
|
1b8058071e | ||
|
829dc151c0 | ||
|
e9be4aa952 | ||
|
018aaf60a0 | ||
|
0347818eca | ||
|
640a50532b | ||
|
9ba37e4e4a | ||
|
7491ab58b2 | ||
|
d1cfcf2a47 | ||
|
d41e9d1875 | ||
|
efc53612bf | ||
|
09cdd09716 | ||
|
fef4e00a60 | ||
|
f33c94db66 | ||
|
213be47f91 | ||
|
f7ab5085f1 |
7 changed files with 721 additions and 668 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
build/
|
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -1,3 +1,3 @@
|
|||
[submodule "src/nuklear"]
|
||||
path = src/nuklear
|
||||
url = https://github.com/vurtun/nuklear.git
|
||||
url = https://github.com/Immediate-Mode-UI/Nuklear.git
|
||||
|
|
|
@ -24,4 +24,14 @@ TARGET_LINK_LIBRARIES(
|
|||
${LUA_LIBRARIES}
|
||||
)
|
||||
|
||||
IF(MSVC)
|
||||
TARGET_COMPILE_DEFINITIONS(${LIB_NAME} PRIVATE LUA_BUILD_AS_DLL)
|
||||
endif(MSVC)
|
||||
|
||||
SET_TARGET_PROPERTIES("${LIB_NAME}" PROPERTIES PREFIX "")
|
||||
|
||||
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
SET(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}" CACHE PATH "..." FORCE)
|
||||
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
|
||||
INSTALL(TARGETS "${LIB_NAME}" DESTINATION .)
|
||||
|
|
25
README.md
25
README.md
|
@ -1,6 +1,6 @@
|
|||
# LÖVE-Nuklear
|
||||
|
||||
[Nuklear](https://github.com/vurtun/nuklear) module for the [LÖVE](https://love2d.org/) game engine.
|
||||
[Nuklear](https://github.com/Immediate-Mode-UI/Nuklear) module for the [LÖVE](https://love2d.org/) game engine.
|
||||
|
||||
Provides a lightweight immediate mode GUI for LÖVE games.
|
||||
|
||||
|
@ -98,6 +98,13 @@ $ make
|
|||
```
|
||||
5. Locate `nuklear.so` in the build folder.
|
||||
|
||||
#### Via GNU Guix
|
||||
|
||||
LÖVE-Nuklear is also available as a [Guix](http://guix.gnu.org/) package, and can thus be directly downloaded and built via:
|
||||
```
|
||||
$ guix package --install love-nuklear
|
||||
```
|
||||
|
||||
### Compiling with CMake and MinGW on Windows
|
||||
|
||||
1. Install [CMake](https://cmake.org/download/) and [MinGW](http://mingw.org/) or [MinGW-w64](https://mingw-w64.org/doku.php).
|
||||
|
@ -125,6 +132,22 @@ $ mingw32-make
|
|||
```
|
||||
18. Locate `nuklear.dll` inside the build folder.
|
||||
|
||||
### Compiling with CMake and MSVC on Windows
|
||||
|
||||
1. Install [CMake](https://cmake.org/download/) and [Visual Studio](https://visualstudio.microsoft.com/).
|
||||
Community or Express edition is sufficient.
|
||||
2. Download the source code for [LuaJIT](http://luajit.org/download.html).
|
||||
3. Open a Visual Studio Command Prompt (x86 or x64 depending on what architecture you need)
|
||||
and set the current directory to the LuaJIT folder (the one that contains "README"). Also
|
||||
remember this path.
|
||||
4. At the VS Command Prompt, set your current directory to `src` then
|
||||
execute `msvcbuild.bat`. This will create lua51.dll, lua51.lib, and luajit.exe
|
||||
5. Now open new command prompt window inside the `love-nuklear` folder.
|
||||
6. Type `set "LUA_DIR=<path to directory at step 3>"`
|
||||
7. Then type `cmake -Bbuild -H. -A Win32 -DLUA_INCLUDE_DIR=%LUA_DIR%\src -DLUA_LIBRARY=%LUA_DIR%\src\lua51.lib -DCMAKE_INSTALL_PREFIX=%CD%\install`.
|
||||
If you previously compile LuaJIT using x64 VS command prompt, replace `Win32` with `x64` at above command.
|
||||
8. Then type `cmake --build build --config Release --target install` and you'll found `nuklear.dll` inside "install" folder.
|
||||
|
||||
## Documentation
|
||||
|
||||
A complete description of all functions and style properties, alongside additional examples, is available at the [LÖVE-Nuklear wiki](https://github.com/keharriso/love-nuklear/wiki).
|
||||
|
|
|
@ -14,6 +14,7 @@ local transform = require 'transform'
|
|||
local ui1, ui2
|
||||
|
||||
function love.load()
|
||||
love.keyboard.setKeyRepeat(true)
|
||||
ui1, ui2 = nuklear.newUI(), nuklear.newUI()
|
||||
end
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit adc52d710fe3c87194b99f540c53e82eb75c2521
|
||||
Subproject commit 614abce05b9455849bbf1519b7f86e53c78b04ab
|
1348
src/nuklear_love.c
1348
src/nuklear_love.c
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue