1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Improved speed of setting the Help button texts

This commit is contained in:
Klaus Schmidinger 2002-01-26 11:13:48 +01:00
parent e010ca2106
commit fe7b03d6b5
3 changed files with 13 additions and 12 deletions

View File

@ -879,7 +879,7 @@ Video Disk Recorder Revision History
- Fixed DVD audio sync problems (thanks to Andreas Schultz). - Fixed DVD audio sync problems (thanks to Andreas Schultz).
- Fixed external AC3 replay for DVDs (thanks to Andreas Schultz). - Fixed external AC3 replay for DVDs (thanks to Andreas Schultz).
2002-01-20: Version 0.99pre2 2002-01-26: Version 0.99pre2
- Fixed setting the OSD size in the 'Confirm' interface call (thanks to - Fixed setting the OSD size in the 'Confirm' interface call (thanks to
Deti Fliegl). Deti Fliegl).
@ -903,3 +903,4 @@ Video Disk Recorder Revision History
- Now using a call to the 'ftw()' library function instead of an external 'find' - Now using a call to the 'ftw()' library function instead of an external 'find'
command to collect the recordings (thanks to Emil Naepflein for his hint about command to collect the recordings (thanks to Emil Naepflein for his hint about
this function). this function).
- Improved speed of setting the Help button texts.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: interface.c 1.45 2001/12/01 11:59:43 kls Exp $ * $Id: interface.c 1.46 2002/01/26 11:09:58 kls Exp $
*/ */
#include "interface.h" #include "interface.h"
@ -331,15 +331,17 @@ bool cInterface::Confirm(const char *s, int Seconds, bool WaitForTimeout)
void cInterface::HelpButton(int Index, const char *Text, eDvbColor FgColor, eDvbColor BgColor) void cInterface::HelpButton(int Index, const char *Text, eDvbColor FgColor, eDvbColor BgColor)
{ {
if (open && Text) { if (open) {
const int w = Width() / 4; const int w = Width() / 4;
cDvbApi::PrimaryDvbApi->Fill(Index * w, -1, w, 1, Text ? BgColor : clrBackground);
if (Text) {
int l = (w - int(strlen(Text))) / 2; int l = (w - int(strlen(Text))) / 2;
if (l < 0) if (l < 0)
l = 0; l = 0;
cDvbApi::PrimaryDvbApi->Fill(Index * w, -1, w, 1, BgColor);
cDvbApi::PrimaryDvbApi->Text(Index * w + l, -1, Text, FgColor, BgColor); cDvbApi::PrimaryDvbApi->Text(Index * w + l, -1, Text, FgColor, BgColor);
} }
} }
}
void cInterface::Help(const char *Red, const char *Green, const char *Yellow, const char *Blue) void cInterface::Help(const char *Red, const char *Green, const char *Yellow, const char *Blue)
{ {

6
osd.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: osd.c 1.19 2002/01/20 11:13:22 kls Exp $ * $Id: osd.c 1.20 2002/01/26 11:09:58 kls Exp $
*/ */
#include "osd.h" #include "osd.h"
@ -127,9 +127,7 @@ void cOsdMenu::SetHelp(const char *Red, const char *Green, const char *Yellow, c
helpYellow = Yellow; helpYellow = Yellow;
helpBlue = Blue; helpBlue = Blue;
if (visible) if (visible)
Display(); Interface->Help(helpRed, helpGreen, helpYellow, helpBlue);
//XXX Interface->Help(helpRed, helpGreen, helpYellow, helpBlue);
//XXX must clear unused button areas!
} }
void cOsdMenu::Del(int Index) void cOsdMenu::Del(int Index)