{"id":13578602,"url":"https://github.com/stetre/moonnuklear","last_synced_at":"2026-02-11T08:54:15.928Z","repository":{"id":63795962,"uuid":"128903119","full_name":"stetre/moonnuklear","owner":"stetre","description":"Lua bindings for Nuklear","archived":false,"fork":false,"pushed_at":"2024-04-24T15:46:51.000Z","size":2002,"stargazers_count":107,"open_issues_count":2,"forks_count":10,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-05T16:46:48.056Z","etag":null,"topics":["gui","lua","lua-bindings","nuklear"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stetre.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":"2018-04-10T08:52:49.000Z","updated_at":"2024-09-03T17:28:09.000Z","dependencies_parsed_at":"2024-08-01T15:29:42.428Z","dependency_job_id":"fcd8a094-0965-4dc5-8052-ad59c47b0c7e","html_url":"https://github.com/stetre/moonnuklear","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stetre%2Fmoonnuklear","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stetre%2Fmoonnuklear/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stetre%2Fmoonnuklear/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stetre%2Fmoonnuklear/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stetre","download_url":"https://codeload.github.com/stetre/moonnuklear/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393094,"owners_count":20931804,"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","lua","lua-bindings","nuklear"],"created_at":"2024-08-01T15:01:32.145Z","updated_at":"2026-02-11T08:54:15.884Z","avatar_url":"https://github.com/stetre.png","language":"C","readme":"## MoonNuklear: Lua bindings for Nuklear\n\nMoonNuklear is a Lua binding library for Mitcha Mettke's [Nuklear](https://github.com/Immediate-Mode-UI/nuklear) immediate mode GUI toolkit.\n\nIt runs on GNU/Linux, on MacOS, and on Windows (MSYS2/MinGW) and requires [Lua](http://www.lua.org/) (\u003e=5.3).\n\n\n_Author:_ _[Stefano Trettel](https://www.linkedin.com/in/stetre)_\n\n[![Lua logo](./doc/powered-by-lua.gif)](http://www.lua.org/)\n\n#### License\n\nMIT/X11 license (same as Lua). See [LICENSE](./LICENSE).\n\n#### Documentation\n\nSee the [Reference Manual](https://stetre.github.io/moonnuklear/doc/index.html).\n\n#### Getting and installing\n\nSetup the build environment as described [here](https://github.com/stetre/moonlibs), then:\n\n```sh\n$ git clone https://github.com/stetre/moonnuklear\n$ cd moonnuklear\nmoonnuklear$ make\nmoonnuklear$ make install # or 'sudo make install' (Ubuntu and MacOS)\n```\n\n#### Example\n\nThe example below shows the front-end implementation of a simple GUI.\n\nThe backend and other examples can be found in the **examples/** directory contained in the release package.\n\n```lua\nlocal nk = require(\"moonnuklear\")\nlocal backend = require(\"backend\")\n\nlocal op = 'easy'\nlocal value = 0.6\nlocal window_flags = nk.WINDOW_BORDER|nk.WINDOW_MOVABLE|nk.WINDOW_CLOSABLE\n\nlocal function hellogui(ctx)\n   if nk.window_begin(ctx, \"Show\", {50, 50, 220, 220}, window_flags) then\n      -- fixed widget pixel width\n      nk.layout_row_static(ctx, 30, 80, 1)\n\n      if nk.button(ctx, nil, \"button\") then\n         -- ... event handling ...\n         print(\"button pressed\")\n      end\n\n      -- fixed widget window ratio width\n      nk.layout_row_dynamic(ctx, 30, 2)\n      if nk.option(ctx, 'easy', op == 'easy') then op = 'easy' end\n      if nk.option(ctx, 'hard', op == 'hard') then op = 'hard' end\n\n      -- custom widget pixel width\n      nk.layout_row_begin(ctx, 'static', 30, 2)\n      nk.layout_row_push(ctx, 50)\n      nk.label(ctx, \"Volume:\", nk.TEXT_LEFT)\n      nk.layout_row_push(ctx, 110)\n      value = nk.slider(ctx, 0, value, 1.0, 0.1)\n      nk.layout_row_end(ctx)\n   end\n   nk.window_end(ctx)\nend\n\n-- Init the backend and enter the event loop:\nbackend.init(640, 380, \"Hello\", true, nil)\nbackend.loop(hellogui, {.13, .29, .53, 1}, 30)\n\n```\nThe script can be executed at the shell prompt with the standard Lua interpreter:\n\n```shell\n$ lua hello.lua\n```\n\n#### See also\n\n* [MoonLibs - Graphics and Audio Lua Libraries](https://github.com/stetre/moonlibs).\n\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstetre%2Fmoonnuklear","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstetre%2Fmoonnuklear","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstetre%2Fmoonnuklear/lists"}