TachyonUI
0.1.0
High-performance UI for building tools.
Toggle main menu visibility
Loading...
Searching...
No Matches
gui_layered_fade.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
gui_core/gui_base_types.h
>
4
5
#include <cstdint>
6
#include <memory>
7
#include <span>
8
#include <unordered_map>
9
10
namespace
tachyon
11
{
14
19
class
LayeredFades
20
{
21
public
:
22
LayeredFades
();
23
~LayeredFades
();
24
LayeredFades
(
const
LayeredFades
&) =
delete
;
25
LayeredFades
&
operator=
(
const
LayeredFades
&) =
delete
;
26
30
uint32_t
Show
(std::span<const uint8_t> bgra,
int2
size,
IntRect
screenRect,
float
opacity);
32
void
Move
(uint32_t fade,
IntRect
screenRect,
float
opacity);
34
void
End
(uint32_t fade);
36
size_t
Count
()
const
;
37
38
private
:
39
struct
Fade;
40
std::unordered_map<uint32_t, std::unique_ptr<Fade>> m_fades;
41
uint32_t m_next = 1;
42
};
43
45
}
tachyon::LayeredFades::operator=
LayeredFades & operator=(const LayeredFades &)=delete
tachyon::LayeredFades::Move
void Move(uint32_t fade, IntRect screenRect, float opacity)
Moves a stand-in and sets its opacity.
tachyon::LayeredFades::Show
uint32_t Show(std::span< const uint8_t > bgra, int2 size, IntRect screenRect, float opacity)
Shows bgra (size pixels, BGRA8, alpha 255 for an opaque window) at screenRect (screen pixels; the pic...
tachyon::LayeredFades::End
void End(uint32_t fade)
Removes a stand-in; 0 and unknown ones are ignored.
tachyon::LayeredFades::LayeredFades
LayeredFades(const LayeredFades &)=delete
tachyon::LayeredFades::Count
size_t Count() const
How many are shown.
tachyon::LayeredFades::LayeredFades
LayeredFades()
tachyon::LayeredFades::~LayeredFades
~LayeredFades()
gui_base_types.h
tachyon
Definition
gui_logging.h:24
tachyon::IntRect
Definition
gui_base_types.h:407
tachyon::int2
Integer 2D vector.
Definition
gui_base_types.h:19
gui_core
windows
gui_layered_fade.h
Generated by
1.18.0