christianboutin.com
14-09-2009 15:15:26
I'm creating a list of buttons in a window through a for loop in this way :
items are created in the window, but as they go below the lower end and the scrollbar is created, items created _before_ the scrollbar get moved to the side as shown here :
The coincidentally named "mistake" button appears at a different X position than the previous button "at all costs". Mistake is at the right place though, and all buttons above it were pushed to the left. mistake is the first button that is created after the scrollbar is required (ie, "at all costs" goes a bit below the window, so after it the scrollbar is created, then "mistake" is created)
Switch the commented "for" for the other, which places buttons from the bottom up, and this is what I get :
As you can see only the first created button, "Blowing up Rocks" is improperly placed. Others are in their proper place.
There's a quick workaround for this on the user's end. Create a blank dummy item at the lower-right-most point as the first element, then add all the buttons. Still thought you'd like to know.
Thanks!
C.
* edit : clicked submit prematurely
for (int i=0;i<10;i++){
//for (int i=9;i>=0;i--){
if (i%2 == 0){
bd->widget_skinTypeName = "usca_missionbuttondark";
}else{
bd->widget_skinTypeName = "usca_missionbuttonlight";
}
bd->widget_dimensions.position = QuickGUI::Point(13,bd->widget_dimensions.size.height*i);
bd->textDesc.segments.clear();
bd->textDesc.segments.push_back(TextSegment("BigMenu",QuickGUI::ColourValue::White, *missionTitle.begin()));
win->createButton(bd);
missionTitle.pop_front();
}
items are created in the window, but as they go below the lower end and the scrollbar is created, items created _before_ the scrollbar get moved to the side as shown here :
The coincidentally named "mistake" button appears at a different X position than the previous button "at all costs". Mistake is at the right place though, and all buttons above it were pushed to the left. mistake is the first button that is created after the scrollbar is required (ie, "at all costs" goes a bit below the window, so after it the scrollbar is created, then "mistake" is created)
Switch the commented "for" for the other, which places buttons from the bottom up, and this is what I get :
As you can see only the first created button, "Blowing up Rocks" is improperly placed. Others are in their proper place.
There's a quick workaround for this on the user's end. Create a blank dummy item at the lower-right-most point as the first element, then add all the buttons. Still thought you'd like to know.
Thanks!
C.
* edit : clicked submit prematurely