Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "fbgfx.bi"
- type gui_thing
- dim onClick as function() as integer
- end type
- declare function userClick() as integer
- screenres 640,480,32
- dim as gui_thing test
- 'set the callback function to the one we wrote, instead of the one contained in the type
- test.onClick = @userClick()
- dim as integer x, y, button
- do
- getmouse(x,y,,button)
- if button and 1 then
- print test.onClick()
- end if
- sleep 3,1
- loop until multikey(FB.SC_ESCAPE)
- function userClick() as integer
- static as integer value
- value+=1
- return value
- end function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement