list-item.cpp (591B)
1 #include "../include/list-item.hpp" 2 3 #include <cstdint> 4 5 #include "../include/shared.hpp" 6 7 ListItem::ListItem(std::string input) { 8 // list-item = "*" SP text-line 9 // notice that a space is required along with a *. There'd be no reason to 10 // remove them and then add them back here, so we just pass everything 11 // through. 12 13 textToRender = input; 14 } 15 16 std::string ListItem::textToDraw() { return textToRender + "\n"; } 17 18 uint8_t ListItem::getColor() { return COLOR_LIST_ITEM; } 19 20 LineType ListItem::type() { return LIST_ITEM; } 21 22 bool ListItem::isBold() { return false; }