All Projects → stetre → Moonnuklear

stetre / Moonnuklear

Licence: other
Lua bindings for Nuklear

Programming Languages

c
50402 projects - #5 most used programming language
lua
6591 projects

Labels

Projects that are alternatives of or similar to Moonnuklear

Qtools
QTools collection of open source tools for embedded systems development on Windows, Linux and MacOS
Stars: ✭ 64 (-13.51%)
Mutual labels:  gui
Nitroshare Desktop
Network file transfer application for Windows, OS X, & Linux
Stars: ✭ 1,150 (+1454.05%)
Mutual labels:  gui
Ara
ARA Records Ansible and makes it easier to understand and troubleshoot.
Stars: ✭ 1,176 (+1489.19%)
Mutual labels:  gui
Guitar
Git GUI Client
Stars: ✭ 1,136 (+1435.14%)
Mutual labels:  gui
Java Mvc Swing Monopoly
模仿大富翁游戏,使用Java Swing (GUI) 实现的单机游戏,遵循MVC设计模式。Created in Java. Using GUI developed with Swing, with a MVC design pattern.
Stars: ✭ 67 (-9.46%)
Mutual labels:  gui
Popup Dict
Linux 下的划词翻译小工具
Stars: ✭ 69 (-6.76%)
Mutual labels:  gui
Gimu
Cross-platform GUI for go is never this easy and clean.
Stars: ✭ 64 (-13.51%)
Mutual labels:  gui
Pypokergui
GUI application for PyPokerEngine
Stars: ✭ 72 (-2.7%)
Mutual labels:  gui
Swingtutorials
Tutorials for Java's Swing UI toolkit explaining how to use particular components
Stars: ✭ 67 (-9.46%)
Mutual labels:  gui
Wxformbuilder
RAD tool for wxWidgets GUI design
Stars: ✭ 1,167 (+1477.03%)
Mutual labels:  gui
Trifusion
Streamlining phylogenomic data gathering, processing and visualization
Stars: ✭ 65 (-12.16%)
Mutual labels:  gui
Traffic Rules Violation Detection
The System consists of two main components. Vehicle detection model and A graphical user interface (GUI)
Stars: ✭ 67 (-9.46%)
Mutual labels:  gui
Silx
silx toolkit
Stars: ✭ 69 (-6.76%)
Mutual labels:  gui
Artos
Adaptive Real-Time Object Detection System with HOG and CNN Features
Stars: ✭ 64 (-13.51%)
Mutual labels:  gui
Ariang Native
A better aria2 desktop frontend than AriaNg, containing all features of AriaNg and more features for desktop.
Stars: ✭ 1,176 (+1489.19%)
Mutual labels:  gui
Guidefate
GUI Design From A Text Editor
Stars: ✭ 64 (-13.51%)
Mutual labels:  gui
Hitomi Downloader
🍰 Desktop application to download images/videos/music/text from Hitomi.la and other sites, and more.
Stars: ✭ 1,154 (+1459.46%)
Mutual labels:  gui
Swiftgui
SwiftGUI is an API inspired by SwiftUI DSL, using Dear ImGui as renderer and running on macOS 10.13+ and iOS 11+
Stars: ✭ 74 (+0%)
Mutual labels:  gui
Skin.refocus
reFocus, a skin for Kodi
Stars: ✭ 72 (-2.7%)
Mutual labels:  gui
Asap app imgui
Starter project for portable app with optional GUI (GLFW/ImGui) and a rich builtin debug UI. Includes docked windows, log viewer, settings editor, configuration load/save, etc...
Stars: ✭ 70 (-5.41%)
Mutual labels:  gui

MoonNuklear: Lua bindings for Nuklear

MoonNuklear is a Lua binding library for Mitcha Mettke's Nuklear immediate mode GUI toolkit.

It runs on GNU/Linux, on MacOS, and on Windows (MSYS2/MinGW) and requires Lua (>=5.3).

Author: Stefano Trettel

Lua logo

License

MIT/X11 license (same as Lua). See LICENSE.

Documentation

See the Reference Manual.

Getting and installing

Setup the build environment as described here, then:

$ git clone https://github.com/stetre/moonnuklear
$ cd moonnuklear
moonnuklear$ make
moonnuklear$ make install # or 'sudo make install' (Ubuntu and MacOS)

Example

The example below shows the front-end implementation of a simple GUI.

The backend and other examples can be found in the examples/ directory contained in the release package.

local nk = require("moonnuklear")
local backend = require("backend")

local op = 'easy'
local value = 0.6
local window_flags = nk.WINDOW_BORDER|nk.WINDOW_MOVABLE|nk.WINDOW_CLOSABLE

local function hellogui(ctx)
   if nk.window_begin(ctx, "Show", {50, 50, 220, 220}, window_flags) then
      -- fixed widget pixel width
      nk.layout_row_static(ctx, 30, 80, 1)

      if nk.button(ctx, nil, "button") then
         -- ... event handling ...
         print("button pressed")
      end

      -- fixed widget window ratio width
      nk.layout_row_dynamic(ctx, 30, 2)
      if nk.option(ctx, 'easy', op == 'easy') then op = 'easy' end
      if nk.option(ctx, 'hard', op == 'hard') then op = 'hard' end

      -- custom widget pixel width
      nk.layout_row_begin(ctx, 'static', 30, 2)
      nk.layout_row_push(ctx, 50)
      nk.label(ctx, "Volume:", nk.TEXT_LEFT)
      nk.layout_row_push(ctx, 110)
      value = nk.slider(ctx, 0, value, 1.0, 0.1)
      nk.layout_row_end(ctx)
   end
   nk.window_end(ctx)
end

-- Init the backend and enter the event loop:
backend.init(640, 380, "Hello", true, nil)
backend.loop(hellogui, {.13, .29, .53, 1}, 30)

The script can be executed at the shell prompt with the standard Lua interpreter:

$ lua hello.lua

See also

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].