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:
parent
e267a0d2ed
commit
29da543ed7
2 changed files with 37 additions and 15 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue