diff options
-rw-r--r-- | xbmc/guilib/GUIControlFactory.cpp | 12 | ||||
-rw-r--r-- | xbmc/guilib/GUIRadioButtonControl.cpp | 31 | ||||
-rw-r--r-- | xbmc/guilib/GUIRadioButtonControl.h | 5 | ||||
-rw-r--r-- | xbmc/guilib/GUISpinControl.cpp | 29 | ||||
-rw-r--r-- | xbmc/guilib/GUISpinControl.h | 4 | ||||
-rw-r--r-- | xbmc/guilib/GUISpinControlEx.cpp | 4 | ||||
-rw-r--r-- | xbmc/guilib/GUISpinControlEx.h | 2 | ||||
-rw-r--r-- | xbmc/interfaces/legacy/Control.cpp | 21 | ||||
-rw-r--r-- | xbmc/interfaces/legacy/Control.h | 12 |
9 files changed, 99 insertions, 21 deletions
diff --git a/xbmc/guilib/GUIControlFactory.cpp b/xbmc/guilib/GUIControlFactory.cpp index 684ebc8f05..8f56b1caba 100644 --- a/xbmc/guilib/GUIControlFactory.cpp +++ b/xbmc/guilib/GUIControlFactory.cpp @@ -705,6 +705,7 @@ CGUIControl* CGUIControlFactory::Create(int parentID, const CRect &rect, TiXmlEl CTextureInfo textureLeftFocus, textureRightFocus; CTextureInfo textureUp, textureDown; CTextureInfo textureUpFocus, textureDownFocus; + CTextureInfo textureUpDisabled, textureDownDisabled; CTextureInfo texture, borderTexture; CGUIInfoLabel textureFile; CTextureInfo textureCheckMark, textureCheckMarkNF; @@ -712,6 +713,7 @@ CGUIControl* CGUIControlFactory::Create(int parentID, const CRect &rect, TiXmlEl CTextureInfo textureAltFocus, textureAltNoFocus; CTextureInfo textureRadioOnFocus, textureRadioOnNoFocus; CTextureInfo textureRadioOffFocus, textureRadioOffNoFocus; + CTextureInfo textureRadioOnDisabled, textureRadioOffDisabled; CTextureInfo imageNoFocus, imageFocus; CTextureInfo textureProgressIndicator; CGUIInfoLabel texturePath; @@ -888,6 +890,8 @@ CGUIControl* CGUIControlFactory::Create(int parentID, const CRect &rect, TiXmlEl GetTexture(pControlNode, "texturedown", textureDown); GetTexture(pControlNode, "textureupfocus", textureUpFocus); GetTexture(pControlNode, "texturedownfocus", textureDownFocus); + GetTexture(pControlNode, "textureupdisabled", textureUpDisabled); + GetTexture(pControlNode, "texturedowndisabled", textureDownDisabled); GetTexture(pControlNode, "textureleft", textureLeft); GetTexture(pControlNode, "textureright", textureRight); @@ -922,7 +926,8 @@ CGUIControl* CGUIControlFactory::Create(int parentID, const CRect &rect, TiXmlEl GetTexture(pControlNode, "textureradiooff", textureRadioOffFocus); textureRadioOffNoFocus = textureRadioOffFocus; } - + GetTexture(pControlNode, "textureradioondisabled", textureRadioOnDisabled); + GetTexture(pControlNode, "textureradiooffdisabled", textureRadioOffDisabled); GetTexture(pControlNode, "texturesliderbackground", textureBackground); GetTexture(pControlNode, "texturesliderbar", textureBar); GetTexture(pControlNode, "texturesliderbarfocus", textureBarFocus); @@ -1238,7 +1243,7 @@ CGUIControl* CGUIControlFactory::Create(int parentID, const CRect &rect, TiXmlEl parentID, id, posX, posY, width, height, textureFocus, textureNoFocus, labelInfo, - textureRadioOnFocus, textureRadioOnNoFocus, textureRadioOffFocus, textureRadioOffNoFocus); + textureRadioOnFocus, textureRadioOnNoFocus, textureRadioOffFocus, textureRadioOffNoFocus, textureRadioOnDisabled, textureRadioOffDisabled); ((CGUIRadioButtonControl *)control)->SetLabel(strLabel); ((CGUIRadioButtonControl *)control)->SetRadioDimensions(radioPosX, radioPosY, radioWidth, radioHeight); @@ -1263,6 +1268,7 @@ CGUIControl* CGUIControlFactory::Create(int parentID, const CRect &rect, TiXmlEl control = new CGUISpinControl( parentID, id, posX, posY, width, height, textureUp, textureDown, textureUpFocus, textureDownFocus, + textureUpDisabled, textureDownDisabled, labelInfo, iType); ((CGUISpinControl *)control)->SetReverse(bReverse); @@ -1454,7 +1460,7 @@ CGUIControl* CGUIControlFactory::Create(int parentID, const CRect &rect, TiXmlEl control = new CGUISpinControlEx( parentID, id, posX, posY, width, height, spinWidth, spinHeight, labelInfo, textureFocus, textureNoFocus, textureUp, textureDown, textureUpFocus, textureDownFocus, - labelInfo, iType); + textureUpDisabled, textureDownDisabled, labelInfo, iType); ((CGUISpinControlEx *)control)->SetSpinPosition(spinPosX); ((CGUISpinControlEx *)control)->SetText(strLabel); diff --git a/xbmc/guilib/GUIRadioButtonControl.cpp b/xbmc/guilib/GUIRadioButtonControl.cpp index 9095698021..3fd982c889 100644 --- a/xbmc/guilib/GUIRadioButtonControl.cpp +++ b/xbmc/guilib/GUIRadioButtonControl.cpp @@ -26,12 +26,15 @@ CGUIRadioButtonControl::CGUIRadioButtonControl(int parentID, int controlID, floa const CTextureInfo& textureFocus, const CTextureInfo& textureNoFocus, const CLabelInfo& labelInfo, const CTextureInfo& radioOnFocus, const CTextureInfo& radioOnNoFocus, - const CTextureInfo& radioOffFocus, const CTextureInfo& radioOffNoFocus) + const CTextureInfo& radioOffFocus, const CTextureInfo& radioOffNoFocus, + const CTextureInfo& radioOnDisabled, const CTextureInfo& radioOffDisabled) : CGUIButtonControl(parentID, controlID, posX, posY, width, height, textureFocus, textureNoFocus, labelInfo) , m_imgRadioOnFocus(posX, posY, 16, 16, radioOnFocus) , m_imgRadioOnNoFocus(posX, posY, 16, 16, radioOnNoFocus) , m_imgRadioOffFocus(posX, posY, 16, 16, radioOffFocus) , m_imgRadioOffNoFocus(posX, posY, 16, 16, radioOffNoFocus) + , m_imgRadioOnDisabled(posX, posY, 16, 16, radioOnDisabled) + , m_imgRadioOffDisabled(posX, posY, 16, 16, radioOffDisabled) { m_radioPosX = 0; m_radioPosY = 0; @@ -39,6 +42,8 @@ CGUIRadioButtonControl::CGUIRadioButtonControl(int parentID, int controlID, floa m_imgRadioOnNoFocus.SetAspectRatio(CAspectRatio::AR_KEEP); m_imgRadioOffFocus.SetAspectRatio(CAspectRatio::AR_KEEP); m_imgRadioOffNoFocus.SetAspectRatio(CAspectRatio::AR_KEEP); + m_imgRadioOnDisabled.SetAspectRatio(CAspectRatio::AR_KEEP); + m_imgRadioOffDisabled.SetAspectRatio(CAspectRatio::AR_KEEP); ControlType = GUICONTROL_RADIO; } @@ -56,13 +61,17 @@ void CGUIRadioButtonControl::Render() else m_imgRadioOnNoFocus.Render(); } - else + else if ( !IsSelected() && !IsDisabled() ) { if (HasFocus()) m_imgRadioOffFocus.Render(); else m_imgRadioOffNoFocus.Render(); } + else if ( IsSelected() && IsDisabled() ) + m_imgRadioOnDisabled.Render(); + else + m_imgRadioOffDisabled.Render(); } void CGUIRadioButtonControl::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions) @@ -83,6 +92,8 @@ void CGUIRadioButtonControl::Process(unsigned int currentTime, CDirtyRegionList m_imgRadioOnNoFocus.Process(currentTime); m_imgRadioOffFocus.Process(currentTime); m_imgRadioOffNoFocus.Process(currentTime); + m_imgRadioOnDisabled.Process(currentTime); + m_imgRadioOffDisabled.Process(currentTime); CGUIButtonControl::Process(currentTime, dirtyregions); } @@ -127,6 +138,8 @@ void CGUIRadioButtonControl::AllocResources() m_imgRadioOnNoFocus.AllocResources(); m_imgRadioOffFocus.AllocResources(); m_imgRadioOffNoFocus.AllocResources(); + m_imgRadioOnDisabled.AllocResources(); + m_imgRadioOffDisabled.AllocResources(); SetPosition(m_posX, m_posY); } @@ -137,6 +150,8 @@ void CGUIRadioButtonControl::FreeResources(bool immediately) m_imgRadioOnNoFocus.FreeResources(immediately); m_imgRadioOffFocus.FreeResources(immediately); m_imgRadioOffNoFocus.FreeResources(immediately); + m_imgRadioOnDisabled.FreeResources(immediately); + m_imgRadioOffDisabled.FreeResources(immediately); } void CGUIRadioButtonControl::DynamicResourceAlloc(bool bOnOff) @@ -146,6 +161,8 @@ void CGUIRadioButtonControl::DynamicResourceAlloc(bool bOnOff) m_imgRadioOnNoFocus.DynamicResourceAlloc(bOnOff); m_imgRadioOffFocus.DynamicResourceAlloc(bOnOff); m_imgRadioOffNoFocus.DynamicResourceAlloc(bOnOff); + m_imgRadioOnDisabled.DynamicResourceAlloc(bOnOff); + m_imgRadioOffDisabled.DynamicResourceAlloc(bOnOff); } void CGUIRadioButtonControl::SetInvalid() @@ -155,6 +172,8 @@ void CGUIRadioButtonControl::SetInvalid() m_imgRadioOnNoFocus.SetInvalid(); m_imgRadioOffFocus.SetInvalid(); m_imgRadioOffNoFocus.SetInvalid(); + m_imgRadioOnDisabled.SetInvalid(); + m_imgRadioOffDisabled.SetInvalid(); } void CGUIRadioButtonControl::SetPosition(float posX, float posY) @@ -166,6 +185,8 @@ void CGUIRadioButtonControl::SetPosition(float posX, float posY) m_imgRadioOnNoFocus.SetPosition(radioPosX, radioPosY); m_imgRadioOffFocus.SetPosition(radioPosX, radioPosY); m_imgRadioOffNoFocus.SetPosition(radioPosX, radioPosY); + m_imgRadioOnDisabled.SetPosition(radioPosX, radioPosY); + m_imgRadioOffDisabled.SetPosition(radioPosX, radioPosY); } void CGUIRadioButtonControl::SetRadioDimensions(float posX, float posY, float width, float height) @@ -178,6 +199,8 @@ void CGUIRadioButtonControl::SetRadioDimensions(float posX, float posY, float wi m_imgRadioOnNoFocus.SetWidth(width); m_imgRadioOffFocus.SetWidth(width); m_imgRadioOffNoFocus.SetWidth(width); + m_imgRadioOnDisabled.SetWidth(width); + m_imgRadioOffDisabled.SetWidth(width); } if (height) { @@ -185,6 +208,8 @@ void CGUIRadioButtonControl::SetRadioDimensions(float posX, float posY, float wi m_imgRadioOnNoFocus.SetHeight(height); m_imgRadioOffFocus.SetHeight(height); m_imgRadioOffNoFocus.SetHeight(height); + m_imgRadioOnDisabled.SetHeight(height); + m_imgRadioOffDisabled.SetHeight(height); } SetPosition(GetXPosition(), GetYPosition()); } @@ -218,6 +243,8 @@ bool CGUIRadioButtonControl::UpdateColors() changed |= m_imgRadioOnNoFocus.SetDiffuseColor(m_diffuseColor); changed |= m_imgRadioOffFocus.SetDiffuseColor(m_diffuseColor); changed |= m_imgRadioOffNoFocus.SetDiffuseColor(m_diffuseColor); + changed |= m_imgRadioOnDisabled.SetDiffuseColor(m_diffuseColor); + changed |= m_imgRadioOffDisabled.SetDiffuseColor(m_diffuseColor); return changed; } diff --git a/xbmc/guilib/GUIRadioButtonControl.h b/xbmc/guilib/GUIRadioButtonControl.h index 7ab9234f07..ee0dd79bf3 100644 --- a/xbmc/guilib/GUIRadioButtonControl.h +++ b/xbmc/guilib/GUIRadioButtonControl.h @@ -40,7 +40,8 @@ public: const CTextureInfo& textureFocus, const CTextureInfo& textureNoFocus, const CLabelInfo& labelInfo, const CTextureInfo& radioOnFocus, const CTextureInfo& radioOnNoFocus, - const CTextureInfo& radioOffFocus, const CTextureInfo& radioOffNoFocus); + const CTextureInfo& radioOffFocus, const CTextureInfo& radioOffNoFocus, + const CTextureInfo& radioOnDisabled, const CTextureInfo& radioOffDisabled); virtual ~CGUIRadioButtonControl(void); virtual CGUIRadioButtonControl *Clone() const { return new CGUIRadioButtonControl(*this); }; @@ -67,6 +68,8 @@ protected: CGUITexture m_imgRadioOnNoFocus; CGUITexture m_imgRadioOffFocus; CGUITexture m_imgRadioOffNoFocus; + CGUITexture m_imgRadioOnDisabled; + CGUITexture m_imgRadioOffDisabled; float m_radioPosX; float m_radioPosY; INFO::InfoPtr m_toggleSelect; diff --git a/xbmc/guilib/GUISpinControl.cpp b/xbmc/guilib/GUISpinControl.cpp index 57a9f6f135..333b426113 100644 --- a/xbmc/guilib/GUISpinControl.cpp +++ b/xbmc/guilib/GUISpinControl.cpp @@ -28,12 +28,14 @@ using namespace std; #define SPIN_BUTTON_DOWN 1 #define SPIN_BUTTON_UP 2 -CGUISpinControl::CGUISpinControl(int parentID, int controlID, float posX, float posY, float width, float height, const CTextureInfo& textureUp, const CTextureInfo& textureDown, const CTextureInfo& textureUpFocus, const CTextureInfo& textureDownFocus, const CLabelInfo &labelInfo, int iType) +CGUISpinControl::CGUISpinControl(int parentID, int controlID, float posX, float posY, float width, float height, const CTextureInfo& textureUp, const CTextureInfo& textureDown, const CTextureInfo& textureUpFocus, const CTextureInfo& textureDownFocus, const CTextureInfo& textureUpDisabled, const CTextureInfo& textureDownDisabled, const CLabelInfo &labelInfo, int iType) : CGUIControl(parentID, controlID, posX, posY, width, height) , m_imgspinUp(posX, posY, width, height, textureUp) , m_imgspinDown(posX, posY, width, height, textureDown) , m_imgspinUpFocus(posX, posY, width, height, textureUpFocus) , m_imgspinDownFocus(posX, posY, width, height, textureDownFocus) + , m_imgspinUpDisabled(posX, posY, width, height, textureUpDisabled) + , m_imgspinDownDisabled(posX, posY, width, height, textureDownDisabled) , m_label(posX, posY, width, height, labelInfo) { m_bReverse = false; @@ -324,11 +326,15 @@ void CGUISpinControl::AllocResources() m_imgspinUpFocus.AllocResources(); m_imgspinDown.AllocResources(); m_imgspinDownFocus.AllocResources(); + m_imgspinUpDisabled.AllocResources(); + m_imgspinDownDisabled.AllocResources(); m_imgspinDownFocus.SetPosition(m_posX, m_posY); m_imgspinDown.SetPosition(m_posX, m_posY); + m_imgspinDownDisabled.SetPosition(m_posX, m_posY); m_imgspinUp.SetPosition(m_posX + m_imgspinDown.GetWidth(), m_posY); m_imgspinUpFocus.SetPosition(m_posX + m_imgspinDownFocus.GetWidth(), m_posY); + m_imgspinUpDisabled.SetPosition(m_posX + m_imgspinDownDisabled.GetWidth(), m_posY); } void CGUISpinControl::FreeResources(bool immediately) @@ -338,6 +344,8 @@ void CGUISpinControl::FreeResources(bool immediately) m_imgspinUpFocus.FreeResources(immediately); m_imgspinDown.FreeResources(immediately); m_imgspinDownFocus.FreeResources(immediately); + m_imgspinUpDisabled.FreeResources(immediately); + m_imgspinDownDisabled.FreeResources(immediately); m_iTypedPos = 0; strcpy(m_szTyped, ""); } @@ -349,6 +357,8 @@ void CGUISpinControl::DynamicResourceAlloc(bool bOnOff) m_imgspinUpFocus.DynamicResourceAlloc(bOnOff); m_imgspinDown.DynamicResourceAlloc(bOnOff); m_imgspinDownFocus.DynamicResourceAlloc(bOnOff); + m_imgspinUpDisabled.DynamicResourceAlloc(bOnOff); + m_imgspinDownDisabled.DynamicResourceAlloc(bOnOff); } void CGUISpinControl::SetInvalid() @@ -359,6 +369,8 @@ void CGUISpinControl::SetInvalid() m_imgspinUpFocus.SetInvalid(); m_imgspinDown.SetInvalid(); m_imgspinDownFocus.SetInvalid(); + m_imgspinUpDisabled.SetInvalid(); + m_imgspinDownDisabled.SetInvalid(); } void CGUISpinControl::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions) @@ -431,14 +443,18 @@ void CGUISpinControl::Process(unsigned int currentTime, CDirtyRegionList &dirtyr const float space = 5; changed |= m_imgspinDownFocus.SetPosition(m_posX + textWidth + space, m_posY); changed |= m_imgspinDown.SetPosition(m_posX + textWidth + space, m_posY); + changed |= m_imgspinDownDisabled.SetPosition(m_posX + textWidth + space, m_posY); changed |= m_imgspinUpFocus.SetPosition(m_posX + textWidth + space + m_imgspinDown.GetWidth(), m_posY); changed |= m_imgspinUp.SetPosition(m_posX + textWidth + space + m_imgspinDown.GetWidth(), m_posY); + changed |= m_imgspinUpDisabled.SetPosition(m_posX + textWidth + space + m_imgspinDownDisabled.GetWidth(), m_posY); } changed |= m_imgspinDownFocus.Process(currentTime); changed |= m_imgspinDown.Process(currentTime); changed |= m_imgspinUp.Process(currentTime); changed |= m_imgspinUpFocus.Process(currentTime); + changed |= m_imgspinUpDisabled.Process(currentTime); + changed |= m_imgspinDownDisabled.Process(currentTime); changed |= m_label.Process(currentTime); if (changed) @@ -461,11 +477,16 @@ void CGUISpinControl::Render() else m_imgspinDown.Render(); } - else + else if ( !HasFocus() && !IsDisabled() ) { m_imgspinUp.Render(); m_imgspinDown.Render(); } + else + { + m_imgspinUpDisabled.Render(); + m_imgspinDownDisabled.Render(); + } if (m_label.GetLabelInfo().font) { @@ -613,9 +634,11 @@ void CGUISpinControl::SetPosition(float posX, float posY) m_imgspinDownFocus.SetPosition(posX, posY); m_imgspinDown.SetPosition(posX, posY); + m_imgspinDownDisabled.SetPosition(posX, posY); m_imgspinUp.SetPosition(m_posX + m_imgspinDown.GetWidth(), m_posY); m_imgspinUpFocus.SetPosition(m_posX + m_imgspinDownFocus.GetWidth(), m_posY); + m_imgspinUpDisabled.SetPosition(m_posX + m_imgspinDownDisabled.GetWidth(), m_posY); } @@ -988,6 +1011,8 @@ bool CGUISpinControl::UpdateColors() changed |= m_imgspinDown.SetDiffuseColor(m_diffuseColor); changed |= m_imgspinUp.SetDiffuseColor(m_diffuseColor); changed |= m_imgspinUpFocus.SetDiffuseColor(m_diffuseColor); + changed |= m_imgspinUpDisabled.SetDiffuseColor(m_diffuseColor); + changed |= m_imgspinDownDisabled.SetDiffuseColor(m_diffuseColor); return changed; } diff --git a/xbmc/guilib/GUISpinControl.h b/xbmc/guilib/GUISpinControl.h index 5efd7c2aad..fee7875eec 100644 --- a/xbmc/guilib/GUISpinControl.h +++ b/xbmc/guilib/GUISpinControl.h @@ -44,7 +44,7 @@ class CGUISpinControl : public CGUIControl { public: - CGUISpinControl(int parentID, int controlID, float posX, float posY, float width, float height, const CTextureInfo& textureUp, const CTextureInfo& textureDown, const CTextureInfo& textureUpFocus, const CTextureInfo& textureDownFocus, const CLabelInfo& labelInfo, int iType); + CGUISpinControl(int parentID, int controlID, float posX, float posY, float width, float height, const CTextureInfo& textureUp, const CTextureInfo& textureDown, const CTextureInfo& textureUpFocus, const CTextureInfo& textureDownFocus, const CTextureInfo& textureUpDisabled, const CTextureInfo& textureDownDisabled, const CLabelInfo& labelInfo, int iType); virtual ~CGUISpinControl(void); virtual CGUISpinControl *Clone() const { return new CGUISpinControl(*this); }; @@ -125,6 +125,8 @@ protected: CGUITexture m_imgspinDown; CGUITexture m_imgspinUpFocus; CGUITexture m_imgspinDownFocus; + CGUITexture m_imgspinUpDisabled; + CGUITexture m_imgspinDownDisabled; CGUILabel m_label; bool m_bShowRange; char m_szTyped[10]; diff --git a/xbmc/guilib/GUISpinControlEx.cpp b/xbmc/guilib/GUISpinControlEx.cpp index cc43bd106a..4f333d927b 100644 --- a/xbmc/guilib/GUISpinControlEx.cpp +++ b/xbmc/guilib/GUISpinControlEx.cpp @@ -21,8 +21,8 @@ #include "GUISpinControlEx.h" #include "utils/StringUtils.h" -CGUISpinControlEx::CGUISpinControlEx(int parentID, int controlID, float posX, float posY, float width, float height, float spinWidth, float spinHeight, const CLabelInfo& spinInfo, const CTextureInfo &textureFocus, const CTextureInfo &textureNoFocus, const CTextureInfo& textureUp, const CTextureInfo& textureDown, const CTextureInfo& textureUpFocus, const CTextureInfo& textureDownFocus, const CLabelInfo& labelInfo, int iType) - : CGUISpinControl(parentID, controlID, posX, posY, spinWidth, spinHeight, textureUp, textureDown, textureUpFocus, textureDownFocus, spinInfo, iType) +CGUISpinControlEx::CGUISpinControlEx(int parentID, int controlID, float posX, float posY, float width, float height, float spinWidth, float spinHeight, const CLabelInfo& spinInfo, const CTextureInfo &textureFocus, const CTextureInfo &textureNoFocus, const CTextureInfo& textureUp, const CTextureInfo& textureDown, const CTextureInfo& textureUpFocus, const CTextureInfo& textureDownFocus, const CTextureInfo& textureUpDisabled, const CTextureInfo& textureDownDisabled, const CLabelInfo& labelInfo, int iType) + : CGUISpinControl(parentID, controlID, posX, posY, spinWidth, spinHeight, textureUp, textureDown, textureUpFocus, textureDownFocus, textureUpDisabled, textureDownDisabled, spinInfo, iType) , m_buttonControl(parentID, controlID, posX, posY, width, height, textureFocus, textureNoFocus, labelInfo) { ControlType = GUICONTROL_SPINEX; diff --git a/xbmc/guilib/GUISpinControlEx.h b/xbmc/guilib/GUISpinControlEx.h index d6b4af1709..8c34bc276b 100644 --- a/xbmc/guilib/GUISpinControlEx.h +++ b/xbmc/guilib/GUISpinControlEx.h @@ -38,7 +38,7 @@ class CGUISpinControlEx : public CGUISpinControl { public: - CGUISpinControlEx(int parentID, int controlID, float posX, float posY, float width, float height, float spinWidth, float spinHeight, const CLabelInfo& spinInfo, const CTextureInfo &textureFocus, const CTextureInfo &textureNoFocus, const CTextureInfo& textureUp, const CTextureInfo& textureDown, const CTextureInfo& textureUpFocus, const CTextureInfo& textureDownFocus, const CLabelInfo& labelInfo, int iType); + CGUISpinControlEx(int parentID, int controlID, float posX, float posY, float width, float height, float spinWidth, float spinHeight, const CLabelInfo& spinInfo, const CTextureInfo &textureFocus, const CTextureInfo &textureNoFocus, const CTextureInfo& textureUp, const CTextureInfo& textureDown, const CTextureInfo& textureUpFocus, const CTextureInfo& textureDownFocus, const CTextureInfo& textureUpDisabled, const CTextureInfo& textureDownDisabled, const CLabelInfo& labelInfo, int iType); virtual ~CGUISpinControlEx(void); virtual CGUISpinControlEx *Clone() const { return new CGUISpinControlEx(*this); }; diff --git a/xbmc/interfaces/legacy/Control.cpp b/xbmc/interfaces/legacy/Control.cpp index 754d88a084..a41984bd5f 100644 --- a/xbmc/interfaces/legacy/Control.cpp +++ b/xbmc/interfaces/legacy/Control.cpp @@ -603,8 +603,9 @@ namespace XBMCAddon long _textOffsetX, long _textOffsetY, long alignment, const char* font, const char* _textColor, const char* _disabledColor, long angle, - const char* _shadowColor, const char* _focusedColor) : - strFont("font13"), textColor(0xffffffff), disabledColor(0x60ffffff), + const char* _shadowColor, const char* _focusedColor, + const char* disabledOnTexture, const char* disabledOffTexture) : + strFont("font13"), textColor(0xffffffff), disabledColor(0x60ffffff), textOffsetX(_textOffsetX), textOffsetY(_textOffsetY), align(alignment), iAngle(angle), shadowColor(0), focusedColor(0xffffffff) { @@ -732,7 +733,9 @@ namespace XBMCAddon CTextureInfo(strTextureRadioOnFocus), CTextureInfo(strTextureRadioOnNoFocus), CTextureInfo(strTextureRadioOffFocus), - CTextureInfo(strTextureRadioOffNoFocus)); + CTextureInfo(strTextureRadioOffNoFocus), + CTextureInfo(strTextureRadioOnDisabled), + CTextureInfo(strTextureRadioOffDisabled)); CGUIRadioButtonControl* pGuiButtonControl = (CGUIRadioButtonControl*)pGUIControl; @@ -948,16 +951,22 @@ namespace XBMCAddon strTextureDown = XBMCAddonUtils::getDefaultImage((char*)"listcontrol", (char*)"texturedown", (char*)"scroll-down.png"); strTextureUpFocus = XBMCAddonUtils::getDefaultImage((char*)"listcontrol", (char*)"textureupfocus", (char*)"scroll-up-focus.png"); strTextureDownFocus = XBMCAddonUtils::getDefaultImage((char*)"listcontrol", (char*)"texturedownfocus", (char*)"scroll-down-focus.png"); + strTextureUpDisabled = XBMCAddonUtils::getDefaultImage((char*)"listcontrol", (char*)"textureupdisabled", (char*)"scroll-up.png"); + strTextureDownDisabled = XBMCAddonUtils::getDefaultImage((char*)"listcontrol", (char*)"texturedowndisabled", (char*)"scroll-down.png"); } - void ControlSpin::setTextures(const char* up, const char* down, - const char* upFocus, - const char* downFocus) + void ControlSpin::setTextures(const char* up, const char* down, + const char* upFocus, + const char* downFocus, + const char* upDisabled, + const char* downDisabled) { strTextureUp = up; strTextureDown = down; strTextureUpFocus = upFocus; strTextureDownFocus = downFocus; + strTextureUpDisabled = upDisabled; + strTextureDownDisabled = downDisabled; /* PyXBMCGUILock(); if (self->pGUIControl) diff --git a/xbmc/interfaces/legacy/Control.h b/xbmc/interfaces/legacy/Control.h index b4f6da9aef..a21b614a11 100644 --- a/xbmc/interfaces/legacy/Control.h +++ b/xbmc/interfaces/legacy/Control.h @@ -328,13 +328,16 @@ namespace XBMCAddon */ virtual void setTextures(const char* up, const char* down, const char* upFocus, - const char* downFocus); + const char* downFocus, + const char* upDisabled, const char* downDisabled); #ifndef SWIG color_t color; std::string strTextureUp; std::string strTextureDown; std::string strTextureUpFocus; std::string strTextureDownFocus; + std::string strTextureUpDisabled; + std::string strTextureDownDisabled; #endif private: @@ -1360,13 +1363,14 @@ namespace XBMCAddon ControlRadioButton(long x, long y, long width, long height, const String& label, const char* focusOnTexture = NULL, const char* noFocusOnTexture = NULL, const char* focusOffTexture = NULL, const char* noFocusOffTexture = NULL, - const char* focusTexture = NULL, const char* noFocusTexture = NULL, + const char* focusTexture = NULL, const char* noFocusTexture = NULL, long textOffsetX = CONTROL_TEXT_OFFSET_X, long textOffsetY = CONTROL_TEXT_OFFSET_Y, long _alignment = (XBFONT_LEFT | XBFONT_CENTER_Y), const char* font = NULL, const char* textColor = NULL, const char* disabledColor = NULL, long angle = 0, - const char* shadowColor = NULL, const char* focusedColor = NULL); + const char* shadowColor = NULL, const char* focusedColor = NULL, + const char* disabledOnTexture = NULL, const char* disabledOffTexture = NULL); // setSelected() Method /** @@ -1444,6 +1448,8 @@ namespace XBMCAddon std::string strTextureRadioOnNoFocus; std::string strTextureRadioOffFocus; std::string strTextureRadioOffNoFocus; + std::string strTextureRadioOnDisabled; + std::string strTextureRadioOffDisabled; color_t textColor; color_t disabledColor; int textOffsetX; |