{"id":13526435,"url":"https://github.com/keharriso/love-nuklear","last_synced_at":"2025-05-16T04:05:17.162Z","repository":{"id":68510512,"uuid":"73750356","full_name":"keharriso/love-nuklear","owner":"keharriso","description":"Lightweight immediate mode GUI for LÖVE games","archived":false,"fork":false,"pushed_at":"2025-02-14T21:55:38.000Z","size":117,"stargazers_count":365,"open_issues_count":6,"forks_count":32,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-08T20:17:01.808Z","etag":null,"topics":["gui","imgui","immediate-gui","love2d","nuklear","ui"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keharriso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-14T21:54:36.000Z","updated_at":"2025-04-07T23:33:41.000Z","dependencies_parsed_at":"2025-02-18T13:20:33.819Z","dependency_job_id":"1d542aaa-cf43-455c-b634-aee18391eff1","html_url":"https://github.com/keharriso/love-nuklear","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keharriso%2Flove-nuklear","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keharriso%2Flove-nuklear/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keharriso%2Flove-nuklear/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keharriso%2Flove-nuklear/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keharriso","download_url":"https://codeload.github.com/keharriso/love-nuklear/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254464895,"owners_count":22075570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gui","imgui","immediate-gui","love2d","nuklear","ui"],"created_at":"2024-08-01T06:01:29.644Z","updated_at":"2025-05-16T04:05:12.152Z","avatar_url":"https://github.com/keharriso.png","language":"C","funding_links":[],"categories":["C","UI"],"sub_categories":[],"readme":"# LÖVE-Nuklear\n\n[Nuklear](https://github.com/Immediate-Mode-UI/Nuklear) module for the [LÖVE](https://love2d.org/) game engine.\n\nProvides a lightweight immediate mode GUI for LÖVE games.\n\n## Example\n```lua\n-- Simple UI example.\n\nlocal nuklear = require 'nuklear'\n\nlocal ui\n\nfunction love.load()\n\tui = nuklear.newUI()\nend\n\nlocal combo = {value = 1, items = {'A', 'B', 'C'}}\n\nfunction love.update(dt)\n\tui:frameBegin()\n\tif ui:windowBegin('Simple Example', 100, 100, 200, 160,\n\t\t\t'border', 'title', 'movable') then\n\t\tui:layoutRow('dynamic', 30, 1)\n\t\tui:label('Hello, world!')\n\t\tui:layoutRow('dynamic', 30, 2)\n\t\tui:label('Combo box:')\n\t\tif ui:combobox(combo, combo.items) then\n\t\t\tprint('Combo!', combo.items[combo.value])\n\t\tend\n\t\tui:layoutRow('dynamic', 30, 3)\n\t\tui:label('Buttons:')\n\t\tif ui:button('Sample') then\n\t\t\tprint('Sample!')\n\t\tend\n\t\tif ui:button('Button') then\n\t\t\tprint('Button!')\n\t\tend\n\tend\n\tui:windowEnd()\n\tui:frameEnd()\nend\n\nfunction love.draw()\n\tui:draw()\nend\n\nfunction love.keypressed(key, scancode, isrepeat)\n\tui:keypressed(key, scancode, isrepeat)\nend\n\nfunction love.keyreleased(key, scancode)\n\tui:keyreleased(key, scancode)\nend\n\nfunction love.mousepressed(x, y, button, istouch, presses)\n\tui:mousepressed(x, y, button, istouch, presses)\nend\n\nfunction love.mousereleased(x, y, button, istouch, presses)\n\tui:mousereleased(x, y, button, istouch, presses)\nend\n\nfunction love.mousemoved(x, y, dx, dy, istouch)\n\tui:mousemoved(x, y, dx, dy, istouch)\nend\n\nfunction love.textinput(text)\n\tui:textinput(text)\nend\n\nfunction love.wheelmoved(x, y)\n\tui:wheelmoved(x, y)\nend\n```\n\n## Building\n\nWindows binaries are available for each [release](https://github.com/keharriso/love-nuklear/releases).\n\nTo build the library yourself, grab the code with:\n```sh\n$ git clone --recursive https://github.com/keharriso/love-nuklear.git\n```\n\nNext, you need to compile the code to a native Lua module.\n\n### Compiling with CMake on Linux\n\n1. First, ensure you have a C compiler and the `cmake` and `luajit` or `lua51-luajit` (for openSUSE) packages installed, as well as `libluajit-5.1-dev` (for Ubuntu/Debian), `luajit-devel` (for Fedora), or `lua51-luajit-devel` (for openSUSE) if your distro has one of these packages.\n2. Create a new folder next to `love-nuklear` called `love-nuklear-build`.\n3. Open a terminal inside `love-nuklear-build`.\n4. Compile the library with\n```sh\n$ cmake -DCMAKE_BUILD_TYPE=Release ../love-nuklear\n$ make\n```\n5. Locate `nuklear.so` in the build folder.\n\n#### Via GNU Guix\n\nLÖVE-Nuklear is also available as a [Guix](http://guix.gnu.org/) package, and can thus be directly downloaded and built via:\n```\n$ guix package --install love-nuklear\n```\n\n### Compiling with CMake and MinGW on Windows\n\n1. Install [CMake](https://cmake.org/download/) and [MinGW](http://mingw.org/) or [MinGW-w64](https://mingw-w64.org/doku.php).\n2. Download the source code for [LuaJIT](http://luajit.org/download.html).\n3. Open a command window inside the LuaJIT folder (the one that contains \"README\").\n4. Compile LuaJIT with\n```sh\n$ mingw32-make\n```\n5. Remember the path to `lua51.dll` inside the LuaJIT `src` folder.\n6. Run the CMake GUI.\n7. Click \"Browse Source\" at the top right, then select the `love-nuklear` folder.\n8. Enter a path for the build folder. It should be separate from the source folder.\n9. Press \"Configure\" at the bottom.\n10. Select \"MinGW Makefiles\" from the generator drop list, then click \"Finish\".\n11. You should receive an error. This is normal.\n12. Open the LUA tree by clicking the triangle on the left.\n13. Replace \"LUA_INCLUDE_DIR-NOTFOUND\" with the path to the LuaJIT `src` folder.\n14. Replace \"LUA_LIBRARY-NOTFOUND\" with the path to `lua51.dll` inside the LuaJIT `src` folder.\n15. Click \"Generate\" at the bottom.\n16. Open a command window inside the build folder.\n17. Compile with\n```sh\n$ mingw32-make\n```\n18. Locate `nuklear.dll` inside the build folder.\n\n### Compiling with CMake and MSVC on Windows\n\n1. Install [CMake](https://cmake.org/download/) and [Visual Studio](https://visualstudio.microsoft.com/).\nCommunity or Express edition is sufficient.\n2. Download the source code for [LuaJIT](http://luajit.org/download.html).\n3. Open a Visual Studio Command Prompt (x86 or x64 depending on what architecture you need)\nand set the current directory to the LuaJIT folder (the one that contains \"README\"). Also\nremember this path.\n4. At the VS Command Prompt, set your current directory to `src` then\nexecute `msvcbuild.bat`. This will create lua51.dll, lua51.lib, and luajit.exe\n5. Now open new command prompt window inside the `love-nuklear` folder.\n6. Type `set \"LUA_DIR=\u003cpath to directory at step 3\u003e\"`\n7. 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`.\nIf you previously compile LuaJIT using x64 VS command prompt, replace `Win32` with `x64` at above command.\n8. Then type `cmake --build build --config Release --target install` and you'll found `nuklear.dll` inside \"install\" folder.\n\n## Documentation\n\nA 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).\n\n## License\n\nCopyright (c) 2016 Kevin Harrison, released under the MIT License (see LICENSE for details).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeharriso%2Flove-nuklear","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeharriso%2Flove-nuklear","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeharriso%2Flove-nuklear/lists"}