mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
VideoCommon: Add support for icons in OSD messages.
This commit is contained in:
@ -4,7 +4,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
@ -35,10 +37,18 @@ constexpr u32 NORMAL = 5000;
|
||||
constexpr u32 VERY_LONG = 10000;
|
||||
}; // namespace Duration
|
||||
|
||||
struct Icon
|
||||
{
|
||||
std::vector<u8> rgba_data;
|
||||
u32 width = 0;
|
||||
u32 height = 0;
|
||||
}; // struct Icon
|
||||
|
||||
// On-screen message display (colored yellow by default)
|
||||
void AddMessage(std::string message, u32 ms = Duration::SHORT, u32 argb = Color::YELLOW);
|
||||
void AddMessage(std::string message, u32 ms = Duration::SHORT, u32 argb = Color::YELLOW,
|
||||
std::unique_ptr<Icon> icon = nullptr);
|
||||
void AddTypedMessage(MessageType type, std::string message, u32 ms = Duration::SHORT,
|
||||
u32 argb = Color::YELLOW);
|
||||
u32 argb = Color::YELLOW, std::unique_ptr<Icon> icon = nullptr);
|
||||
|
||||
// Draw the current messages on the screen. Only call once per frame.
|
||||
void DrawMessages();
|
||||
|
Reference in New Issue
Block a user