Jump to content
  • Advertisement

owl's Blog

Sign in to follow this  
  • entries
    26
  • comments
    30
  • views
    34150

Aww, I love my Lua!

Sign in to follow this  
owl

806 views

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)


lua01.jpg
Sign in to follow this  


2 Comments


Recommended Comments

Coolness. I really need to get more familiar with Lua. I've learned some, but I can't really use it that effectively.

Share this comment


Link to comment
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.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!