mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
CComponentsItem: add missing methodes for position setters
Parent items were not considered for position calculation.
This commit is contained in:
@@ -261,6 +261,20 @@ bool CComponentsItem::isAdded()
|
||||
return false;
|
||||
}
|
||||
|
||||
void CComponentsItem::setXPos(const int& xpos)
|
||||
{
|
||||
CCDraw::setXPos(xpos);
|
||||
if (cc_parent)
|
||||
cc_xr = cc_parent->getXPos() + x;
|
||||
}
|
||||
|
||||
void CComponentsItem::setYPos(const int& ypos)
|
||||
{
|
||||
CCDraw::setYPos(ypos);
|
||||
if (cc_parent)
|
||||
cc_yr = cc_parent->getYPos() + y;
|
||||
}
|
||||
|
||||
void CComponentsItem::setXPosP(const uint8_t& xpos_percent)
|
||||
{
|
||||
int x_tmp = cc_parent ? xpos_percent*cc_parent->getWidth() : xpos_percent*frameBuffer->getScreenWidth();
|
||||
|
Reference in New Issue
Block a user