From 8da376b39e1b433390a3e130cfe147f65607473c Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Tue, 13 Dec 2005 00:29:10 +0000 Subject: [PATCH] More EPG tweaks, fix a freeze changing to a non-transmitting channel --- box.cc | 9 +++- box.h | 3 ++ command.cc | 26 +++++----- command.h | 1 + language-data.h | 132 ++++++++++++++++++++++++++++++++++++++++++++++-- main.cc | 13 ++++- message.h | 1 + vepg.cc | 60 +++++++++++----------- vlivebanner.cc | 9 ++-- vvideolive.cc | 13 +++-- wselectlist.cc | 3 +- wtextbox.cc | 9 +++- wtextbox.h | 3 ++ 13 files changed, 223 insertions(+), 59 deletions(-) diff --git a/box.cc b/box.cc index 2a72bc5..f110d62 100644 --- a/box.cc +++ b/box.cc @@ -32,6 +32,8 @@ Box::Box() offsetX = 0; offsetY = 0; + gap = 6; // default gap for drawPara + numBoxes++; Log::getInstance()->log("Box", Log::DEBUG, "Construct, now %u", numBoxes); @@ -60,6 +62,11 @@ void Box::setSurfaceOffset(UINT x, UINT y) offsetY = y; } +void Box::setGap(UINT tgap) +{ + gap = tgap; +} + void Box::show() { blt(area); @@ -112,7 +119,7 @@ void Box::fillColour(Colour& colour) void Box::drawPara(char* text, int x, int y, Colour& colour) { char line[256]; - int lineHeight = surface->getFontHeight() + 6; + int lineHeight = surface->getFontHeight() + gap; int lineWidth; int thisCharWidth; diff --git a/box.h b/box.h index b9ea1a3..4d9feb8 100644 --- a/box.h +++ b/box.h @@ -37,6 +37,7 @@ class Box void setScreenPos(int x, int y); // Even numbers only!!! void setSurfaceOffset(UINT x, UINT y); + void setGap(UINT gap); void show(); // Obselete void blt(Region& r); // For use only by ViewMan @@ -78,6 +79,8 @@ class Box UINT offsetX; UINT offsetY; + UINT gap; + static char numBoxes; static const int paraMargin = 10; diff --git a/command.cc b/command.cc index 2ac60ad..5c77313 100644 --- a/command.cc +++ b/command.cc @@ -215,17 +215,16 @@ void Command::processMessage(Message* m) // objects deriving from messagequeues, make them derive from // messagereceiver - then one messagequeue can deliver any message to anywhere - // Try to segfault - logger->log("Command", Log::DEBUG, "1: %p", m); - logger->log("Command", Log::DEBUG, "2: %p", m->to); - logger->log("Command", Log::DEBUG, "3: %lu", m->parameter); - // deliver timer ((TimerReceiver*)m->to)->timercall(m->parameter); handleCommand(Remote::NA_NONE); // in case any timer has posted messages to viewman, // run viewman message queue here. FIXME improve this! - // FIXME unlock main mutex + break; + } + case Message::SCREENSHOT: + { + Osd::getInstance()->screenShot("/out.jpg"); } } } @@ -263,14 +262,17 @@ void Command::handleCommand(int button) doStandby(); return; } + } +} + +void Command::sig1() +{ #ifdef DEV - case Remote::RECORD: - { - Osd::getInstance()->screenShot("/out.jpg"); - return; - } + Message* m = new Message(); + m->message = Message::SCREENSHOT; + m->to = this; + postMessage(m); #endif - } } void Command::doStandby() diff --git a/command.h b/command.h index ccd651f..3fe958e 100644 --- a/command.h +++ b/command.h @@ -69,6 +69,7 @@ class Command : public MessageQueue void doReboot(); void postMessage(Message* m); // override of MessageQueue::postMessage bool postMessageIfNotBusy(Message* m); // for timers, when masterMutex might be locked + void sig1(); private: void handleCommand(int); diff --git a/language-data.h b/language-data.h index d64e157..bdbb189 100644 --- a/language-data.h +++ b/language-data.h @@ -57,7 +57,7 @@ #ifdef I18N_HEADER -#define NUM_LANGUAGES 4 +#define NUM_LANGUAGES 5 #define DEFAULT_LANGUAGE_INDEX 0 #else @@ -66,8 +66,9 @@ const char* const I18n::Languages[] = { "English", - "Deutsch", // By André Jagusch - "Svenska", // By Lars Fredriksson + "Deutsch", // German by André Jagusch + "Svenska", // Swedish by Lars Fredriksson + "Magyar", // Hungarian by Pák Gergely "Test" }; @@ -77,6 +78,7 @@ const char* const I18n::charSets[] = "iso8859-1", "iso8859-1", "iso8859-1", + "iso8859-1", "iso8859-1" }; @@ -86,6 +88,7 @@ const char* const I18n::languageCodes[] = "eng,dos", "deu,ger", "sve,swe", + "hun", "tst,xxx" }; @@ -97,65 +100,78 @@ const I18n::tI18nPhrase I18n::Phrases[] = "VDR", "VDR", "VDR", + "VDR", }, { "Schedule", "Programm", "Program", + "Müsor", "0", }, // Welcome screen { "Welcome", "Willkommen", "Välkommen", + "Üdvözöljük", "1", }, { "1. Live TV", "1. Fernsehen", "1. TV", + "1. TV", "2", }, { "2. Radio", "2. Radio", "2. Radio", + "2. Rádió", "3", }, { "3. Recordings", "3. Aufnahmen", "3. Inspelningar", + "3. Felvételek", "4", }, { "4. Options", "4. Einstellungen", "4. Inställningar", + "4. Beállítások", "5", }, { "5. Stand by", "5. Stand-by", "5. Stäng av", + "5. Készenlét", "6", }, { "6. Reboot", "6. Neustart", "6. Starta om", + "6. Újraindítás", "7", }, { "Downloading recordings list", "Lade die Aufnahmen-Liste", "Laddar lista över inspelningar", + "Felvétellista letöltése", "8", }, // Recordings list { "Recordings - %s", "Aufnahmen - %s", "Inspelningar - %s", + "Felvételek - %s", "9 - %s", }, { "Recordings", "Aufnahmen", "Inspelningar", + "Felvételek", "10", }, { " %lu\t%s", + " %lu\t%s", " %lu\t%s", " %lu\t%s", "11 %lu\t%s", @@ -163,79 +179,94 @@ const I18n::tI18nPhrase I18n::Phrases[] = { "[ok] = menu", "[ok] = Menü", "[ok] = meny", + "[ok] = menü", "12", }, { "%lu%% used, %iGB free", "%lu%% belegt, %iGB frei", "%lu% använt, %iGB ledigt", + "%lu% felhasznált, %iGB szabad", "13 %lu%% %i", }, { "%i to %i of %i", // Also used in channels list "%i bis %i (von %i)", "%i av %i till %i", + "%i - %i (összesen %i)", "14 %i %i %i", }, // Question { "Yes", "Ja", "Ja", + "Igen", "15", }, { "No", "Nein", "Nej", + "Nem", "16", }, // Recording Menu { "Programme menu", "Programm-Menü", "Programmeny", + "Müsor menü", "17", }, { "Play", "Wiedergeben", "Spela upp", + "Lejátszás", "18", }, { "Resume", "Fortsetzen", "Återuppta", + "Folytatás", "19", }, { "Summary", "Inhalt", "Sammanfattning", + "Tartalom", "20", }, { "Delete", "Löschen", "Ta bort", + "Törlés", "21", }, { "Programme summary", "Programminhalt", "Programsammanfattning", + "Müsor tartalom", "22", }, { "Summary unavailable", "Inhalt nicht verfügbar", "Ingen sammanfattning tillgänglig", + "Tartalom nem elérhetö", "23", }, { "Delete recording", "Aufnahme löschen", "Ta bort inspelning", + "Felvétel törlése", "24", }, { "Are you sure you want to delete this recording?", "Sind Sie sich sicher, dass Sie diese Aufnahme löschen möchten?", "Är du säker att du vill ta bort den här inspelningen", + "Biztosan törölni szeretné ezt a felvételt?", "25", }, // Server select { "Choose a VDR server", "Wählen Sie einen VDR-Server", "Välj VDR server", + "Válasszon egy VDR szervert", "26", }, @@ -243,70 +274,84 @@ const I18n::tI18nPhrase I18n::Phrases[] = { "Options", "Einstellungen", "Inställningar", + "Beállitások", "27", }, { "TV connection type", "TV-Anschlußart", "Typ av TV-anslutning", + "TV csatlakozás tipusa", "28", }, { "Remote control type", "Fernbedienungstyp", "Fjärrkontroll", + "Távirányitó tipusa", "29", }, { "TV aspect ratio", "Seitenverhältnis", "TV-format", + "TV képformátum", "30", }, { "16:9 on 4:3 display mode", "16:9 auf 4:3-Modus", "16:9 på 4:3-skärm", + "16:9 a 4:3-as képernyön", "30a", }, { "Power state after bootup", "Einschalten nach Neustart", "Läge efter strömborfall", + "Bekapcsolás utáni állapot", "31", }, { "Display channels", "Kanäle anzeigen", "Visa kanaler", + "Csatornák megjelenítése", "32", }, { "Language", "Sprache", "Språk", + "Nyelv", "33", }, { "Press back to exit, <, > or [ok] to change", "Zum Verlassen back drücken, <, > oder [ok] zum Wechseln", "Tryck [back] för att avsluta, eller [ok] för att ändra", + "[back] gombbal kilép, [<], [>] vagy [ok] gombbal választ", "34", }, { "VDR-Pri 0=OK !See forums!", "VDR-Pri 0=OK !Siehe Forum!", "VDR-Prio 0=OK !Se forum!", + "VDR-Pri 0=OK !lásd. fórum!", "34a", }, // Option choices { "Old", "Alt", "Gammal modell", + "Régi", "35", }, { "New", "Neu", "Ny modell", + "Új", "36", }, { "RGB+composite", "RGB+composite", "RGB+komposit", + "RGB+composite", "37", }, { "S-Video", + "S-Video", "S-Video", "S-Video", "38", @@ -314,9 +359,11 @@ const I18n::tI18nPhrase I18n::Phrases[] = { "Chop sides", "Seiten abschneiden", "Ta bort på sidorna", + "Szélek levágva", "39", }, { "Letterbox", + "Letterbox", "Letterbox", "Letterbox", "40", @@ -324,26 +371,31 @@ const I18n::tI18nPhrase I18n::Phrases[] = { "Last state", "Letzter Zustand", "Återgå til senaste läge", + "Utolsó állapot", "41", }, { "All", "Alle", "Alla", + "Összes", "42", }, { "FTA only", "nur FTA", "Endast FTA", + "Csak FTA", "43", }, { "On", "An", "På", + "Be", "44", }, { "Off", "Aus", "Av", + "Ki", "45", }, @@ -351,62 +403,134 @@ const I18n::tI18nPhrase I18n::Phrases[] = { "Channels", "Fernsehkanäle", "Kanaler", + "Csatornák", "46", }, { "Radio Stations", "Radiokanäle", "Radiostationer", + "Rádiócsatornák", "47", }, // Banners { "No channel data available", "Keine Daten für diesen Kanal verfügbar", "Ingen programinformation tillgänglig", + "Csatorna-adatok nem állnak rendelkezésre", "48", }, { "info", "Info", "Info", + "Infó", "49", }, { "info", "Info", "Info", + "Infó", "50", }, { "Channel unavailable", "Kanal nicht verfügbar", "Kanalen är inte tillgänglig", + "A csatorna nem elérhetö", "51", }, // Connect screen { "Locating server", "Lokalisiere Server", "Letar efter server", + "Szerver keresése", "52", }, { "Connecting to VDR", "Verbinde zum VDR", "Ansluter till VDR", + "Csatlakozás a VDR-hez", "53", }, { "Login failed", "Login fehlgeschlagen", "Inloggning misslycklades", + "Bejelentkezés sikertelen", "54", }, { "Connection failed", "Verbindung fehlgeschlagen", "Anslutning misslyckades", + "Kapcsolódás sikertelen", "55", }, // Command { "Connected, loading config", "Verbunden, lade Einstellungen", "Ansluten, laddar konfigurering", + "Kapcsolódva, beállitások betöltése", "56", }, - // End marker. + // EPG + { "EPG", + "EPG", + "EPG", + "EPG", + "57", + }, + { "Page up", + "Seite hoch", + "", + "Visszalapozás", + "58", + }, + { "Page down", + "Seite runter", + "", + "Elörelapozás", + "59", + }, + { "-24 hours", + "-24 Stunden", + "", + "-24 óra", + "60", + }, + { "+24 hours", + "+24 Stunden", + "", + "+24 óra", + "61", + }, + { "Guide / Back: Close", + "EPG / Zurück: Schließen", + "", + "Guide / Back: Bezárás", + "62", + }, + { "Rec: Set timer", + "Rec: Aufnahme programmieren", + "", + "Rec: Felvétel beállítása", + "63", + }, + { "Sel channel", + "Kanal auswählen", + "", + "Csatornaválasztás", + "64", + }, + { "There are no programme details available for this period", + "Es sind keine Programminformationen für diesen Zeitraum verfügbar", + "", + "Nincs programinformáció ehhez az idöszakhoz", + "65", + }, + { "No programme details", + "Keine Programminformation", + "", + "Nincs programinformáció", + "66", + }, + // End marker. { NULL } }; diff --git a/main.cc b/main.cc index 4dfbbc2..723ea6b 100644 --- a/main.cc +++ b/main.cc @@ -139,12 +139,14 @@ int main(int argc, char** argv) logger->log("Core", Log::EMERG, "Could not set up signal handler for SIGUSR1. Aborting."); shutdown(1); } +/* sigtest = signal(SIGUSR2, sighandler); if (sigtest == SIG_ERR) { logger->log("Core", Log::EMERG, "Could not set up signal handler for SIGUSR2. Aborting."); shutdown(1); } +*/ sigtest = signal(SIGURG, sighandler); if (sigtest == SIG_ERR) { @@ -207,7 +209,7 @@ int main(int argc, char** argv) else if (videoFormat == Video::NTSC) logger->log("Core", Log::INFO, "Read from MTD: NTSC 720x480"); else logger->log("Core", Log::INFO, "No help from MTD. Assuming NTSC 720x480"); - //videoFormat = Video::NTSC; // enable this line to test NTSC in PAL land +// videoFormat = Video::NTSC; // enable this line to test NTSC in PAL land success = video->init(videoFormat); if (success) @@ -378,7 +380,7 @@ void shutdown(int code) void sighandler(int signalReceived) { - logger->log("Core", Log::NOTICE, "Signal %i received", signal); + logger->log("Core", Log::NOTICE, "Signal %i received", signalReceived); switch (signalReceived) { @@ -394,6 +396,12 @@ void sighandler(int signalReceived) command->stop(); // FIXME this is probably not safe - use the messaging system / is that even safe? break; } + case SIGUSR1: + { + command->sig1(); + break; + } +/* case SIGUSR1: { logger->log("Core", Log::DEBUG, "SIGUSR1 caught"); @@ -406,6 +414,7 @@ void sighandler(int signalReceived) logger->downLogLevel(); break; } +*/ case SIGURG: { logger->log("Core", Log::DEBUG, "SIGURG caught"); diff --git a/message.h b/message.h index b238ec4..4caf10d 100644 --- a/message.h +++ b/message.h @@ -41,6 +41,7 @@ class Message const static ULONG CLOSE_ME = 2; const static ULONG PLAY_SELECTED_RECORDING = 3; const static ULONG DELETE_SELECTED_RECORDING = 4; + const static ULONG SCREENSHOT = 5; const static ULONG CHANNEL_CHANGE = 6; const static ULONG RESUME_SELECTED_RECORDING = 7; const static ULONG STANDBY = 8; diff --git a/vepg.cc b/vepg.cc index 88e38a2..af6d2da 100644 --- a/vepg.cc +++ b/vepg.cc @@ -35,7 +35,12 @@ VEpg::VEpg(VVideoLive* v, UINT currentChannel) { + // initialise variables and pointers viewman = ViewMan::getInstance(); + videoLive = v; + eventList = NULL; + chanList = VDR::getInstance()->getChannelsList(VDR::VIDEO); //TODO want to be able to display video and radio together + e = 0; for(UINT listIndex = 0; listIndex < 7; listIndex++) { @@ -43,46 +48,48 @@ VEpg::VEpg(VVideoLive* v, UINT currentChannel) eventLista[listIndex] = NULL; } - -// Create pallet on which to paint our epg view and position it in centre of screen. -// Need to reduce size to deal with overscanning TVs. - videoLive = v; -// create(640, 530); -//TODO: have size for ntsc + // Create pallet on which to paint our epg view and position it in centre of screen. + // Need to reduce size to deal with overscanning TVs. + + // FIXME have size for ntsc if (Video::getInstance()->getFormat() == Video::PAL) { - create(632, 520); - setScreenPos(60, 30); + create(632, 541); + setScreenPos(60, 16); } else { - // what can we do about poor ntsc? - create(512, 384); - setScreenPos(64, 51); + create(632, 440); + setScreenPos(50, 10); } // beautify Colour transparent = Colour(0, 0, 0, 0); setBackgroundColour(transparent); -// initialise variables and pointers - eventList = NULL; - chanList = VDR::getInstance()->getChannelsList(VDR::VIDEO); //TODO want to be able to display video and radio together - e = 0; + progTitle.setSurface(surface); progTitle.setSurfaceOffset(0,0); - progTitle.setDimensions(300,(Surface::getFontHeight() + 6) * 2 + 2); //paragraph line seperation is 6 pixels + progTitle.setDimensions(300,(Surface::getFontHeight() + 6) * 2 + 16); //paragraph line seperation is 6 pixels progTitle.setBackgroundColour(Colour::TITLEBARBACKGROUND); + progTitle.setTextPos(5, 16); + progInfo.setSurface(surface); progInfo.setSurfaceOffset(0, progTitle.getOffsetY() + progTitle.getHeight()); - progInfo.setDimensions(300,(Surface::getFontHeight() + 6) * 8 + 2); + progInfo.setDimensions(300,(Surface::getFontHeight() + 4) * 8 + 12); + progInfo.setGap(4); + chanName.setSurface(surface); chanName.setDimensions(510, (Surface::getFontHeight() + 4)); - chanName.setSurfaceOffset(305,230); + chanName.setSurfaceOffset(305,244); chanName.setBackgroundColour(Colour(0, 0, 0, 90)); -// create area to display list of channels + + // create area to display list of channels chanListbox.setSurface(surface); // add channel list chanListbox.setSurfaceOffset(0, progInfo.getOffsetY() + progInfo.getHeight() + Surface::getFontHeight() + 8); // position channel list - chanListbox.setDimensions(150, (Surface::getFontHeight() + 1) * 7 + 5); //listbox line seperation is 1 pixel + chanListbox.setDimensions(150, (Surface::getFontHeight() + 2) * 7 + 5); //listbox line seperation is 1 pixel + chanListbox.setGap(2); + + // populate channel list Channel* chan; int first = 1; @@ -150,13 +157,11 @@ void VEpg::draw() // Moved all the dynamic data drawing to a seperate function - - Log::getInstance()->log("EPG", Log::DEBUG, "START TIME"); // Display the status and key stuff at the bottom int keyx = chanListbox.getOffsetX(); int keyy = chanListbox.getOffsetY() + chanListbox.getHeight() + 2; - surface->fillblt(keyx, keyy, 610, Surface::getFontHeight() * 2 + 14, surface->rgba(100, 100, 100, 255)); - + surface->fillblt(keyx, keyy, 605, Surface::getFontHeight() * 2 + 14, surface->rgba(100, 100, 100, 255)); + WSymbol w; w.setSurface(surface); @@ -206,9 +211,6 @@ void VEpg::draw() surface->fillblt(keyx + 474, keyy + Surface::getFontHeight() + 8, 128, Surface::getFontHeight() + 2, surface->rgba( 180, 180, 180, 255)); drawText(tr("Go: Preview"), keyx + 476, keyy + Surface::getFontHeight() + 9, Colour::LIGHTTEXT); - - Log::getInstance()->log("EPG", Log::DEBUG, "END TIME"); - // Draw all the dynamic data drawData(); } @@ -222,7 +224,7 @@ void VEpg::drawData() rectangle( chanListbox.getOffsetX(), chanListbox.getOffsetY() - Surface::getFontHeight() - 3, - 610, // FIXME make this dynamic + 155 + WINDOW_WIDTH * MINUTE_SCALE, chanListbox.getHeight() + Surface::getFontHeight() + 3, Colour::BLACK); @@ -489,7 +491,7 @@ void VEpg::drawgrid() // redraws grid and select programme paintCell(&noevent, y, bg, fg); } } - y += Surface::getFontHeight() + 1; + y += Surface::getFontHeight() + 2; } setInfo(&thisEvent); } diff --git a/vlivebanner.cc b/vlivebanner.cc index fd48254..e1770b4 100644 --- a/vlivebanner.cc +++ b/vlivebanner.cc @@ -138,10 +138,10 @@ void VLiveBanner::draw() rectangle(0, area.h - 30, area.w, 30, titleBarColour); rectangle(7, area.h - 24, 18, 16, Colour::RED); - drawText(tr("info"), 32, area.h - 25, Colour::LIGHTTEXT); + drawText(tr("EPG"), 32, area.h - 25, Colour::LIGHTTEXT); rectangle(110, area.h - 24, 18, 16, Colour::GREEN); - drawText(tr("EPG"), 135, area.h - 25, Colour::LIGHTTEXT); + drawText(tr("info"), 135, area.h - 25, Colour::LIGHTTEXT); drawClock(); } @@ -212,7 +212,7 @@ int VLiveBanner::handleCommand(int command) ViewMan::getInstance()->postMessage(m); return 2; } - case Remote::RED: + case Remote::GREEN: case Remote::MENU: { if (!eventList) return 2; @@ -253,7 +253,8 @@ int VLiveBanner::handleCommand(int command) } return 2; // should not get here } - case Remote::GREEN: + case Remote::GUIDE: + case Remote::RED: { // full epg Timers::getInstance()->cancelTimer(this, 1); // if it exists diff --git a/vvideolive.cc b/vvideolive.cc index 082e7f6..a340c96 100644 --- a/vvideolive.cc +++ b/vvideolive.cc @@ -215,7 +215,7 @@ void VVideoLive::processMessage(Message* m) { Log::getInstance()->log("VVideoLive", Log::DEBUG, "streamEnd"); stop(); - play(1); + showUnavailable(1); } else if (m->message == Message::EPG) { @@ -280,7 +280,7 @@ void VVideoLive::showUnavailable(int active) else { unavailable = 0; - ViewMan::getInstance()->removeView(unavailableView); + viewman->removeView(unavailableView); unavailableView = NULL; } } @@ -347,12 +347,15 @@ UINT VVideoLive::getCurrentChannelIndex() void VVideoLive::showEPG() { if (unavailable) showUnavailable(0); - vepg = new VEpg(this, currentChannel); - ViewMan::getInstance()->add(vepg); + Video::getInstance()->setMode(Video::QUARTER); Video::getInstance()->setPosition(170, 5); //TODO need to deal with 4:3 switching + + vepg = new VEpg(this, currentChannel); vepg->draw(); - vepg->show(); + + viewman->add(vepg); + viewman->updateView(vepg); } void VVideoLive::setEpgMode(bool mode) diff --git a/wselectlist.cc b/wselectlist.cc index 2cd7c9e..9942ff5 100644 --- a/wselectlist.cc +++ b/wselectlist.cc @@ -27,6 +27,7 @@ WSelectList::WSelectList() numOptionsDisplayable = 0; numColumns = 0; noLoop = 0; + gap = 1; } WSelectList::~WSelectList() @@ -78,7 +79,7 @@ int WSelectList::addOption(char* text, int selected) void WSelectList::draw() { int fontHeight = surface->getFontHeight(); - int ySeperation = fontHeight + 1; + int ySeperation = fontHeight + gap; numOptionsDisplayable = (area.h - 5) / ySeperation; diff --git a/wtextbox.cc b/wtextbox.cc index 33fb99d..1d2deed 100644 --- a/wtextbox.cc +++ b/wtextbox.cc @@ -28,6 +28,8 @@ WTextbox::WTextbox() text = NULL; foreColour = Colour::LIGHTTEXT; backColour = Colour::VIEWBACKGROUND; + textX = 5; + textY = 2; } WTextbox::~WTextbox() @@ -56,6 +58,11 @@ void WTextbox::draw() { fillColour(backColour); if (text) - drawPara(text, 5, 2, foreColour); + drawPara(text, textX, textY, foreColour); } +void WTextbox::setTextPos(int x, int y) +{ + textX = x; + textY = y; +} diff --git a/wtextbox.h b/wtextbox.h index 1037d3e..53bd721 100644 --- a/wtextbox.h +++ b/wtextbox.h @@ -37,12 +37,15 @@ class WTextbox : public Widget void draw(); void setBackgroundColour(Colour bcolour); void setForegroundColour(Colour fcolour); + void setTextPos(int x, int y); // optional private: char* text; Colour foreColour; Colour backColour; + int textX; + int textY; }; #endif -- 2.39.5