Priorities set for Layers in Falagard StateImagery sections do not have the required / expected precision(!)

Create issue
Issue #200 resolved
Paul Turner created an issue

Basically layers do not work at the granularity that they should. Ref:

From the forum topic: 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 ...


<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:

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); } }

Reproducibility: unable to reproduce

Comments (1)

  1. Paul Turner reporter

    I have investigate this, and it turns out that there is no issue in the layers system of the skinning per-se, rather I think that the originator was looking for parts of the imagery on the parent to obscure a child window (the client area referred to in the forum post); setting the layer to such a large value would bump the 'z' of the imagery such that it did in fact then appear in front of the attached child.

  2. Log in to comment