37 lines
856 B
C++
37 lines
856 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "display/graphics/Framebuffer.h"
|
|
#include "display/graphics/Color.h"
|
|
#include "display/ui/text/Renderer.h"
|
|
|
|
namespace display::ui::header
|
|
{
|
|
// ===== Layout =====
|
|
constexpr int HEADER_WIDTH = 240; // 116
|
|
constexpr int HEADER_HEIGHT = 16; // 116
|
|
constexpr int PADDING = 4; // 4
|
|
constexpr std::string_view HEADER_FONT_NAME = "Pixel10";
|
|
constexpr int HEADER_FONT_SIZE = 14; // 12
|
|
|
|
class Header
|
|
{
|
|
public:
|
|
Header();
|
|
|
|
static constexpr int width() { return HEADER_WIDTH; }
|
|
static constexpr int height() { return HEADER_HEIGHT; }
|
|
|
|
void draw(
|
|
display::graphics::Framebuffer &fb,
|
|
display::ui::text::Renderer &text,
|
|
int x, int y);
|
|
|
|
private:
|
|
std::string getCurrentDateTime();
|
|
};
|
|
|
|
}
|