mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-14 19:45:47 -04:00
HostInterface: Add a ConfirmMessage() method
This commit is contained in:
@ -160,6 +160,12 @@ void HostInterface::ReportMessage(const char* message)
|
||||
Log_InfoPrintf(message);
|
||||
}
|
||||
|
||||
bool HostInterface::ConfirmMessage(const char* message)
|
||||
{
|
||||
Log_WarningPrintf("ConfirmMessage(\"%s\") -> Yes");
|
||||
return true;
|
||||
}
|
||||
|
||||
void HostInterface::ReportFormattedError(const char* format, ...)
|
||||
{
|
||||
std::va_list ap;
|
||||
@ -180,6 +186,16 @@ void HostInterface::ReportFormattedMessage(const char* format, ...)
|
||||
ReportMessage(message.c_str());
|
||||
}
|
||||
|
||||
bool HostInterface::ConfirmFormattedMessage(const char* format, ...)
|
||||
{
|
||||
std::va_list ap;
|
||||
va_start(ap, format);
|
||||
std::string message = StringUtil::StdStringFromFormatV(format, ap);
|
||||
va_end(ap);
|
||||
|
||||
return ConfirmMessage(message.c_str());
|
||||
}
|
||||
|
||||
void HostInterface::DrawFPSWindow()
|
||||
{
|
||||
const bool show_fps = true;
|
||||
|
@ -68,9 +68,11 @@ public:
|
||||
|
||||
virtual void ReportError(const char* message);
|
||||
virtual void ReportMessage(const char* message);
|
||||
virtual bool ConfirmMessage(const char* message);
|
||||
|
||||
void ReportFormattedError(const char* format, ...);
|
||||
void ReportFormattedMessage(const char* format, ...);
|
||||
bool ConfirmFormattedMessage(const char* format, ...);
|
||||
|
||||
/// Adds OSD messages, duration is in seconds.
|
||||
void AddOSDMessage(const char* message, float duration = 2.0f);
|
||||
|
Reference in New Issue
Block a user