Added OS API to display message boxes

This commit is contained in:
antopilo
2025-03-30 20:00:29 -04:00
parent 68519dc28b
commit 9dba0d2f4b
2 changed files with 8 additions and 0 deletions

View File

@@ -50,6 +50,13 @@ namespace Nuake {
return static_cast<int>(std::chrono::system_clock::now().time_since_epoch().count());
}
void OS::ShowMessageBox(const std::string& title, const std::string& message)
{
#ifdef NK_WIN
::MessageBoxA(nullptr, message.c_str(), title.c_str(), MB_OK);
#endif
}
void OS::OpenIn(const std::string& filePath)
{
#ifdef NK_WIN

View File

@@ -11,6 +11,7 @@ namespace Nuake
static void CopyToClipboard(const std::string& value);
static std::string GetFromClipboard();
static int GetTime();
static void ShowMessageBox(const std::string& title, const std::string& message);
static void OpenIn(const std::string& filePath);
static void ExecuteCommand(const std::string& command);
static int RenameFile(const Ref<File>& file, const std::string& newName);