WoW BlueTracker Home | RSS | News | Contact
Recent | Search | Archive | CS Posts
Poster: Glaumene at 9/1/2005 2:54:04 AM PDT
Subject: Blue: Will UIDropDownMenu ever be reviewed?
   OK, while coding a bit the other day, and working with the Drop Down Menu, I stumbled some annoyances with it, that I'd like to address.

First of all, the UIDropDownMenu_SetWidth() function.

By looking through the code, it sets the width of the control, and then set a variable:
frame.noResize = 1;

What you'd expect, is that this changes the way the dropdown menu works, so that it's always the same width, no matter the context. But this is not true. The variable noResize is used nowhere. You might think it's used in the UIDropDownListTemplate OnShow code, but no, that's the DropDown#.noResize - a variable never set anywhere, never copied from the frame.noResize. In other words, the OnShow code for DropDown# is doing nothing, the list is always resized to fit the largest item.
Currently, I'm using a work-around for this, by adding:
DropDown1.maxWidth = xxx;
to my drop down init function (the one with the UIDropDownMenu_AddButton() calls). But this is a workaround, that should not be neccesary, since they functionality is already present in the Blizzard code, but for some reason, not finished. Also, it will only work to make the list wider than it already is.

Another thing I noticed, when comparing the 1.6.1 and 0.7.0 code, was the added UIScale to the list in ToggleDropDownMenu(), always applying the global UIScale, or 1.0 if the dropdown menu was from the world map. Why not just add a function to set the scale, or just use tempFrame:GetScale(), which would remove this ugly hack:
if (tempFrame ~= WorldMapContinentDropDown and tempFrame ~= WorldMapZoneDropDown)
in an otherwise clean code, free for hardlinked references. By using tempFrame:GetScale() or adding a method to specify it, coders can also easily specify their own scale.
Again, work-around for custom scale, is DropDown1:SetScale(xxx); in the drop down init code (or DropDown2, DropDown3, depending on menu-level).

It's just some small annoyanced, with work-arounds, but there shouldn't be a need for these work-arounds
Maldivia <Cynosure>, Sargeras
  http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=207822&p=#post207822
 
Poster: horkin at 9/1/2005 10:29:20 AM PDT
Subject: Re: Blue: Will UIDropDownMenu ever be reviewe
   As the writer of the referenced spaghetti code, I can say yes, the code will be revisited. Unfortunately the power of my brain < deadlines =(

The main thing I want to correct is a split between the management of the data and the display.

I will try to fix the setWidth function for the next patch.
  http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=207822&p=#post207939
Poster: horkin at 9/2/2005 11:02:07 AM PDT
Subject: Re: Blue: Will UIDropDownMenu ever be reviewe
   I will try to get the nil checking in the next patch. Thanks for the feedback. =)
  http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=207822&p=#post208559

View all recent official Blue Posts

WoW Blue Tracker: Archiving World of Warcraft Blue Posts
since March 2005
Home | RSS | News | Contact
Recent | Search | Archive | CS Posts
 

Why Ads?