1
SFML projects / LuaSFML
« on: November 12, 2007, 04:38:31 am »
I'm working on a module for Lua using SFML.
Here some simple Lua code example http://lua.pastey.net/76987
I don't know if someone is already working on a wrapper for lua, let me know.
Regards.
Here some simple Lua code example http://lua.pastey.net/76987
Code: [Select]
-- Requires the window module
require("LuaSFML.window")
--[[
Create the window:
-- Width = 800
-- Height = 600
-- BPP = 32
-- Caption = "Title"
-- Style = sfWindowFixed
-- Antialiasing level = 0
]]
Window = sfWindowCreate(800, 600, 32, "Title", sfWindowFixed, 0)
-- Start main loop
IsRunning = true
while (IsRunning) do
-- Manage events
Event = sfEventCreate()
while (sfWindowGetEvent(Window, Event)) do
-- Close event
if (sfEventType(Event) == sfEventClose) then
-- Terminate
IsRunning = false ;
end
end
-- Display the window
sfWindowDisplay(Window)
end
I don't know if someone is already working on a wrapper for lua, let me know.
Regards.