Jump to content
  • Advertisement
Sign in to follow this  
Toolmaker

[.net] Desing issue with own control, any ideas?

This topic is 4792 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm posting to hear what everyone else has to say on this, because I'm not sure how to solve this problem. Asking around might shed some light on my problem :) I'm building my own custom control right now, which looks a bit like this: . I got a basic control layout done right now, which shows the top-level buttons. However, I currently draw everything myself, in the OnPaint() of the control. However, this poses some problems, esp. with mouse-enter/exit messages. I'm not sure how to design it further. I have thought about changing it to display buttons instead of self-drawn stuff, but that poses me a little problem with the "collapsed" view. How would I design that? Because it would either mean the button control can collapse itself, or would replace it's own instance with a new one. Ideas? Toolmaker

Share this post


Link to post
Share on other sites
Advertisement
Collapsing is easy: just put the childnodes in a seperate panel and set the Height of the panel to 0 to collapse.

Cheers

Share this post


Link to post
Share on other sites
First, nice control. I just finished my own fully custom control, it's fun stuff.

Anyway, what is behind this control? Is it directly inheriting Control, or something else? What do you mean about having troule with mouse enter/exit? You don't know where the mouse is hovering over? For simplicity, are the child menus actually seperate controls contained in the parent menu? That would simplify any mouse calculations a good bit.

If you make it a little more clear where your difficulty is I'll try to help more. I just finished writing the base GUI system for my 4e4, so I'm ready!

Share this post


Link to post
Share on other sites
I'm deriving this directly from Control. I've thought about the idea of making each menu item a seperate sub-control. When clicked, it collapses and shows a child-panel.

That probably works better.

Toolmaker

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!