mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Renderer: Use imgui for drawing debug text and OSD
This commit is contained in:
@ -11,15 +11,6 @@
|
||||
|
||||
namespace OSD
|
||||
{
|
||||
struct Message
|
||||
{
|
||||
Message() {}
|
||||
Message(const std::string& s, u32 ts, u32 rgba) : m_str(s), m_timestamp(ts), m_rgba(rgba) {}
|
||||
std::string m_str;
|
||||
u32 m_timestamp;
|
||||
u32 m_rgba;
|
||||
};
|
||||
|
||||
enum class MessageType
|
||||
{
|
||||
NetPlayPing,
|
||||
@ -49,20 +40,7 @@ constexpr u32 VERY_LONG = 10000;
|
||||
void AddMessage(const std::string& message, u32 ms = Duration::SHORT, u32 rgba = Color::YELLOW);
|
||||
void AddTypedMessage(MessageType type, const std::string& message, u32 ms = Duration::SHORT,
|
||||
u32 rgba = Color::YELLOW);
|
||||
void DrawMessage(const Message& msg, int top, int left, int time_left); // draw one message
|
||||
void DrawMessages(); // draw the current messages on the screen. Only call once
|
||||
// per frame.
|
||||
void ClearMessages();
|
||||
|
||||
// On-screen callbacks
|
||||
enum class CallbackType
|
||||
{
|
||||
Initialization,
|
||||
OnFrame,
|
||||
Shutdown
|
||||
};
|
||||
using Callback = std::function<void()>;
|
||||
|
||||
void AddCallback(CallbackType type, Callback cb);
|
||||
void DoCallbacks(CallbackType type);
|
||||
} // namespace OSD
|
||||
|
Reference in New Issue
Block a user