本文整理汇总了C++中gd::PlatformExtension::AddEvent方法的典型用法代码示例。如果您正苦于以下问题:C++ PlatformExtension::AddEvent方法的具体用法?C++ PlatformExtension::AddEvent怎么用?C++ PlatformExtension::AddEvent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gd::PlatformExtension
的用法示例。
在下文中一共展示了PlatformExtension::AddEvent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ImplementsCommonInstructionsExtension
void GD_CORE_API BuiltinExtensionsImplementer::ImplementsCommonInstructionsExtension(gd::PlatformExtension & extension)
{
extension.SetExtensionInformation("BuiltinCommonInstructions",
_("Standard events"),
_("Built-in extension providing standard events."),
"Florian Rival",
"Open source (MIT License)");
#if defined(GD_IDE_ONLY)
extension.AddCondition("Or",
_("Or"),
_("Return true if one of the sub conditions is true"),
_("If one of these conditions is true:"),
_("Advanced"),
"res/conditions/or24.png",
"res/conditions/or.png")
.SetCanHaveSubInstructions()
.MarkAsAdvanced();
extension.AddCondition("And",
_("And"),
_("Return true if all sub conditions are true"),
_("If all of these conditions are true:"),
_("Advanced"),
"res/conditions/and24.png",
"res/conditions/and.png")
.SetCanHaveSubInstructions()
.MarkAsAdvanced();
extension.AddCondition("Not",
_("Not"),
_("Return the contrary of the result of the sub conditions"),
_("Invert the logical result of these conditions:"),
_("Advanced"),
"res/conditions/not24.png",
"res/conditions/not.png")
.SetCanHaveSubInstructions()
.MarkAsAdvanced();
extension.AddCondition("Once",
_("Trigger once while true"),
_("Run actions only once, for each time the conditions have been met."),
_("Trigger once"),
_("Advanced"),
"res/conditions/once24.png",
"res/conditions/once.png");
extension.AddEvent("Standard", _("Standard event"),
_("Standard event: Actions are run if conditions are fulfilled."),
"", "res/eventaddicon.png",
std::make_shared<gd::StandardEvent>());
extension.AddEvent("Link", _("Link"),
_("Link to some external events"),
"", "res/lienaddicon.png",
std::make_shared<gd::LinkEvent>());
extension.AddEvent("Comment", _("Comment"),
_("Event displaying a text in the events editor"),
"", "res/comment.png",
std::make_shared<gd::CommentEvent>());
extension.AddEvent("While", _("While"),
_("The event is repeated while the conditions are true"),
"", "res/while.png",
std::make_shared<gd::WhileEvent>());
extension.AddEvent("Repeat", _("Repeat"),
_("Event repeated a number of times"),
"", "res/repeat.png",
std::make_shared<gd::RepeatEvent>());
extension.AddEvent("ForEach", _("For each object"),
_("Repeat the event for each specified object."),
"", "res/foreach.png",
std::make_shared<gd::ForEachEvent>());
extension.AddEvent("Group", _("Group"),
_("Group containing events"),
"", "res/foreach.png",
std::make_shared<gd::GroupEvent>());
#endif
}