Hi...
Finally working with DGDK.NET I'm started to make my own classes. Right now Im making a Button class for my (MMO)RPG where I (for a test) define 2 buttons.
oButton1 = New Button(100, 100, 50, 50)
oButton1.Visible = True
oButton1.OnClick = "HIDEBUTTON LeftButton"
oButtons.AddButton("LeftButton", oButton1)
oButton1 = New Button(200, 300, 50, 50)
oButton1.Visible = True
oButton1.OnClick = "SHOWBUTTON LeftButton"
oButtons.AddButton("MidButton", oButton1)
LeftButton can hide it self when the user is clicking on it. And to show "LeftButton" the user just have to click on "MidButton".
All actions are running in the main loop when the program executes the "oButtons.ButtonUnderMouse"
Its my plan to expand "OnClick" property to windows also. My idea is that buttons and windows are made by sprites to perform well in a 3D universe..
I have enclosed the source in VB.. But its only a draft (so far).
If you change the code then please share it
Comments??
--
Niels Henriksen
Working on a RPG right now