It seems rather redundent to implement getPosition, getAbsolutePosition, and getRelativePosition...
Couldn't a version of getPosition() and getSize() be built to accept an optional MetricsMode parameter?
(This would simplify a bit of code I wrote which currently has to set the metrics mode to match it's parent's mode and then set it back when done... as it is actually cleaner to code it that way than to use if's and the named functions.)
Simplification of Window::getAbsolutePosition(), etc
Moderators: CEGUI MVP, CEGUI Team
- Jeff_Leigh
- Just popping in
- Posts: 13
- Joined: Wed Jan 12, 2005 12:06
- Location: Yes
- Contact:
- Jeff_Leigh
- Just popping in
- Posts: 13
- Joined: Wed Jan 12, 2005 12:06
- Location: Yes
- Contact:
Simplification of Window::getAbsolutePosition(), etc
Woops!
I'm not sure if you've fixed it or not yet, but in my copy the function name for StaticText::setBackgroundEnabled() is misspelled.
I'll grab the latest CVS over the weekend.
I'm not sure if you've fixed it or not yet, but in my copy the function name for StaticText::setBackgroundEnabled() is misspelled.
I'll grab the latest CVS over the weekend.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Simplification of Window::getAbsolutePosition(), etc
It seems rather redundent to implement getPosition, getAbsolutePosition, and getRelativePosition...
Couldn't a version of getPosition() and getSize() be built to accept an optional MetricsMode parameter?
(This would simplify a bit of code I wrote which currently has to set the metrics mode to match it's parent's mode and then set it back when done... as it is actually cleaner to code it that way than to use if's and the named functions.)
Yeah, this is one area that I need to revisit (again) at some stage. I'll add some functions as you describe, hopefully over this weekend sometime. I also have to add matching setter method for those getters.
I'm not sure if you've fixed it or not yet, but in my copy the function name for StaticText::setBackgroundEnabled() is misspelled.
Thanks for spotting that, I have now committed a fix (and just broke peoples code )
[Edit]
I have added the requested functions to the Window base class. The other functions are still available though - to remove them now would be a major breaking change. As stated above, soon I'll add a matching set of manipulator methods (possibly next week). HTH.
[/Edit]
Return to “Bug Reports, Suggestions, Feature Requests”
Who is online
Users browsing this forum: No registered users and 5 guests