app = owl.get_app()
function btn_new_game_click()
print (app.clock:get_fps())
end
-- Create Button New Game
btn = owl.create_button(app.gui.root)
btn:text("New Game")
btn:move(200,200)
btn:resize(600, 40)
btn:on_click(app.script, "btn_new_game_click")
btn:center_horizontally(app.gui.root)
label = owl.create_label(app.gui.root)
label:text("FPS:")
label:foreground_color(255,255,255,255)
label:move(100,100)
label:resize(100,20)
Previous Entry
If it don't take two..
Comments
yckx
Coolness. I really need to get more familiar with Lua. I've learned some, but I can't really use it that effectively.
May 15, 2011 03:07 PM
It's really cool. If you dare, take a look at my previous entries on SWIG. That's how I use Lua in my project. I've almost interfaced my entire codebase.
I'm currently working on the level editor, which it's logic is completely done with Lua through SWIG.
I'm currently working on the level editor, which it's logic is completely done with Lua through SWIG.
May 15, 2011 04:27 PM
Advertisement
Latest Entries
Saving and loading levels
1982 views
Bringing the tools together
1850 views
Aww, I love my Lua!
1765 views
If it don't take two..
1605 views
Octreezing the world
1931 views
Finding data structures that make sense
1386 views
Advertisement