This commit is contained in:
furrtek 2016-05-09 21:05:11 +02:00
parent 8523bd860e
commit 569f299f42
57 changed files with 1155 additions and 772 deletions

View file

@ -24,45 +24,14 @@
#include <string>
#include <algorithm>
#include "bitmap.hpp"
namespace ui {
/* SDCardStatusView *****************************************************/
namespace detail {
static constexpr uint8_t bitmap_sd_card_ok_data[] = {
0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0xf0, 0x1f,
0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f,
0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f,
0xf8, 0x1f, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00,
};
static constexpr Bitmap bitmap_sd_card_ok {
{ 16, 16 }, bitmap_sd_card_ok_data
};
static constexpr uint8_t bitmap_sd_card_unknown_data[] = {
0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0xf0, 0x1f,
0x38, 0x1c, 0x98, 0x19, 0xf8, 0x19, 0xf8, 0x1c,
0x78, 0x1e, 0x78, 0x1e, 0xf8, 0x1f, 0x78, 0x1e,
0xf8, 0x1f, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00,
};
static constexpr Bitmap bitmap_sd_card_unknown {
{ 16, 16 }, bitmap_sd_card_unknown_data
};
static constexpr uint8_t bitmap_sd_card_error_data[] = {
0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0xf0, 0x1f,
0xf8, 0x1f, 0xd8, 0x1b, 0x98, 0x19, 0x38, 0x1c,
0x78, 0x1e, 0x38, 0x1c, 0x98, 0x19, 0xd8, 0x1b,
0xf8, 0x1f, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00,
};
static constexpr Bitmap bitmap_sd_card_error {
{ 16, 16 }, bitmap_sd_card_error_data
};
const Bitmap& bitmap_sd_card(const sd_card::Status status) {
switch(status) {
case sd_card::Status::IOError:
@ -113,7 +82,7 @@ const Color color_sd_card(const sd_card::Status status) {
SDCardStatusView::SDCardStatusView(
const Rect parent_rect
) : Image { parent_rect, &detail::bitmap_sd_card_unknown, detail::color_sd_card_unknown, Color::black() }
) : Image { parent_rect, &bitmap_sd_card_unknown, detail::color_sd_card_unknown, Color::black() }
{
}