TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
gui_layered_fade.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <cstdint>
6#include <memory>
7#include <span>
8#include <unordered_map>
9
10namespace tachyon
11{
14
20 {
21 public:
24 LayeredFades(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}
LayeredFades & operator=(const LayeredFades &)=delete
void Move(uint32_t fade, IntRect screenRect, float opacity)
Moves a stand-in and sets its opacity.
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...
void End(uint32_t fade)
Removes a stand-in; 0 and unknown ones are ignored.
LayeredFades(const LayeredFades &)=delete
size_t Count() const
How many are shown.
Definition gui_logging.h:24
Definition gui_base_types.h:407
Integer 2D vector.
Definition gui_base_types.h:19