Simplification of Window::getAbsolutePosition(), etc

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

User avatar
Jeff_Leigh
Just popping in
Just popping in
Posts: 13
Joined: Wed Jan 12, 2005 12:06
Location: Yes
Contact:

Simplification of Window::getAbsolutePosition(), etc

Postby Jeff_Leigh » Fri Jun 25, 2004 22:19

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.)

User avatar
Jeff_Leigh
Just popping in
Just popping in
Posts: 13
Joined: Wed Jan 12, 2005 12:06
Location: Yes
Contact:

Simplification of Window::getAbsolutePosition(), etc

Postby Jeff_Leigh » Fri Jun 25, 2004 22:55

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.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Simplification of Window::getAbsolutePosition(), etc

Postby CrazyEddie » Sat Jun 26, 2004 06:51

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.

:oops: Thanks for spotting that, I have now committed a fix ;) (and just broke peoples code :roll:)

[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