Add correct fonts

This commit is contained in:
2025-12-28 22:28:26 +00:00
parent a818813877
commit 85295ae4d8
35 changed files with 626 additions and 257 deletions
+1
View File
@@ -13,6 +13,7 @@ target_link_libraries(DisplayGraphics
Helpers::All
Display::UI::Text
Display::UI::HostBlock
Display::UI::Header
)
target_include_directories(DisplayGraphics
+3 -1
View File
@@ -12,6 +12,8 @@ namespace Display::Graphics
{
framebuffer.clear(Color{0, 0, 0});
header.draw(framebuffer, textRenderer, START_X, START_Y);
int blocksPerRow =
(SCREEN_WIDTH + BLOCK_GAP) / (Display::UI::HostBlock::BLOCK_WIDTH + BLOCK_GAP);
if (blocksPerRow < 1)
@@ -25,7 +27,7 @@ namespace Display::Graphics
int row = index / blocksPerRow;
int x = START_X + col * (Display::UI::HostBlock::BLOCK_WIDTH + BLOCK_GAP);
int y = START_Y + row * (Display::UI::HostBlock::BLOCK_HEIGHT + BLOCK_GAP);
int y = START_Y + header.height() + BLOCK_GAP + row * (Display::UI::HostBlock::BLOCK_HEIGHT + BLOCK_GAP);
hostblock.draw(
framebuffer,
+5 -3
View File
@@ -2,15 +2,16 @@
#include "Display/Graphics/Framebuffer.h"
#include "Model/HostRegistry.h"
#include "Display/UI/Text/Renderer.h"
#include "Display/UI/Header/Header.h"
#include "Display/UI/HostBlock/HostBlock.h"
#include "Display/Graphics/Color.h"
#include <string>
namespace Display::Graphics
{
static constexpr int START_X = 0;
static constexpr int START_Y = 10;
static constexpr int BLOCK_GAP = 4;
static constexpr int START_X = 0; // 0
static constexpr int START_Y = 0; // 20
static constexpr int BLOCK_GAP = 4; // 4
static constexpr int SCREEN_WIDTH = 240;
@@ -28,6 +29,7 @@ namespace Display::Graphics
Framebuffer &framebuffer;
Model::HostRegistry &registry;
Display::UI::Text::Renderer textRenderer;
Display::UI::Header::Header header;
Display::UI::HostBlock::HostBlock hostblock;
};
} // namespace Display::Graphics