mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
CComponentsPicture: add explicit methodes to set image position
This commit is contained in:
@@ -148,6 +148,24 @@ void CComponentsPicture::setHeight(const int& h, bool keep_aspect)
|
||||
initCCItem();
|
||||
}
|
||||
|
||||
void CComponentsPicture::setXPos(const int& xpos)
|
||||
{
|
||||
CComponentsItem::setXPos(xpos);
|
||||
if (xpos == x)
|
||||
return;
|
||||
need_init = true;
|
||||
initCCItem();
|
||||
}
|
||||
|
||||
void CComponentsPicture::setYPos(const int& ypos)
|
||||
{
|
||||
CComponentsItem::setYPos(ypos);
|
||||
if (ypos == y)
|
||||
return;
|
||||
need_init = true;
|
||||
initCCItem();
|
||||
}
|
||||
|
||||
void CComponentsPicture::initCCItem()
|
||||
{
|
||||
if (pic_name.empty() || !need_init){
|
||||
|
@@ -162,6 +162,11 @@ class CComponentsPicture : public CComponentsItem
|
||||
///set height of object and image related to current screen size, see also CComponentsItem::setHeightP(), parameter as uint8_t
|
||||
virtual void setHeightP(const uint8_t& h_percent){CComponentsItem::setHeightP(h_percent), do_scale = true; need_init = hasChanges(); initCCItem();}
|
||||
|
||||
///set screen x-position, parameter as int
|
||||
virtual void setXPos(const int& xpos);
|
||||
///set screen y-position, parameter as int
|
||||
virtual void setYPos(const int& ypos);
|
||||
|
||||
///return paint mode of internal image, true=image was painted, please do not to confuse with isPainted()! isPainted() is related to item itself.
|
||||
virtual inline bool isPicPainted(){return is_image_painted;};
|
||||
|
||||
|
Reference in New Issue
Block a user