X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/b8e9b51fb1a75b1805cf3108ffdc22aff9f75cf2..0d59650e25c7f1176346bfdfe2186aba9ee7089c:/main/enigma.cpp diff --git a/main/enigma.cpp b/main/enigma.cpp index 4144742c..2d258d98 100644 --- a/main/enigma.cpp +++ b/main/enigma.cpp @@ -1,8 +1,10 @@ #undef WITH_SDL + #ifdef WITH_SDL #error #define SDLDC #endif + #include #include #include @@ -15,6 +17,7 @@ #include #include #include + #ifdef WITH_SDL #error #include @@ -139,6 +142,7 @@ public: /************************************************/ +eLabel *lcd_label, *lcd_clock; int main(int argc, char **argv) { @@ -205,10 +209,20 @@ int main(int argc, char **argv) lcd_win->move(ePoint(0, 0)); lcd_win->resize(eSize(132, 64)); - eLabel *lcd_label = new eLabel(lcd_win); - lcd_label->move(ePoint(0, 0)); - lcd_label->resize(eSize(132, 64)); - lcd_label->setText("bla bla bla, this lcd\nSUCKS!"); + lcd_label = new eLabel(lcd_win); + lcd_label->move(ePoint(0, 10)); + lcd_label->resize(eSize(132, 36)); + ePtr font = new gFont("Arial", 16); + lcd_label->setFont(font); + + lcd_clock = new eLabel(lcd_win); + lcd_clock->move(ePoint(50, 46)); + lcd_clock->resize(eSize(132, 20)); + //ePtr clkfont = new gFont("Arial", 18); + lcd_clock->setFont(font); + + //lcd_label->setText("bla bla bla, this lcd\nSUCKS!"); + //lcd_clock->setText("88:88:88"); lcd_win->show(); @@ -237,3 +251,13 @@ void quitMainloop() { eApp->quit(0); } + +void setLCD(const char *string) +{ + lcd_label->setText(string); +} + +void setLCDClock(const char *string) +{ + lcd_clock->setText(string); +}