Paul.Withers Posted September 19, 2019 Posted September 19, 2019 Hello, I am using the OVERLAP alignment flag (with BACKGROUND) to have an object in the background of my box. It works until my box is resized, in which case, any object with OVERLAP as a flag will not get resized, even if the EXPAND is set. Is this intentional behavior? How do i get a resizable background Sprite sits in the background of a Gui element? Cheers Paul
alexander Posted September 19, 2019 Posted September 19, 2019 Hi Paul, How do i get a resizable background Sprite sits in the background of a Gui element? Just use this: widget->addChild(background_sprite->getWidget(), Gui::ALIGN_BACKGROUND | Gui::ALIGN_EXPAND); ALIGN_OVERLAP overrides ALIGN_EXPAND. Best regards, Alexander
Paul.Withers Posted September 19, 2019 Author Posted September 19, 2019 Thanks for the response! But the Sprite in this case will not sit in the background, it will sit alongside anything else added to the Gui item (In my case, a scroller). Setting OVERLAP will allow any added items to the scroller to overlap the sprite. Basically, what i am trying to do, is have a GuiScrollBox, with a black background, with a Canvas on top. Any help would be appreciated.
silent Posted September 19, 2019 Posted September 19, 2019 Hi Paul, Could you please show us how the final result should look like? Right now it's not completely clear how elements should be arranged. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts