Hey! Sooo sorry not replying sooner. I was wondering why no one responded to my post and just checked. Turns out I didn't turn on my notifications and an awesome discussion broke out! Bawesome.
Ok, first thanks a lot for helping me with this!
Next, here are my responses, in order of post:
pd:
Tell me if you need a png for this. In case you want to draw this by code, I've provided a zoomed in cutout.
Yep, could use a png. That'd be helpful. I was going to just use a color background until something else came along. That'd be most helpful, thank you! The
only issue I can think is that this image needs to be rescalable for say windows of a different width size. Basically, it'd be nice to have a class you can drop into any window to partition them. So the "divider" draggable element needs to have a bit of logic to make that middle piece stay in the middle and not squish it.
Any png you give me I can slice to do that, I imagine. That design is awesome: 3 dots, a nice color bkrd.
Something else I noticed with the current fleet window: You can't drag items, when you click on the meter icons or numbers. Does this have to do with the tooltips? Can it be changed?
Is this a bug? Can it be put on the list of Programming Tasks? I could tackle this next, based on what the priority is, or what Geoff / Tzlaine says.
Geoff the Medio:
What do you mean by selectable? Why would a user want to "select" a draggable tab, rather than just drag it?
What will Divider do that a differently-rendered Scroll wouldn't?
Select+Drag = Draggable. I use "select" as language to indicate the user can click on it. I meant what you mean about "Draggable".
"differently-rendered Scroll" is the key. I don't believe the Scroll class can be stretched to do this. It's pushing what a "scroll" is meant to do outside the bounds of a Scroll, in my assessment of the language... Scroll is meant to be able to scroll through data that overflows a container. Whereas this "Divider" class is meant to allow a user to rearrange 2 views, to show / hide more of the view (which will trigger their "Scroll" elements to show in the ListBox.
Alternatively, there could just be a draggable spot below the new fleet drop box, and draggin this would shift the new fleet drop box around without resizing the drop box, but resizing the two lists to fill the space above and below the drop box.
Ah... I think I understand. In your solution, dragging to "shorten" or "lengthen" a window would cause the entire window to resize by either:
a) resizing the entire window to shrink / grow, or
b) shrink / grow another window element, i.e. the two list boxes
So option (b) maps this dragger to cause this shrink / grow two window elements. That's cool if you wanted to hard-code it to work JUST for this FleetWnd.cpp.
But I'm thinking a class that you can use anywhere, for any 2 windows. That brings me to
tzlaine
I think this is a suboptimal choice. You'd be hammering that square peg into that round hole pretty hard -- Scroll is not well-suited to what you want to do. I think you'll be better off making a completely new GG::Splitter class. It should accept N GG::Wnds, and place a splitter bar between each. It could use a top-level GG::Layout that would do all the heavy lifting. For extra credit, make it work for horizontal or vertical. Thanks for taking this on!
Dude, that's exactly what I want the Divider class to do. Your Splitter = My Divider. I asked Geoff if I should ask ya about this, since GG is your realm, but that's the solution I'm thinking. If you checkout the flex links, that's almost how HDividedBox / VDividedBox work: they're actually a container that takes in any visual objects and puts a "divider" (similar to tab in Scroll) between. Dragging resizes the elements. I was thinking small, just a Divider that can handle taking in two window objects, and drag, with a bounds to it. But your Splitter box sounds like a more articulate version of what I'm talkin' about. Hence, looking at the Scroll class as guide: already has a draggable area (tab / divider).
And yeah, should have a parameter for layout... horiz / vert. Double Dig.
Sorry again for not responding. I didn't setup notifications for this post. This is awesome.