1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 22:34:33 +01:00

Add plugin API for showing an error message (#11706)

This commit is contained in:
Ted John
2020-05-10 18:06:31 +01:00
committed by GitHub
parent 5288caec02
commit ec06a9ca4b
2 changed files with 13 additions and 0 deletions

View File

@@ -181,6 +181,11 @@ namespace OpenRCT2::Scripting
return {};
}
void showError(const std::string& title, const std::string& message)
{
window_error_open(title, message);
}
void showTextInput(const DukValue& desc)
{
try
@@ -230,6 +235,7 @@ namespace OpenRCT2::Scripting
dukglue_register_method(ctx, &ScUi::closeWindows, "closeWindows");
dukglue_register_method(ctx, &ScUi::closeAllWindows, "closeAllWindows");
dukglue_register_method(ctx, &ScUi::getWindow, "getWindow");
dukglue_register_method(ctx, &ScUi::showError, "showError");
dukglue_register_method(ctx, &ScUi::showTextInput, "showTextInput");
dukglue_register_method(ctx, &ScUi::activateTool, "activateTool");
dukglue_register_method(ctx, &ScUi::registerMenuItem, "registerMenuItem");