I’v got a static image which is positioned relative to it’s parent, and it’s parent is another static image which a part of a lot of other windows and windows in windows etc.
So; when I do the following…
Code: Select all
CEGUI::Point entity_pos = mapEntity_staticImage->getPosition(CEGUI::Absolute);
… I get the position – relative to it’s parent.
However, I would want it’s position relative to the screen size, since I want to calculate the length of a vector from the static image to the current mouse coordinates.
I get the mouse coordinates from event variables (this is all triggered inside a "EventMouseMove” over a specific window)
Code: Select all
CEGUI::MouseEventArgs& me = (CEGUI::MouseEventArgs&)e;
CEGUI::Point mouse_pos = me.position;
So .. I’v got mouse coordinates (position) and the image position but I need either the mouse coordinates relative to the component current “under” the mouse pointer, or the image position relative not to it’s parent but the whole screen.
Anybody got an idea of how to accomplish this?
Greets,
Tomas