worked out a simple way to call a lua function as a method based on the overridable_function_members.cpp

example
This commit is contained in:
Hartmut Seichter 2019-01-14 22:47:57 +01:00
parent e267a0d2ed
commit 29da543ed7
2 changed files with 37 additions and 15 deletions

View file

@ -70,6 +70,11 @@ local w = pw.window.new()
-- set title
w.title = "pixwerx 0.1"
-- setup a lua callback function
w.on_update = function(self)
print("test on update",w.position.x,w.position.y)
end
-- set size
w.size = pw.size.new(800,600)
-- move window