diff --git a/src/ui/listView.cpp b/src/ui/listView.cpp index bb9af1a..a431236 100644 --- a/src/ui/listView.cpp +++ b/src/ui/listView.cpp @@ -94,6 +94,13 @@ void ListView::drawEntry(int itemID) { FillAreaRect(_entries[itemID].getPosition(), WHITE); _entries[itemID].draw(_items->at(itemID), _entryFont, _entryFontBold, _entryFontHeight); + updateEntry(itemID); +} + +void ListView::invertEntryColor(int itemID) +{ + InvertAreaBW(_entries[itemID].getPosition()->x, _entries[itemID].getPosition()->y, _entries[itemID].getPosition()->w, _entries[itemID].getPosition()->h); + updateEntry(itemID); } void ListView::drawEntries() diff --git a/src/ui/listView.h b/src/ui/listView.h index 9477217..98bb6c1 100644 --- a/src/ui/listView.h +++ b/src/ui/listView.h @@ -45,6 +45,13 @@ public: */ void drawEntry(int itemID); + /** + * inverts the color of an entry + * + * @param itemID the id of the item that shall be inverted + */ + void invertEntryColor(int itemID); + /** * Iterates through the items and sends them to the listViewEntry Class for drawing */