add: simple config system with font paths
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
#include "Config.hpp"
|
||||
#include "ScreenManager.hpp"
|
||||
#include "display/Display.hpp"
|
||||
#include "font/FontRegistry.hpp"
|
||||
@@ -16,16 +17,22 @@ using namespace std::chrono_literals;
|
||||
|
||||
int main()
|
||||
{
|
||||
// == == Config == ==
|
||||
auto config = Config::Load();
|
||||
|
||||
// == == Display == ==
|
||||
auto display = frame::display::Create();
|
||||
|
||||
if(!display)
|
||||
{
|
||||
fmt::print("Error: Not display driver!");
|
||||
return 0;
|
||||
}
|
||||
|
||||
display->Init();
|
||||
|
||||
frame::font::LoadFont("Fira Code");
|
||||
// frame::font::LoadFont("Fira Code");
|
||||
frame::font::LocateRegistry().LoadFromConfig(config.font);
|
||||
|
||||
frame::ScreenManager screen(std::move(display));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user