summaryrefslogtreecommitdiff
path: root/textwindow.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-11-07 16:58:07 +0100
committerlouis <louis.braun@gmx.de>2013-11-07 16:58:07 +0100
commite09cf14b0cf0882b8b4db75ae64cf9d6846b8bc7 (patch)
tree7886779ba33b466b2fe9ca67362183dabe08597e /textwindow.c
parent0bbbad6d8057953ae51e9465bd76e5a3256e5eee (diff)
downloadskin-nopacity-e09cf14b0cf0882b8b4db75ae64cf9d6846b8bc7.tar.gz
skin-nopacity-e09cf14b0cf0882b8b4db75ae64cf9d6846b8bc7.tar.bz2
changed build environment that every class is build seperately
Diffstat (limited to 'textwindow.c')
-rw-r--r--textwindow.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/textwindow.c b/textwindow.c
index 095b808..1d313c6 100644
--- a/textwindow.c
+++ b/textwindow.c
@@ -1,4 +1,9 @@
#include "textwindow.h"
+#include "config.h"
+#include "imagecache.h"
+#include "imageloader.h"
+#include "helpers.h"
+#include <sstream>
cNopacityTextWindow::cNopacityTextWindow(cOsd *osd, cFont *font, cRect *vidWin) {
this->osd = osd;
@@ -196,7 +201,7 @@ void cNopacityTextWindow::DrawText(int border, int left) {
currentLineHeight += lineHeight;
}
}
- cPixmap::Unlock();
+ cPixmap::Unlock();
}
void cNopacityTextWindow::SetEvent(const cEvent *event) {
@@ -231,7 +236,7 @@ void cNopacityTextWindow::SetEvent(const cEvent *event) {
//Description
if (hasPoster && (y < (border + posterHeight))) {
int heightNarrow = border + posterHeight - y;
- DrawTextWrapperFloat(event->Description(),
+ DrawTextWrapperFloat(event->Description(),
widthTextHeader, widthText, y, heightNarrow,
border, font, Theme.Color(clrMenuFontDetailViewText), height);
} else if (epgImageFound && (y < (border + config.GetValue("epgImageHeight")))) {
@@ -278,7 +283,7 @@ void cNopacityTextWindow::SetRecording(const cRecording *recording) {
cString recTitle;
if (info->Title())
recTitle = info->Title();
- else
+ else
recTitle = recording->Name();
//Title
y = DrawTextWrapper(*recTitle, widthTextHeader, y, border, fontHeader, Theme.Color(clrMenuFontDetailViewHeaderTitle), height);
@@ -301,7 +306,7 @@ void cNopacityTextWindow::SetRecording(const cRecording *recording) {
}
}
-int cNopacityTextWindow::DrawTextWrapper(const char *text, int width, int top, int x,
+int cNopacityTextWindow::DrawTextWrapper(const char *text, int width, int top, int x,
const cFont *font, tColor color, int maxHeight) {
cTextWrapper wrapper;
int lineHeight = font->Height();
@@ -319,10 +324,10 @@ int cNopacityTextWindow::DrawTextWrapper(const char *text, int width, int top, i
return y;
}
-void cNopacityTextWindow::DrawTextWrapperFloat(const char *text, int widthSmall, int widthFull,
- int top, int heightNarrow, int x, const cFont *font,
+void cNopacityTextWindow::DrawTextWrapperFloat(const char *text, int widthSmall, int widthFull,
+ int top, int heightNarrow, int x, const cFont *font,
tColor color, int maxHeight) {
-
+
if (!text)
return;
int lineHeight = font->Height();
@@ -409,13 +414,13 @@ void cNopacityTextWindow::ScaleVideoWindow(void) {
void cNopacityTextWindow::Action(void) {
if (! *text)
return;
-
+
DoSleep(config.GetValue("menuInfoTextDelay")*1000);
if (config.GetValue("scalePicture") == 2) {
- ScaleVideoWindow();
+ ScaleVideoWindow();
}
-
+
int border = 5;
int left = 0;
if (hasPoster || hasManualPoster)
@@ -453,7 +458,7 @@ void cNopacityTextWindow::Action(void) {
break;
}
}
-
+
if (scrolling && Running()) {
int scrollDelay = config.GetValue("menuInfoScrollDelay") * 1000;
DoSleep(scrollDelay);
@@ -465,7 +470,7 @@ void cNopacityTextWindow::Action(void) {
FrameTime = 30;
else if (config.GetValue("menuInfoScrollSpeed") == 3)
FrameTime = 15;
-
+
int maxY = pixmap->DrawPort().Height() - pixmap->ViewPort().Height();
bool doSleep = false;
while (Running()) {