Home

Awesome

lui, libui bare bindings for lua

libui bare bindings for luajit and lua 5.1/ 5.2/ 5.3.

This binding makes libui available to lua scripts. libui is easy binding and should usable from nearly any lua project.

Notice

Examples

Examples can be found in the examples folders, those are translate from examples.

Buliding

Checkout source

  git checkout  https://github.com/zhaozg/lui.git
  cd lui
  git submodule init
  git submodule update

Building on linux or macOS

  cd lui
  make install

Building on Windows

TODO

APIs

  ui = require'lui'  -- type(ui) is 'table'
  assert(ui.Init())
  ui.Quit()
  ui.Uninit()
  wnd = ui.NewWindow(...) -- type(wnd) is userdata with metatable 'libui.Window'
  entry:Padded(true)  -- just call uiEntrySetPadded(entry,1) and return object itself
  entry:Padded()      -- just call uiEntryPadded(entry) and return boolean type padded value
  `ui.NewRadioButtons():Append("One", "Two", "Three")
  wnd:Show()
  wnd:OnClosing(onclosing_cb)

You need read examples to be familiar with them.

Thanks