summaryrefslogtreecommitdiff
path: root/interface.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-01-26 11:13:48 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-01-26 11:13:48 +0100
commitfe7b03d6b5ecc1e3fbb2804fe179669f8f111c7a (patch)
treefeb3a9fc4aa367f73db233350e028a8b733aa420 /interface.c
parente010ca21064945a1f8e033178cdd85a5f9d8f6cd (diff)
downloadvdr-fe7b03d6b5ecc1e3fbb2804fe179669f8f111c7a.tar.gz
vdr-fe7b03d6b5ecc1e3fbb2804fe179669f8f111c7a.tar.bz2
Improved speed of setting the Help button texts
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/interface.c b/interface.c
index becf92cd..6fd5b214 100644
--- a/interface.c
+++ b/interface.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* 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"
@@ -331,13 +331,15 @@ bool cInterface::Confirm(const char *s, int Seconds, bool WaitForTimeout)
void cInterface::HelpButton(int Index, const char *Text, eDvbColor FgColor, eDvbColor BgColor)
{
- if (open && Text) {
+ if (open) {
const int w = Width() / 4;
- int l = (w - int(strlen(Text))) / 2;
- if (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->Fill(Index * w, -1, w, 1, Text ? BgColor : clrBackground);
+ if (Text) {
+ int l = (w - int(strlen(Text))) / 2;
+ if (l < 0)
+ l = 0;
+ cDvbApi::PrimaryDvbApi->Text(Index * w + l, -1, Text, FgColor, BgColor);
+ }
}
}