Jump to content

[SOLVED] stencil - WidgetSprite in HBox.


photo

Recommended Posts

Posted

Hey Unigine,

 

stencil isn't working for sprites.

 

<hbox stencil="1" width="10"  export="1" name="statusbarLayer">
    <sprite texture="imagepath.png"/>
</hbox>

 

If I'm using a label:

<hbox stencil="1" width="10"  export="1" name="statusbarLayer">
    <label><text>012345678910111213</text></label>
</hbox>

 

it work's neither. (updated)

In my opinion thats a bug isn't it?

 

PS: I tried to set the align in texture like: align="expand" etc. and it didn't work aswell.

Greetings

Lars

Posted

As far as I know, stencil is supported only for WidgetVBox and WidgetGroupBox.

Posted

Hey Manguste,

 

HBox is deduced of VBox - so this feature should be inherited there aswell like your documentation.

 

But at all with a VBox or a GroupBox it doesn't work.

Posted

Oops, indeed, my bad. Please send us a minimal test scene in this case.

 

  • 2 weeks later...
Posted

Lars,

 

The idea is as follows: if stencil is set for a container, it will cut widgets by its bounds. And that happens when its childen you want to cut have the align="overlap" flag. Children that do not have this flag set, will simply increase the container size. And since recalculated bounds include the child widget in this case, there will be absolutely no effect by setting a stencil flag.

Posted

Hey Manguste,

 

thanks for your tip, I'll test it this evening and give feedback.

At all it would be cool to find such tips in the documentation.

 

Greetings

Lars

  • 2 weeks later...
×
×
  • Create New...