Encapsulate the drawing of the screen into Screens classes.
This commit is contained in:
26
src/DisplayApp/Screens/Message.h
Normal file
26
src/DisplayApp/Screens/Message.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include <Components/Gfx/Gfx.h>
|
||||
#include "Screen.h"
|
||||
#include <bits/unique_ptr.h>
|
||||
#include "../Fonts/lcdfont14.h"
|
||||
#include "../Fonts/lcdfont70.h"
|
||||
#include "../../Version.h"
|
||||
|
||||
namespace Pinetime {
|
||||
namespace Applications {
|
||||
namespace Screens {
|
||||
class Message : public Screen{
|
||||
public:
|
||||
Message(Components::Gfx& gfx) : Screen(gfx) {}
|
||||
void Refresh(bool fullRefresh) override;
|
||||
|
||||
private:
|
||||
const FONT_INFO largeFont {lCD_70ptFontInfo.height, lCD_70ptFontInfo.startChar, lCD_70ptFontInfo.endChar, lCD_70ptFontInfo.spacePixels, lCD_70ptFontInfo.charInfo, lCD_70ptFontInfo.data};
|
||||
const FONT_INFO smallFont {lCD_14ptFontInfo.height, lCD_14ptFontInfo.startChar, lCD_14ptFontInfo.endChar, lCD_14ptFontInfo.spacePixels, lCD_14ptFontInfo.charInfo, lCD_14ptFontInfo.data};
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user