diff --git a/escher/Makefile b/escher/Makefile index bcb5b684e..8338fde67 100644 --- a/escher/Makefile +++ b/escher/Makefile @@ -4,6 +4,7 @@ objs += $(addprefix escher/src/,\ app.o\ buffer_text_view.o\ button.o\ + chevron_menu_list_cell.o\ chevron_view.o\ container.o\ even_odd_cell.o\ diff --git a/escher/include/escher.h b/escher/include/escher.h index dae59d3dd..5962b0fa9 100644 --- a/escher/include/escher.h +++ b/escher/include/escher.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/escher/include/escher/chevron_menu_list_cell.h b/escher/include/escher/chevron_menu_list_cell.h new file mode 100644 index 000000000..99c8cda1c --- /dev/null +++ b/escher/include/escher/chevron_menu_list_cell.h @@ -0,0 +1,16 @@ +#ifndef ESCHER_CHEVRON_MENU_LIST_CELL_H +#define ESCHER_CHEVRON_MENU_LIST_CELL_H + +#include +#include + +class ChevronMenuListCell : public MenuListCell { +public: + ChevronMenuListCell(char * label = nullptr); + View * contentView() const override; + void reloadCell() override; +private: + ChevronView m_contentView; +}; + +#endif diff --git a/escher/src/chevron_menu_list_cell.cpp b/escher/src/chevron_menu_list_cell.cpp new file mode 100644 index 000000000..113ac929a --- /dev/null +++ b/escher/src/chevron_menu_list_cell.cpp @@ -0,0 +1,16 @@ +#include + +ChevronMenuListCell::ChevronMenuListCell(char * label) : + MenuListCell(label), + m_contentView(ChevronView()) +{ +} + +View * ChevronMenuListCell::contentView() const { + return (View *)&m_contentView; +} + +void ChevronMenuListCell::reloadCell() { + MenuListCell::reloadCell(); + m_contentView.setHighlighted(isHighlighted()); +} \ No newline at end of file