Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Buttons

Author
Message
Niels Henriksen
19
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 26th Dec 2006 00:45
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

Attachments

Login to view attachments
kBessa
17
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 4th Jan 2007 06:52
Hi Niels, sorry for the late answer.

One thing I think that should be re-coded is the OnClick method. You should be using Events, so when a click (or other event occur) you could peform any action, as a Button from Windows Forms or ASP.NET. Events are GREAT!

I won't be disclosing any code for now, a GUI plugin was one of my priorities before I got into DarkEngine development (it's code was using just DGDK.NET, no DarkEngine at the time, I should revise it), so I may get back to it when I have some free time (too much work from my job now, that's killing me).

Best Regards

Thiago
Niels Henriksen
19
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 4th Jan 2007 18:32
Hi kBessa

I will look in Events... maybe that can do it

Im very interested in plugins to DGDK.NET / DarkEngine now

--
Niels Henriksen
Working on a RPG right now

Login to post a reply

Server time is: 2024-06-29 04:21:36
Your offset time is: 2024-06-29 04:21:36