UI: Making PullDowns expand upward instead of downward?

In theory all you need to do is add a <GridData> element to override the standard droppy-down bit and change its anchor to "L,B".

However, you will run into all the Lua horrors of trying to correctly align the drop-down (see the last section of part 3 of my UI Tutorial)
 
whoward's UI Tutorial Part 3.5 said:
It's really not worth the effort.

I think I should just take that as a sign :lol:

I guess the users can make do with the back and forward buttons I added to allow them to scroll through the options of the PullDown one-by-one.
 
Weird! I need to do exactly the same thing for a mod I'm writing for Civ:BE

But Civ:BE as an AutoFlip attribute on pull-downs, which I'm hoping will make them grow upwards if they would fall off the bottom of the screen
 
Can't work out what AutoFlip does, but the code to "pop-up" rather than "drop-down" the menu is surprisingly simple

Code:
pullDown:CalculateInternals();
local offsetY = -(pullDown:GetSizeY() + pullDown:GetGrid():GetSizeY())
pullDown:GetGrid():SetOffsetVal(0, offsetY)

Not tried this with CivV, but I can't see why it wouldn't work. If you want to reverse the order of the items (so if they drop-down as A, B, C they would then pop-up as C, B, A (ie A will always be nearest to the menu control) you can add a <StackData> item with the growth set to Up rather than Bottom)
 
Top Bottom