From 322de62366c1a89d406c520e54f036dbaa0c01fb Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 21 Mar 2013 08:12:12 +0100 Subject: [PATCH] CImageInfo: move ScrollLic() to end of file and add comments --- src/gui/imageinfo.cpp | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/gui/imageinfo.cpp b/src/gui/imageinfo.cpp index 0e902092f..5d450cb6f 100644 --- a/src/gui/imageinfo.cpp +++ b/src/gui/imageinfo.cpp @@ -74,21 +74,6 @@ CImageInfo::~CImageInfo() delete cc_win; } -void CImageInfo::ScrollLic(bool scrollDown) -{ - if (cc_lic && (cc_lic->cctext)) { - CTextBox* ctb = cc_lic->cctext->getCCItemTextBoxInst(); - if (ctb) { - ctb->enableBackgroundPaint(true); - if (scrollDown) - ctb->scrollPageDown(1); - else - ctb->scrollPageUp(1); - ctb->enableBackgroundPaint(false); - } - } -} - int CImageInfo::exec(CMenuTarget* parent, const std::string &) { int res = menu_return::RETURN_REPAINT; @@ -300,6 +285,23 @@ void CImageInfo::InitLicenseText() cc_win->addCCItem(cc_lic); } +//scroll licens text +void CImageInfo::ScrollLic(bool scrollDown) +{ + if (cc_lic && (cc_lic->cctext)) { + //get the textbox instance from infobox object and use CTexBbox scroll methods + CTextBox* ctb = cc_lic->cctext->getCCItemTextBoxInst(); + if (ctb) { + ctb->enableBackgroundPaint(true); + if (scrollDown) + ctb->scrollPageDown(1); + else + ctb->scrollPageUp(1); + ctb->enableBackgroundPaint(false); + } + } +} + void CImageInfo::hide()