jMonkeyEngine-Contributions / Lemur

Lemur is a jMonkeyEngine-based UI toolkit.
http://jmonkeyengine-contributions.github.io/Lemur/
BSD 3-Clause "New" or "Revised" License
116 stars 33 forks source link

changing border of container will change the background too... #76

Closed RayanFar closed 5 years ago

RayanFar commented 5 years ago

changing border of container will change the background too...

         new Container().setBorder(new QuadBackgroundComponent(ColorRGBA.Blue));

version -> lemur 1.12.0

pspeed42 commented 5 years ago

I'm not sure what this means. "Border" is just a layer. You can have a border that is also a quad, for example, and will fill in the whole "background"... but then you can also have a background component that will be drawn on top of that.

Is that not working or is there just a misunderstanding?

RayanFar commented 5 years ago

no it is not working...

    win.setBorder(new QuadBackgroundComponent(ColorRGBA.Blue));
    win.setBackground(new QuadBackgroundComponent(ColorRGBA.Black));
pspeed42 commented 5 years ago

The default margin for QuadBackgroundComponent is 0,0 so those will lay right on top of each other. Try: win.setBorder(new QuadBackgroundComponent(ColorRGBA.Blue, 5, 5)); win.setBackground(new QuadBackgroundComponent(ColorRGBA.Black, 5, 5)); ...or similar non-zero margin values.