mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
CHintBox: add possibility to left hintbox with RC_up and RC_down
RC_up and RC_down are used for text scroll, but most message texts
are small and no scroll mode is required. In case of large texts
it should falling back to scroll mode.
Origin commit data
------------------
Commit: 1d8de839d5
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-01-10 (Tue, 10 Jan 2017)
This commit is contained in:
@@ -134,6 +134,8 @@ void CHintBox::init(const std::string& Text, const int& Width, const std::string
|
||||
|
||||
hb_font = MSG_FONT;
|
||||
|
||||
enable_txt_scroll = false;
|
||||
|
||||
//enable shadow
|
||||
shadow = CC_SHADOW_ON;
|
||||
|
||||
@@ -219,10 +221,14 @@ int CHintBox::exec()
|
||||
}
|
||||
else if ((msg == CRCInput::RC_up) || (msg == CRCInput::RC_down))
|
||||
{
|
||||
if (msg == CRCInput::RC_up)
|
||||
this->scroll_up();
|
||||
if (enable_txt_scroll){
|
||||
if (msg == CRCInput::RC_up)
|
||||
this->scroll_up();
|
||||
else
|
||||
this->scroll_down();
|
||||
}
|
||||
else
|
||||
this->scroll_down();
|
||||
res = messages_return::cancel_all;
|
||||
}
|
||||
else if (CNeutrinoApp::getInstance()->listModeKey(msg)){
|
||||
// do nothing //TODO: if passed rc messages are ignored rc messaages: has no effect here too!!
|
||||
@@ -274,6 +280,7 @@ void CHintBox::addHintItem(const std::string& Text, const int& text_mode, const
|
||||
if (h_lines > h_hint_obj){
|
||||
txt_mode = text_mode | CTextBox::SCROLL;
|
||||
ccw_buttons = ccw_buttons | CComponentsHeader::CC_BTN_UP | CComponentsHeader::CC_BTN_DOWN;
|
||||
enable_txt_scroll = true;
|
||||
}
|
||||
|
||||
/* define y start position of infobox inside body */
|
||||
|
Reference in New Issue
Block a user