2015-05-23 22:55:12 -06:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 17:08:10 -06:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 21:09:55 -06:00
|
|
|
// Refer to the license.txt file included.
|
2009-02-22 23:17:57 -07:00
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2009-02-22 23:17:57 -07:00
|
|
|
|
2013-08-23 18:13:54 -06:00
|
|
|
#include <functional>
|
2013-08-23 17:41:17 -06:00
|
|
|
#include <string>
|
|
|
|
|
2014-10-21 00:01:38 -06:00
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
2013-08-23 17:41:17 -06:00
|
|
|
namespace OSD
|
2009-02-22 23:17:57 -07:00
|
|
|
{
|
2015-01-01 11:23:34 -07:00
|
|
|
// On-screen message display (colored yellow by default)
|
|
|
|
void AddMessage(const std::string& str, u32 ms = 2000, u32 rgba = 0xFFFFFF30);
|
2009-02-22 23:17:57 -07:00
|
|
|
void DrawMessages(); // draw the current messages on the screen. Only call once per frame.
|
2011-02-01 21:40:27 -07:00
|
|
|
void ClearMessages();
|
2009-02-22 23:17:57 -07:00
|
|
|
|
2013-04-12 23:48:53 -06:00
|
|
|
// On-screen callbacks
|
2016-01-02 12:45:41 -07:00
|
|
|
enum class CallbackType
|
2013-04-12 23:48:53 -06:00
|
|
|
{
|
2016-01-02 12:45:41 -07:00
|
|
|
Initialization,
|
|
|
|
OnFrame,
|
|
|
|
Shutdown
|
2013-04-12 23:48:53 -06:00
|
|
|
};
|
2016-01-02 12:45:41 -07:00
|
|
|
using Callback = std::function<void()>;
|
2013-04-12 23:48:53 -06:00
|
|
|
|
2013-08-23 18:13:54 -06:00
|
|
|
void AddCallback(CallbackType type, Callback cb);
|
|
|
|
void DoCallbacks(CallbackType type);
|
|
|
|
} // namespace OSD
|