move textbox autoscroll condition to infobool cache
authorJonathan Marshall <jmarshall@never.you.mind>
Sun, 3 Jul 2011 08:49:35 +0000 (20:49 +1200)
committerJonathan Marshall <jmarshall@never.you.mind>
Tue, 2 Aug 2011 04:25:14 +0000 (16:25 +1200)
xbmc/guilib/GUITextBox.cpp
xbmc/guilib/GUITextBox.h

index ec33d36..81c0367 100644 (file)
@@ -125,7 +125,7 @@ void CGUITextBox::Process(unsigned int currentTime, CDirtyRegionList &dirtyregio
   // update our auto-scrolling as necessary
   if (m_autoScrollTime && m_lines.size() > m_itemsPerPage)
   {
-    if (!m_autoScrollCondition || g_infoManager.GetBool(m_autoScrollCondition, m_parentID))
+    if (!m_autoScrollCondition || g_infoManager.GetBoolValue(m_autoScrollCondition))
     {
       if (m_lastRenderTime)
         m_autoScrollDelayTime += currentTime - m_lastRenderTime;
@@ -324,7 +324,7 @@ void CGUITextBox::SetAutoScrolling(const TiXmlNode *node)
     scroll->Attribute("delay", &m_autoScrollDelay);
     scroll->Attribute("time", &m_autoScrollTime);
     if (scroll->FirstChild())
-      m_autoScrollCondition = g_infoManager.TranslateString(scroll->FirstChild()->ValueStr());
+      m_autoScrollCondition = g_infoManager.Register(scroll->FirstChild()->ValueStr(), GetParentID());
     int repeatTime;
     if (scroll->Attribute("repeat", &repeatTime))
       m_autoScrollRepeatAnim = new CAnimation(CAnimation::CreateFader(100, 0, repeatTime, 1000));
index 33a7d54..083af68 100644 (file)
@@ -87,7 +87,7 @@ protected:
   TransformMatrix m_cachedTextMatrix;
 
   // autoscrolling
-  int          m_autoScrollCondition;
+  unsigned int m_autoScrollCondition;
   int          m_autoScrollTime;      // time to scroll 1 line (ms)
   int          m_autoScrollDelay;     // delay before scroll (ms)
   unsigned int m_autoScrollDelayTime; // current offset into the delay