Q: Setting window position so its not clipped by parent
Posted: Thu Jan 01, 2009 22:07
We are implementing different skins and we originally hard coded position and size based on our original skin (I know, I know. Don't get me started). Now that we have added additional skins some of the title bars and window borders are either narrower or wider than our original skin theme. So, the question is, how can we dynamically get the unclipped area of a parent window so we can set the proper position and size of the child window?
For example, if we create a FrameWindow and then add a child text window, the child window is bleeding into the frame window title. This result is undesirable. We want to offset the child window so it's not stepping onto the title bar or window frame.
We did find the CEGUI::Window::getUnclippedPixelRect() but we are not sure what we need to do with this data to derive a CEGUI::UVector2 for size and position. If someone could point us to an example we would greatly appreciate it.
For example, if we create a FrameWindow and then add a child text window, the child window is bleeding into the frame window title. This result is undesirable. We want to offset the child window so it's not stepping onto the title bar or window frame.
We did find the CEGUI::Window::getUnclippedPixelRect() but we are not sure what we need to do with this data to derive a CEGUI::UVector2 for size and position. If someone could point us to an example we would greatly appreciate it.