mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 23:42:51 +02:00
reworked CA menu code
* added support for internal cardreaders for future conax support
* added inactivity shutdown timer for EuP
WARNING: new libcoolstream and libOpenThreads needed.
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@925 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Commit: b8c1fa5cc1
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2010-12-07 (Tue, 07 Dec 2010)
Origin message was:
------------------
* reworked CA menu code
* added support for internal cardreaders for future conax support
* added inactivity shutdown timer for EuP
WARNING: new libcoolstream and libOpenThreads needed.
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@925 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -45,6 +45,17 @@
|
||||
#define HINTBOX_MAX_HEIGHT 420
|
||||
|
||||
CHintBox::CHintBox(const neutrino_locale_t Caption, const char * const Text, const int Width, const char * const Icon)
|
||||
{
|
||||
const char * caption = g_Locale->getText(Caption);
|
||||
init(caption, Text, Width, Icon);
|
||||
}
|
||||
|
||||
CHintBox::CHintBox(const char * const Caption, const char * const Text, const int Width, const char * const Icon)
|
||||
{
|
||||
init(Caption, Text, Width, Icon);
|
||||
}
|
||||
|
||||
void CHintBox::init(const char * const Caption, const char * const Text, const int Width, const char * const Icon)
|
||||
{
|
||||
char * begin;
|
||||
char * pos;
|
||||
@@ -99,7 +110,8 @@ CHintBox::CHintBox(const neutrino_locale_t Caption, const char * const Text, con
|
||||
else
|
||||
iconfile = "";
|
||||
|
||||
nw = additional_width + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(g_Locale->getText(caption), true); // UTF-8
|
||||
//nw = additional_width + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(g_Locale->getText(caption), true); // UTF-8
|
||||
nw = additional_width + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(caption, true); // UTF-8
|
||||
|
||||
if (nw > width)
|
||||
width = nw;
|
||||
@@ -165,10 +177,11 @@ void CHintBox::refresh(void)
|
||||
CFrameBuffer::getInstance()->getIconSize(iconfile.c_str(), &iw, &ih);
|
||||
//window->paintIcon(iconfile.c_str(), 8, 5);
|
||||
window->paintIcon(iconfile.c_str(), 10, 0, theight);
|
||||
window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], iw+20, theight, width - 20-iw, g_Locale->getText(caption), (CFBWindow::color_t)COL_MENUHEAD, 0, true); // UTF-8
|
||||
//window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], iw+20, theight, width - 20-iw, g_Locale->getText(caption), (CFBWindow::color_t)COL_MENUHEAD, 0, true); // UTF-8
|
||||
window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], iw+20, theight, width - 20-iw, caption, (CFBWindow::color_t)COL_MENUHEAD, 0, true); // UTF-8
|
||||
}
|
||||
else
|
||||
window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], 10, theight, width - 10, g_Locale->getText(caption), (CFBWindow::color_t)COL_MENUHEAD, 0, true); // UTF-8
|
||||
window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], 10, theight, width - 10, caption, (CFBWindow::color_t)COL_MENUHEAD, 0, true); // UTF-8
|
||||
|
||||
//window->paintBoxRel(0, theight, width, (entries_per_page + 1) * fheight, (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0);
|
||||
window->paintBoxRel(0, theight, width, (entries_per_page + 1) * fheight, (CFBWindow::color_t)COL_MENUCONTENT_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM);//round
|
||||
@@ -221,6 +234,13 @@ void CHintBox::hide(void)
|
||||
}
|
||||
|
||||
int ShowHintUTF(const neutrino_locale_t Caption, const char * const Text, const int Width, int timeout, const char * const Icon)
|
||||
{
|
||||
const char * caption = g_Locale->getText(Caption);
|
||||
|
||||
return ShowHintUTF(caption, Text, Width, timeout, Icon);
|
||||
}
|
||||
|
||||
int ShowHintUTF(const char * const Caption, const char * const Text, const int Width, int timeout, const char * const Icon)
|
||||
{
|
||||
neutrino_msg_t msg;
|
||||
neutrino_msg_data_t data;
|
||||
|
Reference in New Issue
Block a user