Data Extension - No ButtonClicked Event ???
-
Sunday, December 04, 2011 11:58 AM
Hello,
I've been doing a game in small basic, and i used the controls from GameControls to add two buttons, only problem is there's no event like GameControls.ButtonClicked, so i can't do anything when I click the buttons, can anyone help ?
All Replies
-
Sunday, December 04, 2011 12:29 PM
Data Extension is designed for more advanced use so it doesn't have same easy interfaces like Controls.
However it does have much more features like following sample demonstrates:
DataExtension.Init() 'Not required but recommended initializer call GameWindow.Show() 'Show the window MyButton = GameControls.AddButton("Click Me",30,30,80,26) 'Create Button<br/>'Event registering<br/>GameControls.RegisterMouseEnterEvent(MyButton,"MyButton_Enter") GameControls.RegisterMouseLeaveEvent(MyButton,"MyButton_Leave") GameControls.RegisterMouseDownEvent(MyButton,"MyButton_Down") GameControls.RegisterMouseUpEvent(MyButton,"MyButton_Up") Sub MyButton_Enter TextWindow.WriteLine("Mouse Enter") EndSub Sub MyButton_Leave TextWindow.WriteLine("Mouse Leave") EndSub Sub MyButton_Down TextWindow.WriteLine("Mouse Down") EndSub Sub MyButton_Up TextWindow.WriteLine("Mouse Up") EndSub
- Marked As Answer by AshkoreDracson Sunday, December 04, 2011 12:53 PM
-
Sunday, October 14, 2012 12:47 PMcan you give a example? I'm trying to play a song or a video using a button, so I can do that with controls but not with this data extension gamecontrols. thank you.
-
Sunday, October 14, 2012 3:01 PM
See here
http://social.msdn.microsoft.com/Forums/en-US/smallbasic/thread/5ed51f6b-4029-4c9b-8019-73fcb492b80e
and another Import code.... HHW942 , FTF570

