add: Simple widget system

This commit is contained in:
Simon Hardt
2022-03-06 03:04:32 +01:00
parent e1e410561c
commit 243bf41e90
14 changed files with 430 additions and 8 deletions

View File

@@ -0,0 +1,22 @@
#pragma once
#include "../Widget.hpp"
#include <chrono>
namespace frame::widgets
{
class AnalogClock : public Widget
{
using Time = std::chrono::time_point<std::chrono::system_clock>;
Time last_time;
public:
static Widget::shared_ptr Create();
void Update() override;
void Render(render::RenderTarget& rt) override;
};
} // namespace frame::widgets