-
Notifications
You must be signed in to change notification settings - Fork 1
/
SpeakerList.h
49 lines (36 loc) · 1.29 KB
/
SpeakerList.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//
// by Weikton 05.09.23
//
#pragma once
#include "gui/gui.h"
#include "Stream.h"
class SpeakerList {
friend class CGUI;
SpeakerList() = delete;
~SpeakerList() = delete;
SpeakerList(const SpeakerList&) = delete;
SpeakerList(SpeakerList&&) = delete;
SpeakerList& operator=(const SpeakerList&) = delete;
SpeakerList& operator=(SpeakerList&&) = delete;
public:
static bool Init() noexcept;
static void Free() noexcept;
static void Show() noexcept;
static bool IsShowed() noexcept;
static void Hide() noexcept;
static void Render();
static void Draw(VECTOR* vec, float fDist);
static float GetSpeakerIconScale() noexcept;
static void SetSpeakerIconScale(float speakerIconScale) noexcept;
static void SyncConfigs() noexcept;
static void ResetConfigs() noexcept;
public:
static void OnSpeakerPlay(const Stream& stream, uint16_t speaker) noexcept;
static void OnSpeakerStop(const Stream& stream, uint16_t speaker) noexcept;
private:
static bool initStatus;
static bool showStatus;
static RwTexture* tSpeakerIcon;
static std::array<std::unordered_map<Stream*, StreamInfo>, MAX_PLAYERS> playerStreams;
static std::array<const Stream*, MAX_PLAYERS> playerStream;
};