| 1 |
|
| 2 |
|
| 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 |
|
| 23 |
|
| 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 |
} |
| 34 |
|
| 35 |
namespace Duration |
| 36 |
{ |
| 37 |
constexpr u32 SHORT = 2000; |
| 38 |
constexpr u32 NORMAL = 5000; |
| 39 |
constexpr u32 VERY_LONG = 10000; |
| 40 |
} |
| 41 |
|
| 42 |
|
| 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 |
|
| 50 |
void DrawMessages(); |
| 51 |
void ClearMessages(); |
| 52 |
|
| 53 |
void SetObscuredPixelsLeft(int width); |
| 54 |
void SetObscuredPixelsTop(int height); |
| 55 |
} |