summaryrefslogtreecommitdiff
path: root/src/interface/Component.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface/Component.cpp')
-rw-r--r--src/interface/Component.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/interface/Component.cpp b/src/interface/Component.cpp
index e4c6811..b925430 100644
--- a/src/interface/Component.cpp
+++ b/src/interface/Component.cpp
@@ -156,6 +156,17 @@ void Component::SetParent(Panel* new_parent)
this->_parent = new_parent;
}
+Point Component::GetScreenPos()
+{
+ Point newPos(0,0);
+ if(GetParentWindow())
+ newPos += GetParentWindow()->Position;
+ if(GetParent())
+ newPos += GetParent()->Position;
+ newPos += Position;
+ return newPos;
+}
+
// ***** OVERRIDEABLES *****
// Kept empty.