mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
channelist: small reworks in numericZap() function; use OFFSET defines
Origin commit data
------------------
Branch: ni/coolstream
Commit: 7ab983b72f
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-01-26 (Fri, 26 Jan 2018)
Origin message was:
------------------
- channelist: small reworks in numericZap() function; use OFFSET defines
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1304,11 +1304,12 @@ int CChannelList::numericZap(int key)
|
|||||||
}
|
}
|
||||||
size_t maxchansize = MaxChanNr().size();
|
size_t maxchansize = MaxChanNr().size();
|
||||||
int fw = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getMaxDigitWidth();
|
int fw = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getMaxDigitWidth();
|
||||||
int sx = maxchansize * fw + (fw/2);
|
int fh = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getHeight();
|
||||||
int sy = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->getHeight() + 6;
|
int sx = maxchansize*fw + 2*OFFSET_INNER_MID;
|
||||||
|
int sy = fh + 2*OFFSET_INNER_SMALL;
|
||||||
|
|
||||||
int ox = frameBuffer->getScreenX() + (frameBuffer->getScreenWidth() - sx)/2;
|
int ox = getScreenStartX(sx);
|
||||||
int oy = frameBuffer->getScreenY() + (frameBuffer->getScreenHeight() - sy)/2;
|
int oy = getScreenStartY(sy);
|
||||||
char valstr[10];
|
char valstr[10];
|
||||||
int chn = CRCInput::getNumericValue(key);
|
int chn = CRCInput::getNumericValue(key);
|
||||||
int pos = 1;
|
int pos = 1;
|
||||||
@@ -1322,14 +1323,13 @@ int CChannelList::numericZap(int key)
|
|||||||
while(1) {
|
while(1) {
|
||||||
if (lastchan != chn) {
|
if (lastchan != chn) {
|
||||||
snprintf(valstr, sizeof(valstr), "%d", chn);
|
snprintf(valstr, sizeof(valstr), "%d", chn);
|
||||||
|
|
||||||
while(strlen(valstr) < maxchansize)
|
while(strlen(valstr) < maxchansize)
|
||||||
strcat(valstr,"-"); //"_"
|
strcat(valstr,"-"); //"_"
|
||||||
frameBuffer->paintBoxRel(ox, oy, sx, sy, COL_INFOBAR_PLUS_0);
|
|
||||||
|
|
||||||
|
PaintBoxRel(ox, oy, sx, sy, COL_INFOBAR_PLUS_0, RADIUS_LARGE, CORNER_ALL, CC_SHADOW_ON);
|
||||||
for (int i = maxchansize-1; i >= 0; i--) {
|
for (int i = maxchansize-1; i >= 0; i--) {
|
||||||
valstr[i+ 1] = 0;
|
valstr[i+ 1] = 0;
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->RenderString(ox+fw/3+ i*fw, oy+sy-3, sx, &valstr[i], COL_INFOBAR_TEXT);
|
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP]->RenderString(ox + OFFSET_INNER_MID + i*fw, oy + OFFSET_INNER_SMALL + fh, fw, &valstr[i], COL_INFOBAR_TEXT);
|
||||||
}
|
}
|
||||||
|
|
||||||
showInfo(chn);
|
showInfo(chn);
|
||||||
@@ -1383,7 +1383,7 @@ int CChannelList::numericZap(int key)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
frameBuffer->paintBackgroundBoxRel(ox, oy, sx, sy);
|
ClearBoxRel(ox, oy, sx, sy, CC_SHADOW_ON);
|
||||||
|
|
||||||
CZapitChannel* chan = getChannel(chn);
|
CZapitChannel* chan = getChannel(chn);
|
||||||
if (doZap) {
|
if (doZap) {
|
||||||
|
Reference in New Issue
Block a user