Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
theme_decor.hpp
Go to the documentation of this file.
1/*
2 Copyright 2026 JigSawFr
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17#pragma once
18
19#include <nanovg.h>
20
21#include <aurore/core/theme.hpp>
22#include <aurore/core/time.hpp>
23
24namespace aurore
25{
26
46{
47 public:
48 // The particles at most (a density of 1)
49 static constexpr int MAX_PARTICLES = 60;
50 // Their rate: they move at most this many times a second
51 static constexpr int PARTICLE_FPS = 30;
52 // Without input this long, they fade out and stop
53 static constexpr int IDLE_SECONDS = 60;
54
60 static void update(ThemeVariant variant);
61
66 static void drawBackdrop(ThemeArea area, NVGcontext* vg, float x, float y, float width, float height, float radius = 0.0f);
67
72 static void drawStrips(NVGcontext* vg, float x, float y, float width, float height);
73
78 static void drawParticles(NVGcontext* vg, ParticleLayer layer, float width, float height);
79
85 static bool step(Time now);
86
92 static bool particlesRunning();
93
97 static int particleCount();
98
102 static bool hasPicture(ThemeArea area);
103
107 static void reset();
108};
109
110} // namespace aurore
Definition theme_decor.hpp:46
static constexpr int PARTICLE_FPS
Definition theme_decor.hpp:51
static void drawBackdrop(ThemeArea area, NVGcontext *vg, float x, float y, float width, float height, float radius=0.0f)
static int particleCount()
static constexpr int IDLE_SECONDS
Definition theme_decor.hpp:53
static void drawParticles(NVGcontext *vg, ParticleLayer layer, float width, float height)
static bool step(Time now)
static constexpr int MAX_PARTICLES
Definition theme_decor.hpp:49
static bool particlesRunning()
static void update(ThemeVariant variant)
static void drawStrips(NVGcontext *vg, float x, float y, float width, float height)
static bool hasPicture(ThemeArea area)
Definition actions.hpp:25
ThemeVariant
The two sets of colours every theme has: light and dark.
Definition theme.hpp:37
ThemeArea
What a decoration picture is drawn in (View::setThemeArea)
Definition theme.hpp:129
retro_time_t Time
Definition time.hpp:31
ParticleLayer
Definition theme.hpp:169