Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
footer_hints.hpp
Go to the documentation of this file.
1// FooterHints — Aurore's footer hints (aurore:Hints), fitted to the footer.
2// Aurore gives the hints the width they ask for and the clock what is
3// left: with five hints in French and the Switch's battery and Wi-Fi icons,
4// the clock wrapped onto two lines and every hint ended in "…". Here the
5// clock keeps its one line; the hints first come closer together (less room
6// around each), and only when even that is not enough are their texts cut.
7// Copyright (C) 2026 JigSawFr. GPLv3-or-later (see LICENSE.GPL).
8#pragma once
9
10#include <aurore.hpp>
11
15{
16 public:
18 ~FooterHints() override;
19
22 static void install();
24
29 static void set_timed(const std::string& hint_text, aurore::Time until, aurore::Time total_us);
30
31 void draw(NVGcontext* vg, float x, float y, float width, float height, aurore::Style style,
32 aurore::FrameContext* ctx) override;
33
34 private:
35 void fit();
36
38 std::shared_ptr<bool> alive = std::make_shared<bool>(true);
39};
Definition footer_hints.hpp:15
static aurore::View * create()
static void set_timed(const std::string &hint_text, aurore::Time until, aurore::Time total_us)
~FooterHints() override
static void install()
void draw(NVGcontext *vg, float x, float y, float width, float height, aurore::Style style, aurore::FrameContext *ctx) override
CallbacksList::iterator Subscription
Definition event.hpp:45
Definition frame_context.hpp:30
Definition hint.hpp:51
Simple wrapper around StyleValues for the array operator.
Definition style.hpp:115
Definition view.hpp:232
retro_time_t Time
Definition time.hpp:31