I have customized WindowsLook/FrameWindow to have round corners. My frame is wide (10 pixels).
The client area fits well in the inner part of the frame (after changing the appropriate Areas in the Looknfeel definition).
The problem is that the client area is rendered on top of the frame and not beneath it so I don't get the nice rounded corners I wanted.
Is there a way to order the rendering of the frame and client?
I have tried with Layer priority in the appropriate StateImagery sections but that does not seem to do anything.
Any ideas ?
framewindow with round corners
Moderators: CEGUI MVP, CEGUI Team
SOLVED
Well,
The solution was the priority setting of the layer .. but for some reason setting a value of 1 was not enough .. nor 100 ... When setting the frame layer to 100000 I got the desired result ...
This probably has something to do with ...
from CEGUIFalStateImagery.cpp
The solution was the priority setting of the layer .. but for some reason setting a value of 1 was not enough .. nor 100 ... When setting the frame layer to 100000 I got the desired result ...
Code: Select all
<StateImagery name="ActiveNoTitleWithFrame">
<Layer priority="100000">
<Section section="notitle_frame">
<Colours topLeft="FFA7C7FF" topRight="FFA7C7FF" bottomLeft="FFA7C7FF" bottomRight="FFA7C7FF" />
</Section>
</Layer>
<Layer>
<Section section="notitle_withframe_client_area" />
</Layer>
</StateImagery>
This probably has something to do with ...
from CEGUIFalStateImagery.cpp
Code: Select all
void StateImagery::render(Window& srcWindow, const ColourRect* modcols, const Rect* clipper) const
{
float base_z;
// render all layers defined for this state
for(LayersList::const_iterator curr = d_layers.begin(); curr != d_layers.end(); ++curr)
{
// TODO: Magic number removal
base_z = -0.0000001f * static_cast<float>((*curr).getLayerPriority());
(*curr).render(srcWindow, base_z, modcols, clipper, d_clipToDisplay);
}
}
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Hi,
I have investigate this, and can report the the layers actually appear to function as expected, but... If you're using a separate client area window (perhaps embedded into the FrameWindow - as per the 'auto windows' Wiki article), this will appear in front of the imagery for the parent frame window. However, by bumping the layer of the FrameWindow imagery to such a large degree you effective push the parent window imagery forwards so it appears in front of attached child windows.
For reference purposes, the above situation (with imagery 'pushed through') is potentially unreliable (basically if it works and you're happy, it's fine, but there are potential issues).
What I might suggest is to arrange things such that you use another window for the front-most imagery (basically a DefaultWindow with some imagery applied), embed this as child within the FrameWindow LookNFeel but have it set as being always on top, but then either disabled or with MousePassThroughEnabled set to True. This should give a true 'layered' look to the imagery, while being a little more robust.
CE.
I have investigate this, and can report the the layers actually appear to function as expected, but... If you're using a separate client area window (perhaps embedded into the FrameWindow - as per the 'auto windows' Wiki article), this will appear in front of the imagery for the parent frame window. However, by bumping the layer of the FrameWindow imagery to such a large degree you effective push the parent window imagery forwards so it appears in front of attached child windows.
For reference purposes, the above situation (with imagery 'pushed through') is potentially unreliable (basically if it works and you're happy, it's fine, but there are potential issues).
What I might suggest is to arrange things such that you use another window for the front-most imagery (basically a DefaultWindow with some imagery applied), embed this as child within the FrameWindow LookNFeel but have it set as being always on top, but then either disabled or with MousePassThroughEnabled set to True. This should give a true 'layered' look to the imagery, while being a little more robust.
CE.
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 12 guests
