Files
VoxelEngine/src/graphics/ui/gui_util.hpp
T
MihailRisandGitHub 24931770d3 fix warnings (#648)
* fix unknown command line argument

* fix warnings settings for gcc

* fix -Wzero-as-null-pointer-constant

* revert CMakeLists.txt
2025-10-10 23:12:01 +03:00

47 lines
1.0 KiB
C++

#pragma once
#include <memory>
#include <string>
#include "delegates.hpp"
#include "typedefs.hpp"
class Engine;
namespace gui {
class GUI;
class UINode;
}
namespace guiutil {
/// @brief Create element from XML
/// @param source XML
std::shared_ptr<gui::UINode> create(
gui::GUI& gui, const std::string& source, scriptenv env = nullptr
);
void alert(
Engine& engine,
const std::wstring& text,
const runnable& on_hidden = nullptr
);
void confirm(
Engine& engine,
const std::wstring& text,
const runnable& on_confirm = nullptr,
const runnable& on_deny = nullptr,
std::wstring yestext = L"",
std::wstring notext = L""
);
void confirm_with_memo(
Engine& engine,
const std::wstring& text,
const std::wstring& memo,
const runnable& on_confirm = nullptr,
std::wstring yestext = L"",
std::wstring notext = L""
);
}