From 8cb3f67b6e436af866a2bab47082409499fa2980 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 23 Jun 2012 21:03:23 +0200 Subject: [PATCH] CHANGED: #1471 CGroupScrollText no longer depends on the Ryzom client time data. --- .../src/interface_v3/group_scrolltext.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/group_scrolltext.cpp b/code/ryzom/client/src/interface_v3/group_scrolltext.cpp index b58569313..0c4ec9e8b 100644 --- a/code/ryzom/client/src/interface_v3/group_scrolltext.cpp +++ b/code/ryzom/client/src/interface_v3/group_scrolltext.cpp @@ -14,21 +14,14 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . - - - - - -#include "stdpch.h" #include "group_scrolltext.h" #include "nel/gui/group_list.h" #include "nel/gui/view_text.h" #include "nel/gui/ctrl_scroll.h" #include "nel/gui/ctrl_button.h" #include "nel/gui/action_handler.h" - -#include "../time_client.h" #include "nel/misc/i18n.h" +#include "nel/gui/widget_manager.h" NLMISC_REGISTER_OBJECT(CViewBase, CGroupScrollText, std::string, "scroll_text"); @@ -204,13 +197,15 @@ class CSTUp : public IActionHandler public: virtual void execute (CCtrlBase *pCaller, const std::string &/* Params */) { + const CWidgetManager::SInterfaceTimes × = CWidgetManager::getInstance()->getInterfaceTimes(); + CGroupScrollText *pST = dynamic_cast(pCaller->getParent()); if (pST == NULL) return; if (pST->getList() == NULL) return; // get the font height from the text template of the list const CViewText *vt = pST->getList()->getTextTemplatePtr(); if (!vt) return; - pST->_EllapsedTime += DT64; + pST->_EllapsedTime += times.frameDiffMs; // pST->setH(std::min((sint32) pST->getMaxHeight(), (sint32) (pST->_StartHeight + pST->_EllapsedTime / 9))); pST->setH((sint32) (pST->_StartHeight + pST->_EllapsedTime / 9)); pST->invalidateCoords(); @@ -224,13 +219,15 @@ class CSTDown : public IActionHandler public: virtual void execute (CCtrlBase *pCaller, const std::string &/* Params */) { + const CWidgetManager::SInterfaceTimes × = CWidgetManager::getInstance()->getInterfaceTimes(); + CGroupScrollText *pST = dynamic_cast(pCaller->getParent()); if (pST == NULL) return; if (pST->getList() == NULL) return; // get the font height from the text template of the list const CViewText *vt = pST->getList()->getTextTemplatePtr(); if (!vt) return; - pST->_EllapsedTime += DT64; + pST->_EllapsedTime += times.frameDiffMs; // pST->setH(std::max((sint32) pST->getMinHeight(), (sint32) (pST->_StartHeight - pST->_EllapsedTime / 9))); pST->setH((sint32) (pST->_StartHeight - pST->_EllapsedTime / 9)); pST->invalidateCoords();