mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-29 19:49:58 +02:00
33 lines
970 B
C++
33 lines
970 B
C++
#include <escher/pointer_table_cell_with_buffer.h>
|
|
#include <escher/palette.h>
|
|
|
|
PointerTableCellWithBuffer::PointerTableCellWithBuffer(char * label) :
|
|
PointerTableCell(label),
|
|
m_accessoryView(BufferTextView(KDText::FontSize::Large, 1.0f, 0.5f))
|
|
{
|
|
}
|
|
|
|
void PointerTableCellWithBuffer::setAccessoryText(const char * textBody) {
|
|
m_accessoryView.setText(textBody);
|
|
reloadCell();
|
|
}
|
|
|
|
const char * PointerTableCellWithBuffer::accessoryText() {
|
|
return m_accessoryView.text();
|
|
}
|
|
|
|
View * PointerTableCellWithBuffer::accessoryView() const {
|
|
return (View *)&m_accessoryView;
|
|
}
|
|
|
|
void PointerTableCellWithBuffer::setHighlighted(bool highlight) {
|
|
PointerTableCell::setHighlighted(highlight);
|
|
KDColor backgroundColor = isHighlighted()? Palette::Select : KDColorWhite;
|
|
m_accessoryView.setBackgroundColor(backgroundColor);
|
|
}
|
|
|
|
void PointerTableCellWithBuffer::setTextColor(KDColor color) {
|
|
m_accessoryView.setTextColor(color);
|
|
PointerTableCell::setTextColor(color);
|
|
}
|