From 17a2bd59d1fd81881aeb656ff26b062f932a5060 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 6 Jun 2013 21:58:18 +0200 Subject: [PATCH] CComponents: add members setRealXPos() and setRealYPos() --- src/gui/components/cc.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/components/cc.h b/src/gui/components/cc.h index 0308cce09..0fdd83ac2 100644 --- a/src/gui/components/cc.h +++ b/src/gui/components/cc.h @@ -123,7 +123,11 @@ class CComponents ///to set the real screen position, look at setRealPos() inline virtual void setPos(const int& xpos, const int& ypos){x = xpos; y = ypos;}; - ///sets real position on screen. Use this, if item contains own render methods and item is added to a form + ///sets real x position on screen. Use this, if item is added to a parent form + virtual void setRealXPos(const int& xr){cc_xr = xr;}; + ///sets real y position on screen. Use this, if item is added to a parent form + virtual void setRealYPos(const int& yr){cc_yr = yr;}; + ///sets real x and y position on screen at once. Use this, if item is added to a parent form virtual void setRealPos(const int& xr, const int& yr){cc_xr = xr; cc_yr = yr;}; ///get real x-position on screen. Use this, if item contains own render methods and item is bound to a form virtual int getRealXPos(){return cc_xr;};