System: OSD message corrections
This commit is contained in:
@ -708,29 +708,11 @@ void Host::AddKeyedOSDMessage(std::string key, std::string message, float durati
|
||||
ImGuiManager::s_osd_posted_messages.push_back(std::move(msg));
|
||||
}
|
||||
|
||||
void Host::AddFormattedOSDMessage(float duration, const char* format, ...)
|
||||
{
|
||||
std::va_list ap;
|
||||
va_start(ap, format);
|
||||
std::string ret = StringUtil::StdStringFromFormatV(format, ap);
|
||||
va_end(ap);
|
||||
return AddKeyedOSDMessage(std::string(), std::move(ret), duration);
|
||||
}
|
||||
|
||||
void Host::AddIconOSDMessage(std::string key, const char* icon, std::string message, float duration /* = 2.0f */)
|
||||
{
|
||||
return AddKeyedOSDMessage(std::move(key), fmt::format("{} {}", icon, message), duration);
|
||||
}
|
||||
|
||||
void Host::AddKeyedFormattedOSDMessage(std::string key, float duration, const char* format, ...)
|
||||
{
|
||||
std::va_list ap;
|
||||
va_start(ap, format);
|
||||
std::string ret = StringUtil::StdStringFromFormatV(format, ap);
|
||||
va_end(ap);
|
||||
return AddKeyedOSDMessage(std::move(key), std::move(ret), duration);
|
||||
}
|
||||
|
||||
void Host::RemoveKeyedOSDMessage(std::string key)
|
||||
{
|
||||
if (!ImGuiManager::s_show_osd_messages)
|
||||
|
||||
@ -126,8 +126,6 @@ float GetOSDScale();
|
||||
void AddOSDMessage(std::string message, float duration = 2.0f);
|
||||
void AddKeyedOSDMessage(std::string key, std::string message, float duration = 2.0f);
|
||||
void AddIconOSDMessage(std::string key, const char* icon, std::string message, float duration = 2.0f);
|
||||
void AddFormattedOSDMessage(float duration, const char* format, ...);
|
||||
void AddKeyedFormattedOSDMessage(std::string key, float duration, const char* format, ...);
|
||||
void RemoveKeyedOSDMessage(std::string key);
|
||||
void ClearOSDMessages();
|
||||
} // namespace Host
|
||||
|
||||
Reference in New Issue
Block a user