mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-08-25 12:23:58 -04:00
49 lines
1.7 KiB
C++
49 lines
1.7 KiB
C++
/*
|
|
* GDevelop Core
|
|
* Copyright 2008-2016 Florian Rival (Florian.Rival@gmail.com). All rights
|
|
* reserved. This project is released under the MIT License.
|
|
*/
|
|
#include "AllBuiltinExtensions.h"
|
|
#include "GDCore/Events/Builtin/AsyncEvent.h"
|
|
#include "GDCore/Tools/Localization.h"
|
|
|
|
using namespace std;
|
|
namespace gd {
|
|
|
|
void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAsyncExtension(
|
|
gd::PlatformExtension &extension) {
|
|
extension
|
|
.SetExtensionInformation(
|
|
"BuiltinAsync",
|
|
_("Asynchronous functions"),
|
|
_("Functions that defer the execution of the events after it."),
|
|
"Arthur Pacaud (arthuro555)",
|
|
"Open source (MIT License)")
|
|
.SetShortDescription("Asynchronous tasks that pause sub-event execution until resolved.")
|
|
.SetCategory("Advanced");
|
|
extension.AddInstructionOrExpressionGroupMetadata(_("Asynchronous functions"))
|
|
.SetIcon("res/functions/action_black.svg");
|
|
|
|
extension.AddEvent("Async",
|
|
_("Async event"),
|
|
_("Internal event for asynchronous actions"),
|
|
"",
|
|
"res/eventaddicon.png",
|
|
std::make_shared<gd::AsyncEvent>());
|
|
|
|
extension
|
|
.AddAction(
|
|
"ResolveAsyncEventsFunction",
|
|
_("End asynchronous function"),
|
|
_("Mark an asynchronous function as finished. This will allow the "
|
|
"actions and subevents following it to be run."),
|
|
"Mark asynchronous function as ended",
|
|
"",
|
|
"res/actions/quit24.png",
|
|
"res/actions/quit.png")
|
|
.AddCodeOnlyParameter("eventsFunctionContext", "")
|
|
.SetRelevantForAsynchronousFunctionEventsOnly();
|
|
}
|
|
|
|
} // namespace gd
|