• entries
707
1173
• views
436347

# OMG, I BREAK EVERYTHING!

88 views

First off is the bad news. My tarantula, Tyrosia, died earlier today[sad]. Not only was she the only tarantula that I've held that hasn't bit me, she was also a christmas gift (so I've had her for about 9 months now since I actually got her just before christmas.)

I bet you were expecting good news now, but all I have is bad news today[depressed]. I managed to break my GUI system about 5 times today and now I have to totally rewrite part of it. The new Dialog class brought out a large problem with the system (which I had noticed before, but didn't realize it was going to be this much of a problem.) The problem is in the way that I handle events such as button pushes and such.

At the moment, each widget's input functions breakdown to something similar to this:
for(WidgetItor Itor = m_Children.begin(); Itor != m_Children.end(); ++Itor){    if(((*Itor).second.get())->/*OnXXX*/(Event))        return true;}if(PointIsIn(Event.m_AbsMousePos))    return true;return false;

Obviously it's a little more complicated than that, but it's close. Anyway, when my WidgetManager's EventHandler() method recieves true, it returns the ID of the current widget and stops. The problem is that since the widgets are added as children to other widgets instead of the WidgetManager class, a Dialog box has no way of noting that one of it's children was activated, not the actual Dialog. So, I'm going to have to figure something out, most likely just modifying it so that it returns the child's ID instead of true/false.

I also made some changes to other things.
• the WidgetManager class is now a singleton
• the ListBox now takes up all of it's width when no scroll buttons are visible
• added the ability to disable widgets
• disabling a widget makes it's color change to 0xff808080 instead of 0xffffffff (half-grey instead of pure white.)
• Fixed some MORE sorting problems
• Fixed both the ListBox's problem when deleting items
• Fixed the ID problem (the one I was talking about above. I took a break from writing the entry.)
• Added skinless rendering to the Dialog class (so that it can be used to group chunks of widgets without being seen.)
• Added the ability to have a separate GuiEventHandler() that'll receive events and IDs.

There's a couple other things, I just can't think of them at the moment.

Time for bed now.

Damn, that sucks man. Poor spidey. :(

Do you have any idea why spidey died?

Regards,
-Dave

Damn, that sucks man. Poor spidey. :(

Do you have any idea why spidey died?

Regards,
-Dave

Quote:
 Original post by ildave1 Damn, that sucks man. Poor spidey. :( Do you have any idea why spidey died? Regards, -Dave

Not really, nothings really drastically changed (like forgetting to feed or water her.) I had put a potato in her cage and she clung to it for quite a while (which she had done before and nothing happened), but after she got off it she had turned whiter, so it might have had something to do with that. *shrugs*

Or it could just be that she was a SPIDER. If she was my pet, I doubt I would have been able to resist the urge to SMASH for 9 months.

Quote:
 Original post by Deyja Or it could just be that she was a SPIDER. If she was my pet, I doubt I would have been able to resist the urge to SMASH for 9 months.

lol, I got that response from a lot of people that I've told. They're like "WTF!? It was a spider! You're supposed to squish 'em, not stick 'em in a tank and feed 'em."

## Create an account

Register a new account

×

## Important Information

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!