hi , i draw one picture on the screen
But I can't find OnClick property.Code:ImageList.Items[0].Draw(DXDraw1.Surface,255,50,0); DXDraw1.Flip;
hi , i draw one picture on the screen
But I can't find OnClick property.Code:ImageList.Items[0].Draw(DXDraw1.Surface,255,50,0); DXDraw1.Flip;
For the picture that i draw .
You need to use a combination of
Form.DXDraw1MouseMove and ( Form.DXDraw1MouseDown or Form.DXDraw1MouseUp )
test your object to see if they are at the same point as the mouse and perform the relevant action.
I do something like this in my Demo Game Guns
http://www.cerebral-bicycle.co.uk/viewdoc.asp?doc=38
I create a sprite which is the mouse pointer.
On the MouseMove I set my Cursor sprite position
On the MouseUp I see if the my menu options to see if they collided with the cursor in the DoCollision phase and depending on the menu options selected, I perform some action.
This is not the only or by any means the best way to do it, but it's one way.
In my current game I bind the address of a procedure to the object and when the Click is made, if it is assigned, the object calls the procedure itself.
Bookmarks