mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Refactored Achievement Badges into Texture Layers
Achievement badges/icons are refactored into the type CustomTextureData::ArraySlice::Level as that is the data type images loaded from the filesystem will be. This includes everything that uses the badges in the Qt UI and OnScreenDisplay, and similarly removes the OSD::Icon type because Level already contains that information.
This commit is contained in:
@ -10,6 +10,8 @@
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
#include "VideoCommon/Assets/CustomTextureData.h"
|
||||
|
||||
namespace OSD
|
||||
{
|
||||
enum class MessageType
|
||||
@ -37,18 +39,12 @@ 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,
|
||||
std::unique_ptr<Icon> icon = nullptr);
|
||||
const VideoCommon::CustomTextureData::ArraySlice::Level* icon = nullptr);
|
||||
void AddTypedMessage(MessageType type, std::string message, u32 ms = Duration::SHORT,
|
||||
u32 argb = Color::YELLOW, std::unique_ptr<Icon> icon = nullptr);
|
||||
u32 argb = Color::YELLOW,
|
||||
const VideoCommon::CustomTextureData::ArraySlice::Level* icon = nullptr);
|
||||
|
||||
// Draw the current messages on the screen. Only call once per frame.
|
||||
void DrawMessages();
|
||||
|
Reference in New Issue
Block a user