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 .NET / making an interface (menu buttons?)

Author
Message
xix psycho xix
15
Years of Service
User Offline
Joined: 15th Sep 2008
Location:
Posted: 13th Feb 2010 00:07
Hey, i was wondering if anyone could give me some quick ideas on making a menu interface for my game in C#. I don't even know where to start. I just need someone to give me some basic ideas. Thanks guys!
sebi
14
Years of Service
User Offline
Joined: 29th Jan 2010
Location:
Posted: 14th Feb 2010 18:50
hy psycho

menus made of mine are always an normal image. i draw the needed menu components directly on the background and make an if statement to check where the mouse is
i.e:


sry i mixed some syntax but thats an idea to realize an interface. if you want an rollover:


hope it'll help

greetz sebi

P.S.: please excuse my english
Yoda Master
16
Years of Service
User Offline
Joined: 23rd Feb 2008
Location: Genova
Posted: 15th Feb 2010 16:37
sebi is right, but I suggest you to use sprites and use them to render menu parts, it should more efficient...

Regards

Fear leads to anger
Anger leads to hate
Hate leads to suffering
o2q
15
Years of Service
User Offline
Joined: 13th Sep 2008
Location:
Posted: 1st Mar 2010 16:49
Hello,

Here's a quite old but really useful button struct snippet I made for my project last summer. It uses kBessa's LightText plugin because of its great usability. You are going to need to change couple of things to make it compile in your project, but it should be fairly simple by looking at the errors.



Using this snippet you can easily make for example a menu button like this:



And then just place it inside your loop and use

Yoda Master
16
Years of Service
User Offline
Joined: 23rd Feb 2008
Location: Genova
Posted: 8th Mar 2010 11:56
@o2q:

Why are you using structures? It doesn't seems to me an object that could be rendered as a structure...I think it references too many "non-structures" objects...A structure should represent a primitive type (like Point and Rectangle structures embedded in .NET Framework)

And btw, if have a method called "dispose", then the object should implements IDisposable for good .NET Principles!

Fear leads to anger
Anger leads to hate
Hate leads to suffering

Login to post a reply

Server time is: 2024-04-25 00:50:48
Your offset time is: 2024-04-25 00:50:48