summaryrefslogtreecommitdiff
path: root/interface.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-01-27 16:00:31 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-01-27 16:00:31 +0100
commit8fbc28349bf3a3871235401c6a2341d97f5e1acb (patch)
tree9a4fe8523f8fad2c0d3ccf19d233c01fe47ff760 /interface.c
parent3669bbf375899b609a308c3d02dd4b20ff0cfc79 (diff)
downloadvdr-8fbc28349bf3a3871235401c6a2341d97f5e1acb.tar.gz
vdr-8fbc28349bf3a3871235401c6a2341d97f5e1acb.tar.bz2
Status messages are now displayed centered
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/interface.c b/interface.c
index 6fd5b214..59652244 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.46 2002/01/26 11:09:58 kls Exp $
+ * $Id: interface.c 1.47 2002/01/27 16:00:31 kls Exp $
*/
#include "interface.h"
@@ -292,8 +292,12 @@ void cInterface::Status(const char *s, eDvbColor FgColor, eDvbColor BgColor)
{
int Line = (abs(height) == 1) ? 0 : -2;
ClearEol(0, Line, s ? BgColor : clrBackground);
- if (s)
- Write(0, Line, s, FgColor, BgColor);
+ if (s) {
+ int x = (Width() - strlen(s)) / 2;
+ if (x < 0)
+ x = 0;
+ Write(x, Line, s, FgColor, BgColor);
+ }
}
void cInterface::Info(const char *s)