Debian Codegraph @

Source/Core/VideoCommon/OnScreenDisplay.h

raw symbols SCIP
1 // Copyright 2008 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <functional>
7 #include <memory>
8 #include <string>
9 #include <vector>
10
11 #include "Common/CommonTypes.h"
12
13 #include "VideoCommon/Assets/CustomTextureData.h"
14
15 namespace OSD
16 {
17 enum class MessageType
18 {
19 NetPlayPing,
20 NetPlayBuffer,
21
22 // This entry must be kept last so that persistent typed messages are
23 // displayed before other messages
24 Typeless,
25 };
26
27 namespace Color
28 {
29 constexpr u32 CYAN = 0xFF00FFFF;
30 constexpr u32 GREEN = 0xFF00FF00;
31 constexpr u32 RED = 0xFFFF0000;
32 constexpr u32 YELLOW = 0xFFFFFF30;
33 } // namespace Color
34
35 namespace Duration
36 {
37 constexpr u32 SHORT = 2000;
38 constexpr u32 NORMAL = 5000;
39 constexpr u32 VERY_LONG = 10000;
40 } // namespace Duration
41
42 // On-screen message display (colored yellow by default)
43 void AddMessage(std::string message, u32 ms = Duration::SHORT, u32 argb = Color::YELLOW,
44 const VideoCommon::CustomTextureData::ArraySlice::Level* icon = nullptr);
45 void AddTypedMessage(MessageType type, std::string message, u32 ms = Duration::SHORT,
46 u32 argb = Color::YELLOW,
47 const VideoCommon::CustomTextureData::ArraySlice::Level* icon = nullptr);
48
49 // Draw the current messages on the screen. Only call once per frame.
50 void DrawMessages();
51 void ClearMessages();
52
53 void SetObscuredPixelsLeft(int width);
54 void SetObscuredPixelsTop(int height);
55 } // namespace OSD