Giter Club home page Giter Club logo

luagui's Introduction

#Lua GUI

Lua GUI is a library for creating GUIs with Lua aimed at unexperienced programmers. The library is being developed with the following goals in mind.

  • Easy to use.
  • Using conventions common to Lua. (It shouldn't feel like a wrapper around, for example, a C++ library.)

##Installation

Just put the entire contents of the src-folder somewhere that's in Lua's package path.

If you are using ZeroBrane Studio and you have Brane Plug installed, you can use that package manager to download and install Lua GUI.

##Documentation You can find a reference manual and code samples on the wiki.

##License Lua GUI is licensed under the terms of the Open Software License 3.0. You should read the entire license text, but here is the gist.

  • You can use the Lua GUI source code as is for pretty much any purpose you want.
  • You can create an application that uses Lua GUI and release your application under whatever terms you like.
  • If you modify Lua GUI in any way, you must release the source code of your modifications under the Open Software License 3.0.
  • Don't pretend you wrote Lua GUI.
  • Don't blame me when something goes wrong.

luagui's People

Contributors

williamwilling avatar

Stargazers

 avatar Yakup Cemil KAYABAŞ avatar Kazim avatar Walter White avatar  avatar Leonna avatar Reuben Waring avatar  avatar haruki7049 avatar  avatar Tyuzu avatar MrMidnight avatar Muhammad Athif avatar Joe Harley avatar Victor Westmann avatar  avatar Run Shan avatar Carlos avatar no7mac avatar spitemim avatar Jacob Ybarra avatar  avatar momofor avatar  avatar  avatar Víctor Eduardo Diex Díaz Urbaneja avatar Gabriel Camelo avatar Robert. R avatar  avatar Simon Dischl avatar  avatar  avatar  avatar Alvin Charity avatar ffashion avatar  avatar  avatar Dave avatar  avatar Felipe Muniz avatar  avatar Marcus Taylor avatar xiaohui avatar Amit Kapadi avatar  avatar Oliver avatar  avatar Pete avatar Toffee avatar Nico Raftis avatar Gabriel Tavares avatar wleeym08 avatar Alexandre Filgueiras avatar Kürşad Erson avatar EvanLabs avatar sora avatar jET avatar Markus Bergholz avatar yingnierxiao avatar MarkYin avatar  avatar James Doyle avatar Quez0ne avatar Nathan de Graaf avatar Jordi van Hoorn avatar

Watchers

James Cloos avatar Kürşad Erson avatar Jordi van Hoorn avatar  avatar Arnold avatar Aguinaldo de Mira avatar Nico Raftis avatar  avatar  avatar Marcin Siniarski avatar Felipe Muniz avatar  avatar

luagui's Issues

button:destroy() does not work when a timer object exists

@williamwilling : I have created a form with a button. When the user clicks the button, the button is destroyed using button:destroy().
This work fine, except when a timer object is created. Then, the destroy function does not work anymore.

Example code:

require "gui"

local window = gui.create_window()
window.title = "Button Demo"

local button1 = window:add_button()
button1.x = 10
button1.y = 10
button1.text = "Button1"

-- remove the two lines below to make sure 'destroy' works
local timer = gui:create_timer()
timer.interval = 1

function button1:on_click()
button1:destroy()
print('destroy')
end

-- comment

gui.run()

install in linux ?

how can install lua gui library ?
i tried long time but not working :(
i hope someone help me

thankyou

"Adding a menu item to a menu" and related examples broken

All the examples listed that have code "file_menu:add_item("E&xit")" generate errors. I cannot find a way to add items to a menu.

Here is the error output:
`C:\Users\ryanf\Documents\ZeroBrane Studio\bin\lua.exe: ./liblocal/guiLibs/gui\menu_item.lua:50: wxLua: Expected a 'string' or 'wxString' for parameter 3, but got a 'nil'.
Function called: 'wxMenuItem(wxMenu, number, nil, string, number)'

  1. wxMenuItem::wxMenuItem([wxMenu, number, string, string, integer, wxMenu])
    stack traceback:
    [C]: in function 'wxMenuItem'
    ./liblocal/guiLibs/gui\menu_item.lua:50: in function 'create'
    ./liblocal/guiLibs/gui\menu.lua:43: in function 'add_item'
    ...eroBrane Studio\myprograms\GUI Serial Test\GUI_TEST1.lua:11: in main chunk
    [C]: at 0x00401b00`

Gui can't find package wx on Linux with Lua5.2 and up

I executed this program inside ZeroBrane studio and with the normal "Lua" interpreter it worked without any problems, but when setting the interpreter to 5.2 or 5.3 it returns a module 'wx' not found error.

The code I used:

-- example code from github
require "gui"

local window = gui.create_window()
window.title = "Button Demo"

local button = window:add_button()
button.x = 10
button.y = 10
button.text = "OK"

gui.run()

I had the same problem trying to run it from the terminal with Lua5.3.4

wx required

Hey there. I want to play with this, but it seems to require wxLua to be installed?

I tried to follow the instructions for building wxLua but they are horrendous. Any hints as to what steps you took to install it?

image does not repaint after loading a another image using image.file_name="file"

-- example code
require "gui"

local window = gui.create_window()
window.title = "File Dialog Demo"

local button = window:add_button()
button.x = 10
button.y = 10
button.text = "Load image"

local image = window:add_image()
image.file_name = "logo.png"

--local text_box = window:add_text_box()
--text_box.multiline = true
--text_box.width = window.width
--text_box.height = window.height

local file_dialog = window:create_file_dialog()

function button:on_click()
if file_dialog:open() then
image.file_name = file_dialog.file_name
image.x = image.x + 1
end
end

gui.run()

gui.window not found

I don't know why but whenever i run i get the following error :
./luagui-master/src/gui.lua:4: module 'gui.window' not found: no field package.preload['gui.window'] no file './gui/window.lua' no file '/usr/local/share/luajit-2.0.4/gui/window.lua' no file '/usr/local/share/lua/5.1/gui/window.lua' no file '/usr/local/share/lua/5.1/gui/window/init.lua' no file './gui/window.lua' no file './gui/window/init.lua' no file './lua/gui/window.lua' no file './lua/gui/window/init.lua' no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/lualibs/gui/window/gui/window.lua' no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/lualibs/gui/window.lua' no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/lualibs/gui/window/gui/window/init.lua' no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/lualibs/gui/window/init.lua' no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/clibs/gui/window.dylib' no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/clibs/libgui/window.dylib' no file './gui/window.so' no file '/usr/local/lib/lua/5.1/gui/window.so' no file '/usr/local/lib/lua/5.1/loadall.so' no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/clibs/gui/window.dylib' no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/clibs/libgui/window.dylib' no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/clibs/gui.dylib' no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/clibs/libgui.dylib' no file './gui.so' no file '/usr/local/lib/lua/5.1/gui.so' no file '/usr/local/lib/lua/5.1/loadall.so' no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/clibs/gui.dylib' no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/clibs/libgui.dylib' stack traceback: [C]: in function 'require' main.lua:1: in main chunk
I reviewed the library's code and it looked good: `local print_backup = print

require 'wx'
local Window = require 'gui.window'
local FileDialog = require 'gui.file_dialog'
local Timer = require 'gui.timer'`

Any idea what happened?

Making an executable

Hi,

just curious, how would you compile a lua programm made with LuaGui into a windows .exe or macOS dmg ? Would you use LuaDist ? Or is it somthing ZeroBrain can handle ?

Thanks !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.