コード例 #1
0
ファイル: Extension.cpp プロジェクト: AntonioModer/GD
void DeclareTextObjectExtension(gd::PlatformExtension & extension)
{
    extension.SetExtensionInformation("TextObject",
                          _("Text object"),
                          _("Extension allowing to use an object displaying a text."),
                          "Florian Rival",
                          "Open source (MIT License)");

    gd::ObjectMetadata & obj = extension.AddObject("Text",
               _("Text"),
               _("Displays a text"),
               "CppPlatform/Extensions/texticon.png",
               &CreateTextObject);

    #if defined(GD_IDE_ONLY)
    obj.SetIncludeFile("TextObject/TextObject.h");

    obj.AddAction("String",
                   _("Modify the text"),
                   _("Modify the text of a Text object."),
                   _("Do _PARAM1__PARAM2_ to the text of _PARAM0_"),
                   "",
                   "res/actions/text24.png",
                   "res/actions/text.png")
        .AddParameter("object", _("Object"), "Text", false)
        .AddParameter("operator", _("Modification's sign"))
        .AddParameter("string", _("Text"))
        .SetFunctionName("SetString").SetManipulatedType("string").SetGetter("GetString").SetIncludeFile("TextObject/TextObject.h");

    obj.AddCondition("String",
                   _("Compare the text"),
                   _("Compare the text of a Text object."),
                   _("Text of _PARAM0_ is _PARAM1__PARAM2_"),
                   "",
                   "res/conditions/text24.png",
                   "res/conditions/text.png")
        .AddParameter("object", _("Object"), "Text", false)
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("string", _("Text to test"))
        .SetFunctionName("GetString").SetManipulatedType("string").SetIncludeFile("TextObject/TextObject.h");

    obj.AddAction("Font",
                   _("Font"),
                   _("Modify the font of the text."),
                   _("Change font of _PARAM0_ to _PARAM1_"),
                   _("Font"),
                   "res/actions/font24.png",
                   "res/actions/font.png")
        .AddParameter("object", _("Object"), "Text", false)
        .AddParameter("police", _("Font"))
        .SetFunctionName("ChangeFont").SetIncludeFile("TextObject/TextObject.h");

    obj.AddAction("Size",
                   _("Size"),
                   _("Modify the size of the text."),
                   _("Do _PARAM1__PARAM2_ to the size of the text of _PARAM0_"),
                   "",
                   "res/actions/characterSize24.png",
                   "res/actions/characterSize.png")
        .AddParameter("object", _("Object"), "Text", false)
        .AddParameter("operator", _("Modification's sign"))
        .AddParameter("expression", _("Value"))
        .SetFunctionName("SetCharacterSize").SetManipulatedType("number").SetGetter("GetCharacterSize").SetIncludeFile("TextObject/TextObject.h");

    obj.AddCondition("Size",
                   _("Size"),
                   _("Test the size of the text"),
                   _("The size of the text of _PARAM0_ is _PARAM1__PARAM2_"),
                   "",
                   "res/conditions/characterSize24.png",
                   "res/conditions/characterSize.png")
        .AddParameter("object", _("Object"), "Text", false)
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("expression", _("Size to test"))
        .SetFunctionName("GetCharacterSize").SetManipulatedType("number").SetIncludeFile("TextObject/TextObject.h");

    obj.AddAction("ChangeColor",
                   _("Color"),
                   _("Change the color of the text. The color is white by default."),
                   _("Change color of _PARAM0_ to _PARAM1_"),
                   _("Effects"),
                   "res/actions/color24.png",
                   "res/actions/color.png")
        .AddParameter("object", _("Object"), "Text", false)
        .AddParameter("color", _("Color"))
        .SetFunctionName("SetColor").SetIncludeFile("TextObject/TextObject.h");

    obj.AddAction("Opacity",
                   _("Opacity"),
                   _("Modify the opacity of a Text object."),
                   _("Do _PARAM1__PARAM2_ to the opacity of _PARAM0_"),
                   "",
                   "res/actions/opacity24.png",
                   "res/actions/opacity.png")
        .AddParameter("object", _("Object"), "Text", false)
        .AddParameter("operator", _("Modification's sign"))
        .AddParameter("expression", _("Value"))
        .SetFunctionName("SetOpacity").SetManipulatedType("number").SetGetter("GetOpacity").SetIncludeFile("TextObject/TextObject.h");

    obj.AddCondition("Opacity",
                   _("Opacity"),
                   _("Test the value of the opacity of a text object."),
                   _("The opacity of _PARAM0_ is _PARAM1__PARAM2_"),
                   "",
                   "res/conditions/opacity24.png",
                   "res/conditions/opacity.png")
        .AddParameter("object", _("Object"), "Text", false)
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("expression", _("Value to test"))
        .SetFunctionName("GetOpacity").SetManipulatedType("number").SetIncludeFile("TextObject/TextObject.h");



    obj.AddAction("SetSmooth",
                   _("Smoothing"),
                   _("Activate or desactivate text smoothing."),
                   _("Smooth _PARAM0_: _PARAM1_"),
                   _("Style"),
                   "res/actions/opacity24.png",
                   "res/actions/opacity.png")
        .AddParameter("object", _("Object"), "Text", false)
        .AddParameter("yesorno", _("Smooth the text"))
        .SetFunctionName("SetSmooth").SetIncludeFile("TextObject/TextObject.h");

    obj.AddCondition("Smoothed",
                   _("Smoothing"),
                   _("Test if an object is smoothed"),
                   _("_PARAM0_ is smoothed"),
                   _("Style"),
                   "res/conditions/opacity24.png",
                   "res/conditions/opacity.png")
        .AddParameter("object", _("Object"), "Text", false)
        .SetFunctionName("IsSmoothed").SetIncludeFile("TextObject/TextObject.h");

    obj.AddAction("SetBold",
                   _("Bold"),
                   _("De/activate bold"),
                   _("Set bold style of _PARAM0_ : _PARAM1_"),
                   _("Style"),
                   "res/actions/bold.png",
                   "res/actions/bold16.png")
        .AddParameter("object", _("Object"), "Text", false)
        .AddParameter("yesorno", _("Set bold style"))
        .SetFunctionName("SetBold").SetIncludeFile("TextObject/TextObject.h");

    obj.AddCondition("IsBold",
                   _("Bold"),
                   _("Test if bold style is activated"),
                   _("_PARAM0_ bold style is set"),
                   _("Style"),
                   "res/conditions/bold.png",
                   "res/conditions/bold16.png")
        .AddParameter("object", _("Object"), "Text", false)
        .SetFunctionName("IsBold").SetIncludeFile("TextObject/TextObject.h");

    obj.AddAction("SetItalic",
                   _("Italic"),
                   _("De/activate italic."),
                   _("Set italic style for _PARAM0_ : _PARAM1_"),
                   _("Style"),
                   "res/actions/italic.png",
                   "res/actions/italic16.png")
        .AddParameter("object", _("Object"), "Text", false)
        .AddParameter("yesorno", _("Set italic"))
        .SetFunctionName("SetItalic").SetIncludeFile("TextObject/TextObject.h");

    obj.AddCondition("IsItalic",
                   _("Italic"),
                   _("Test if the italic style is activated"),
                   _("_PARAM0_ italic style is set"),
                   _("Style"),
                   "res/conditions/italic.png",
                   "res/conditions/italic16.png")
        .AddParameter("object", _("Object"), "Text", false)
        .SetFunctionName("IsItalic").SetIncludeFile("TextObject/TextObject.h");

    obj.AddAction("SetUnderlined",
                   _("Underlined"),
                   _("De/activate underlined style."),
                   _("Set underlined style of _PARAM0_: _PARAM1_"),
                   _("Style"),
                   "res/actions/underline.png",
                   "res/actions/underline16.png")
        .AddParameter("object", _("Object"), "Text", false)
        .AddParameter("yesorno", _("Underline"))
        .SetFunctionName("SetUnderlined").SetIncludeFile("TextObject/TextObject.h");

    obj.AddCondition("IsUnderlined",
                   _("Underlined"),
                   _("Test if the underlined style of an object is set."),
                   _("_PARAM0_ underlined style is activated"),
                   _("Style"),
                   "res/conditions/underline.png",
                   "res/conditions/underline16.png")
        .AddParameter("object", _("Object"), "Text", false)
        .SetFunctionName("IsUnderlined").SetIncludeFile("TextObject/TextObject.h");

    obj.AddAction("Angle",
                   _("Angle"),
                   _("Modify the angle of a Text object."),
                   _("Do _PARAM1__PARAM2_ to the angle of _PARAM0_"),
                   _("Rotation"),
                   "res/actions/rotate24.png",
                   "res/actions/rotate.png")
        .SetHidden() //Deprecated, now available for all objects
        .AddParameter("object", _("Object"), "Text", false)
        .AddParameter("operator", _("Modification's sign"))
        .AddParameter("expression", _("Value"))
        .SetFunctionName("SetAngle").SetManipulatedType("number").SetGetter("GetAngle").SetIncludeFile("TextObject/TextObject.h");

    obj.AddCondition("Angle",
                   _("Angle"),
                   _("Test the value of the angle of a text object."),
                   _("The angle of _PARAM0_ is _PARAM1__PARAM2_"),
                   _("Rotation"),
                   "res/conditions/rotate24.png",
                   "res/conditions/rotate.png")
        .SetHidden() //Deprecated, now available for all objects
        .AddParameter("object", _("Object"), "Text", false)
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("expression", _("Value to test"))
        .SetFunctionName("GetAngle").SetManipulatedType("number").SetIncludeFile("TextObject/TextObject.h");

    obj.AddExpression("Opacity", _("Opacity"), _("Opacity"), _("Opacity"), "res/actions/opacity.png")
        .AddParameter("object", _("Object"), "Text", false)
        .SetFunctionName("GetOpacity").SetIncludeFile("TextObject/TextObject.h");

    obj.AddExpression("Angle", _("Angle"), _("Angle"), _("Rotation"), "res/actions/rotate.png")
        .SetHidden() //Deprecated, now available for all objects
        .AddParameter("object", _("Object"), "Text", false)
        .SetFunctionName("GetAngle").SetIncludeFile("TextObject/TextObject.h");

    obj.AddStrExpression("String", _("Text"), _("Text"), _("Text"), "res/texteicon.png")
        .AddParameter("object", _("Object"), "Text", false)
        .SetFunctionName("GetString").SetIncludeFile("TextObject/TextObject.h");
    #endif
}
コード例 #2
0
void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSpriteExtension(gd::PlatformExtension & extension)
{
    extension.SetExtensionInformation("Sprite",
                          _("Sprite"),
                          _("Extension for adding animated objects in the scene, which can contain animations with directions within each."),
                          "Florian Rival",
                          "Open source (MIT License)");

    gd::ObjectMetadata & obj = extension.AddObject("Sprite",
               _("Sprite"),
               _("Animated object which can be used for most elements of a game"),
               "CppPlatform/Extensions/spriteicon.png",
               &CreateSpriteObject);

    #if defined(GD_IDE_ONLY)
    obj.AddAction("Opacity",
                   _("Change object's opacity"),
                   _("Change the opacity of an object."),
                   _("Do _PARAM1__PARAM2_ to the opacity of _PARAM0_"),
                   _("Visibility"),
                   "res/actions/opacity24.png",
                   "res/actions/opacity.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("operator", _("Modification's sign"))
        .AddParameter("expression", _("Value"))
        .MarkAsSimple()
        .SetManipulatedType("number");

    obj.AddAction("ChangeAnimation",
                   _("Change the animation"),
                   _("Modify the current animation of the object."),
                   _("Do _PARAM1__PARAM2_ to the number of current animation of _PARAM0_"),
                   _("Animations and images"),
                   "res/actions/animation24.png",
                   "res/actions/animation.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("operator", _("Modification's sign"))
        .AddParameter("expression", _("Value"))
        .MarkAsSimple()
        .SetManipulatedType("number");

    obj.AddAction("ChangeDirection",
                   _("Change the direction"),
                   _("Change the direction of the object.\nIf the object is set to automatically rotate, the direction is its angle.\nIf the object is in 8 directions mode, the valid directions are 0..7"),
                   _("Do _PARAM1__PARAM2_ to the direction of _PARAM0_"),
                   _("Direction"),
                   "res/actions/direction24.png",
                   "res/actions/direction.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("operator", _("Modification's sign"))
        .AddParameter("expression", _("Value"))
        .MarkAsAdvanced()
        .SetManipulatedType("number");


    obj.AddAction("ChangeSprite",
                   _("Current frame"),
                   _("Modify the current frame of the object"),
                   _("Do _PARAM1__PARAM2_ to animation frame of _PARAM0_"),
                   _("Animations and images"),
                   "res/actions/sprite24.png",
                   "res/actions/sprite.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("operator", _("Modification's sign"))
        .AddParameter("expression", _("Value"))
        .MarkAsAdvanced()
        .SetManipulatedType("number");

    obj.AddAction("PauseAnimation",
                   _("Pause the animation"),
                   _("Pause the current animation of the object"),
                   _("Pause the current animation of _PARAM0_"),
                   _("Animations and images"),
                   "res/actions/animation24.png",
                   "res/actions/animation.png")

        .AddParameter("object", _("Object"), "Sprite")
        .MarkAsSimple();


    obj.AddAction("PlayAnimation",
                   _("Play the animation"),
                   _("Play the current animation of the object"),
                   _("Play the current animation of _PARAM0_"),
                   _("Animations and images"),
                   "res/actions/animation24.png",
                   "res/actions/animation.png")

        .AddParameter("object", _("Object"), "Sprite")
        .MarkAsSimple();

    obj.AddAction("ChangeAnimationSpeedScale",
                   _("Animation speed scale"),
                   _("Modify the animation speed scale (1 = the default speed, >1 = faster and <1 = slower)."),
                   _("Do _PARAM1__PARAM2_ to the animation speed scale of _PARAM0_"),
                   _("Animations and images"),
                   "res/actions/animation24.png",
                   "res/actions/animation.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("operator", _("Modification's sign"))
        .AddParameter("expression", _("Value"))
        .MarkAsSimple()
        .SetManipulatedType("number");

    obj.AddAction("TourneVersPos",
                   _("Rotate an object toward a position"),
                   _("Rotate an object towards a position."),
                   _("Rotate _PARAM0_ towards _PARAM1_;_PARAM2_"),
                   _("Direction"),
                   "res/actions/direction24.png",
                   "res/actions/direction.png")

        .AddParameter("object", _("Object to be rotated"), "Sprite")
        .AddParameter("expression", _("X position"))
        .AddParameter("expression", _("Y position"))
        .AddParameter("expression", _("Angular speed (degrees per second)")).SetDefaultValue("0")
        .AddCodeOnlyParameter("currentScene", "")
        .SetHidden(); //Deprecated


    obj.AddAction("ChangeScale",
                   _("Scale"),
                   _("Modify the scale of the specified object."),
                   _("Do _PARAM1__PARAM2_ to the scale of _PARAM0_"),
                   _("Size"),
                   "res/actions/scale24.png",
                   "res/actions/scale.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("operator", _("Modification's sign"))
        .AddParameter("expression", _("Value"))
        .MarkAsAdvanced();


    obj.AddAction("ChangeScaleWidth",
                   _("Scale on X axis"),
                   _("Modify the scale of the width of an object."),
                   _("Do _PARAM1__PARAM2_ to the width's scale of _PARAM0_"),
                   _("Size"),
                   "res/actions/scale24.png",
                   "res/actions/scale.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("operator", _("Modification's sign"))
        .AddParameter("expression", _("Value"))
        .MarkAsAdvanced()
        .SetManipulatedType("number");


    obj.AddAction("ChangeScaleHeight",
                   _("Scale on Y axis"),
                   _("Modify the scale of the height of an object."),
                   _("Do _PARAM1__PARAM2_ to the height's scale of _PARAM0_"),
                   _("Size"),
                   "res/actions/scale24.png",
                   "res/actions/scale.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("operator", _("Modification's sign"))
        .AddParameter("expression", _("Value"))
        .MarkAsAdvanced()
        .SetManipulatedType("number");


    obj.AddCondition("Animation",
                   _("Current animation"),
                   _("Test the number of the current animation of the object."),
                   _("The number of the current animation of _PARAM0_ is _PARAM1__PARAM2_"),
                   _("Animations and images"),
                   "res/conditions/animation24.png",
                   "res/conditions/animation.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("expression", _("Number to test"))
        .MarkAsAdvanced()
        .SetManipulatedType("number");

    obj.AddCondition("Direction",
                   _("Current direction"),
                   _("Compare the direction of the object. If 8 direction mode is activated for the sprite, the value taken for direction will be from 0 to 7. Otherwise, the direction is in degrees."),
                   _("Direction of _PARAM0_ is _PARAM1__PARAM2_"),
                   _("Direction"),
                   "res/conditions/direction24.png",
                   "res/conditions/direction.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("expression", _("Direction to test"))
        .SetManipulatedType("number");

    obj.AddCondition("Sprite",
                   _("Current frame"),
                   _("Test the number of the current animation frame."),
                   _("The animation frame of _PARAM0_ is _PARAM1__PARAM2_"),
                   _("Animations and images"),
                   "res/conditions/sprite24.png",
                   "res/conditions/sprite.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("expression", _("Animation frame to test"))
        .MarkAsAdvanced()
        .SetManipulatedType("number");

    obj.AddCondition("AnimStopped",
                   _("Animation paused"),
                   _("Test if the animation of an object is paused"),
                   _("The animation of _PARAM0_ is paused"),
                   _("Animations and images"),
                   "res/conditions/animation24.png",
                   "res/conditions/animation.png")

        .AddParameter("object", _("Object"), "Sprite")
        .MarkAsSimple();

    obj.AddCondition("AnimationEnded",
                   _("Animation finished"),
                   _("Check if the animation being played by the Sprite object is finished."),
                   _("The animation of _PARAM0_ is finished"),
                   _("Animations and images"),
                   "res/conditions/animation24.png",
                   "res/conditions/animation.png")

        .AddParameter("object", _("Object"), "Sprite")
        .MarkAsSimple();

    obj.AddCondition("ScaleWidth",
                   _("Scale on X axis"),
                   _("Compare the scale of the width of an object."),
                   _("The width's scale of _PARAM0_ is _PARAM1__PARAM2_"),
                   _("Size"),
                   "res/conditions/scaleWidth24.png",
                   "res/conditions/scaleWidth.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("expression", _("Value to test"))
        .MarkAsAdvanced()
        .SetManipulatedType("number");

    obj.AddCondition("ScaleHeight",
                   _("Scale on Y axis"),
                   _("Compare the scale of the height of an object."),
                   _("The height's scale of _PARAM0_ is _PARAM1__PARAM2_"),
                   _("Size"),
                   "res/conditions/scaleHeight24.png",
                   "res/conditions/scaleHeight.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("expression", _("Value to test"))
        .MarkAsAdvanced()
        .SetManipulatedType("number");

    obj.AddCondition("Opacity",
                   _("Opacity"),
                   _("Compare the opacity of an object, between 0 (fully transparent) to 255 (opaque)"),
                   _("The opacity of _PARAM0_ is _PARAM1__PARAM2_"),
                   _("Visibility"),
                   "res/conditions/opacity24.png",
                   "res/conditions/opacity.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("expression", _("Value to test"))
        .MarkAsSimple()
        .SetManipulatedType("number");

    obj.AddCondition("BlendMode",
                   _("Blend mode"),
                   _("Compare the number of the blend mode currently used by an object"),
                   _("The number of the current blend mode of _PARAM0_ is _PARAM1__PARAM2_"),
                   _("Effects"),
                   "res/conditions/opacity24.png",
                   "res/conditions/opacity.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("expression", _("Value to test (0: Alpha, 1: Add, 2: Multiply, 3: None)"))
        .MarkAsAdvanced()
        .SetManipulatedType("number");

    obj.AddAction("CopyImageOnImageOfSprite",
                   _("Copy an image on the current one of an object"),
                   _("Copy an image on the current image of an object.\nNote that the source image must be preferably kept loaded in memory."),
                   _("Copy image _PARAM2_ on the current of _PARAM0_ at _PARAM3_;_PARAM4_"),
                   _("Effects"),
                   "res/copy24.png",
                   "res/copyicon.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddCodeOnlyParameter("currentScene", "")
        .AddParameter("string", _("Name of the source image"))
        .AddParameter("expression", _("X position"))
        .AddParameter("expression", _("Y position"))
        .AddParameter("yesorno", _("Should the copy take in account the source transparency\?"));

    obj.AddAction("CreateMaskFromColorOnActualImage", //Actual is indeed a mistake : Current should have been chosen.
                   _("Make a color of the image of an object transparent"),
                   _("Make a color of the image of an object transparent."),
                   _("Make color _PARAM1_ of the current image of _PARAM0_ transparent"),
                   _("Effects"),
                   "res/actions/opacity24.png",
                   "res/actions/opacity.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("color", _("Color to make transparent"));


    obj.AddAction("ChangeColor",
                   _("Global color"),
                   _("Change the global color of an object. The default color is white."),
                   _("Change color of _PARAM0_ to _PARAM1_"),
                   _("Effects"),
                   "res/actions/color24.png",
                   "res/actions/color.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("color", _("Color"));


    obj.AddAction("ChangeBlendMode",
                   _("Blend mode"),
                   _("Change the number of the blend mode of an object.\nThe default blend mode is 0 (Alpha)."),
                   _("Change Blend mode of _PARAM0_ to _PARAM1_"),
                   _("Effects"),
                   "res/actions/color24.png",
                   "res/actions/color.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("expression", _("Mode (0 : Alpha, 1 : Add, 2 : Multiply, 3 : None)"))
        .MarkAsSimple();


    obj.AddAction("FlipX",
                   _("Flip the object horizontally"),
                   _("Flip the object horizontally"),
                   _("Flip horizontally _PARAM0_ : _PARAM1_"),
                   _("Effects"),
                   "res/actions/flipX24.png",
                   "res/actions/flipX.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("yesorno", _("Activate flipping"))
        .MarkAsSimple();


    obj.AddAction("FlipY",
                   _("Flip the object vertically"),
                   _("Flip the object vertically"),
                   _("Flip vertically _PARAM0_ : _PARAM1_"),
                   _("Effects"),
                   "res/actions/flipY24.png",
                   "res/actions/flipY.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("yesorno", _("Activate flipping"))
        .MarkAsSimple();

    obj.AddCondition("FlippedX",
                   _("Horizontally flipped"),
                   _("Return true if the object is horizontally flipped"),
                   _("_PARAM0_ is horizontally flipped"),
                   _("Effects"),
                   "res/actions/flipX24.png",
                   "res/actions/flipX.png")

        .AddParameter("object", _("Object"), "Sprite");

    obj.AddCondition("FlippedY",
                   _("Vertically flipped"),
                   _("Return true if the object is vertically flipped"),
                   _("_PARAM0_ is vertically flipped"),
                   _("Effects"),
                   "res/actions/flipY24.png",
                   "res/actions/flipY.png")

        .AddParameter("object", _("Object"), "Sprite");

    obj.AddAction("TourneVers",
                   _("Rotate an object toward another"),
                   _("Rotate an object towards another."),
                   _("Rotate _PARAM0_ towards _PARAM1_"),
                   _("Direction"),
                   "res/actions/direction24.png",
                   "res/actions/direction.png")

        .AddParameter("object", _("Object to be rotated"), "Sprite")
        .AddParameter("objectPtr", _("Rotate toward this object"))
        .AddCodeOnlyParameter("currentScene", "")
        .SetHidden(); //Deprecated

    obj.AddExpression("X", _("X position of a point"), _("X position of a point"), _("Position"), "res/actions/position.png")
        .SetHidden()
        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("", _("Name of the point"), "", true);

    obj.AddExpression("Y", _("Y position of a point"), _("Y position of a point"), _("Position"), "res/actions/position.png")
        .SetHidden()
        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("", _("Name of the point"), "", true);

    obj.AddExpression("PointX", _("X position of a point"), _("X position of a point"), _("Position"), "res/actions/position.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("", _("Name of the point"));

    obj.AddExpression("PointY", _("Y position of a point"), _("Y position of a point"), _("Position"), "res/actions/position.png")

        .AddParameter("object", _("Object"), "Sprite")
        .AddParameter("", _("Name of the point"));

    obj.AddExpression("Direc", _("Direction"), _("Direction of the object"), _("Direction"), "res/actions/direction.png")
        .SetHidden()
        .AddParameter("object", _("Object"), "Sprite");

    obj.AddExpression("Direction", _("Direction"), _("Direction of the object"), _("Direction"), "res/actions/direction.png")
        .AddParameter("object", _("Object"), "Sprite");

    obj.AddExpression("Anim", _("Animation"), _("Animation of the object"), _("Animations and images"), "res/actions/animation.png")
        .SetHidden()
        .AddParameter("object", _("Object"), "Sprite");

    obj.AddExpression("Animation", _("Animation"), _("Animation of the object"), _("Animations and images"), "res/actions/animation.png")
        .AddParameter("object", _("Object"), "Sprite");

    obj.AddExpression("Sprite", _("Image"), _("Animation frame of the object"), _("Animations and images"), "res/actions/sprite.png")
        .AddParameter("object", _("Object"), "Sprite");

    obj.AddExpression("AnimationSpeedScale", _("Animation speed scale"), _("Animation speed scale"), _("Animations and images"), "res/actions/animation.png")
        .AddParameter("object", _("Object"), "Sprite");

    obj.AddExpression("ScaleX", _("Scale of the width of an object"), _("Scale of the width of an object"), _("Size"), "res/actions/scaleWidth.png")
        .AddParameter("object", _("Object"), "Sprite");

    obj.AddExpression("ScaleY", _("Scale of the height of an object"), _("Scale of the height of an object"), _("Size"), "res/actions/scaleHeight.png")
        .AddParameter("object", _("Object"), "Sprite");

    extension.AddCondition("Collision",
                      _("Collision (Pixel perfect)"),
                      _("The condition is true if there is a collision between the two objects.\nThe test is pixel-perfect."),
                      _("_PARAM0_ is in collision with _PARAM1_ (pixel perfect)"),
                      _("Collision"),
                      "res/conditions/collision24.png",
                      "res/conditions/collision.png")
        .AddParameter("objectList", _("Object 1"), "Sprite")
        .AddParameter("objectList", _("Object 2"), "Sprite")
        .AddCodeOnlyParameter("conditionInverted", "");
    #endif
}
コード例 #3
0
ファイル: Extension.cpp プロジェクト: AntonioModer/GD
void DeclarePanelSpriteObjectExtension(gd::PlatformExtension & extension)
{
    extension.SetExtensionInformation("PanelSpriteObject",
        _("Panel Sprite (9-patch) Object"),
        _("Extension allowing to use panel sprite (\"9-patch\") objects."),
        "Victor Levasseur and Florian Rival",
        "Open source (MIT License)");

    gd::ObjectMetadata & obj = extension.AddObject("PanelSprite",
        _("Panel Sprite (\"9-patch\")"),
        _("An image with edges and corners that are stretched separately from the fill."),
        "CppPlatform/Extensions/PanelSpriteIcon.png",
        &CreatePanelSpriteObject);

    #if defined(GD_IDE_ONLY)
    obj.SetIncludeFile("PanelSpriteObject/PanelSpriteObject.h");

    obj.AddAction("Width",
                   _("Width"),
                   _("Modify the width of a Panel Sprite."),
                   _("Do _PARAM1__PARAM2_ to the width of _PARAM0_"),
                   _("Size and angle"),
                   "res/actions/scaleWidth24.png",
                   "res/actions/scaleWidth.png")
        .AddParameter("object", _("Object"), "PanelSprite", false)
        .AddParameter("operator", _("Modification's sign"))
        .AddParameter("expression", _("Value"))
        .SetFunctionName("SetWidth").SetManipulatedType("number").SetGetter("GetWidth").SetIncludeFile("PanelSpriteObject/PanelSpriteObject.h");

    obj.AddCondition("Width",
                   _("Width"),
                   _("Test the width of a Panel Sprite."),
                   _("The width of _PARAM0_ is _PARAM1__PARAM2_"),
                   _("Size and angle"),
                   "res/conditions/scaleWidth24.png",
                   "res/conditions/scaleWidth.png")
        .AddParameter("object", _("Object"), "PanelSprite", false)
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("expression", _("Value to test"))
        .SetFunctionName("GetWidth").SetManipulatedType("number").SetIncludeFile("PanelSpriteObject/PanelSpriteObject.h");


    obj.AddAction("Height",
                   _("Height"),
                   _("Modify the height of a Panel Sprite."),
                   _("Do _PARAM1__PARAM2_ to the height of _PARAM0_"),
                   _("Size and angle"),
                   "res/actions/scaleHeight24.png",
                   "res/actions/scaleHeight.png")
        .AddParameter("object", _("Object"), "PanelSprite", false)
        .AddParameter("operator", _("Modification's sign"))
        .AddParameter("expression", _("Value"))
        .SetFunctionName("SetHeight").SetManipulatedType("number").SetGetter("GetHeight").SetIncludeFile("PanelSpriteObject/PanelSpriteObject.h");


    obj.AddCondition("Height",
                   _("Height"),
                   _("Test the height of a Panel Sprite."),
                   _("The height of _PARAM0_ is _PARAM1__PARAM2_"),
                   _("Size and angle"),
                   "res/conditions/scaleHeight24.png",
                   "res/conditions/scaleHeight.png")
        .AddParameter("object", _("Object"), "PanelSprite", false)
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("expression", _("Value to test"))
        .SetFunctionName("SetHeight").SetManipulatedType("number").SetGetter("GetHeight").SetIncludeFile("PanelSpriteObject/PanelSpriteObject.h");


    obj.AddAction("Angle",
                   _("Angle"),
                   _("Modify the angle of a Panel Sprite."),
                   _("Do _PARAM1__PARAM2_ to the angle of _PARAM0_"),
                   _("Size and angle"),
                   "res/actions/rotate24.png",
                   "res/actions/rotate.png")
        .SetHidden() //Deprecated, now available for all objects
        .AddParameter("object", _("Object"), "PanelSprite", false)
        .AddParameter("operator", _("Modification's sign"))
        .AddParameter("expression", _("Value"))
        .SetFunctionName("SetAngle").SetManipulatedType("number").SetGetter("GetAngle").SetIncludeFile("PanelSpriteObject/PanelSpriteObject.h");

    obj.AddCondition("Angle",
                   _("Angle"),
                   _("Test the angle of a Panel Sprite."),
                   _("The angle of _PARAM0_ is _PARAM1__PARAM2_"),
                   _("Size and angle"),
                   "res/conditions/rotate24.png",
                   "res/conditions/rotate.png")
        .SetHidden() //Deprecated, now available for all objects
        .AddParameter("object", _("Object"), "PanelSprite", false)
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("expression", _("Value to test"))
        .SetFunctionName("SetAngle").SetManipulatedType("number").SetGetter("GetAngle").SetIncludeFile("PanelSpriteObject/PanelSpriteObject.h");


    obj.AddAction("Image",
                   _("Image name"),
                   _("Change the image of a Panel Sprite."),
                   _("Set image _PARAM1_ on _PARAM0_"),
                   _("Image"),
                   "res/imageicon24.png",
                   "res/imageicon.png")
        .AddParameter("object", _("Object"), "PanelSprite", false)
        .AddParameter("string", _("Image name"))
        .AddCodeOnlyParameter("currentScene", "0")
        .SetFunctionName("ChangeAndReloadImage").SetIncludeFile("PanelSpriteObject/PanelSpriteObject.h");
    #endif
}
コード例 #4
0
ファイル: Extension.cpp プロジェクト: AntonioModer/GD
void DeclareTileMapObjectExtension(gd::PlatformExtension & extension)
{
    extension.SetExtensionInformation("TileMapObject",
                              _("Tile Map Object"),
                              _("Extension allowing to use tile map objects."),
                              "Victor Levasseur and Florian Rival",
                              "Open source (MIT License)");

    gd::ObjectMetadata & obj = extension.AddObject("TileMap",
               _("Tile Map"),
               _("Displays a tile map"),
               "CppPlatform/Extensions/TileMapIcon.png",
               &CreateTileMapObject);

    #if defined(GD_IDE_ONLY)
    obj.SetIncludeFile("TileMapObject/RuntimeTileMapObject.h");

    obj.AddCondition("Width",
                   _("Width"),
                   _("Test the width of a Tile Map Object."),
                   _("The width of _PARAM0_ is _PARAM1__PARAM2_"),
                   _("Size"),
                   "res/conditions/scaleWidth24.png",
                   "res/conditions/scaleWidth.png")
        .AddParameter("object", _("Object"), "TileMap", false)
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("expression", _("Value to test"))
        .MarkAsAdvanced()
        .SetFunctionName("GetWidth").SetManipulatedType("number").SetIncludeFile("TileMapObject/RuntimeTileMapObject.h");

    obj.AddCondition("Height",
                   _("Height"),
                   _("Test the height of a Tile Map Object."),
                   _("The height of _PARAM0_ is _PARAM1__PARAM2_"),
                   _("Size"),
                   "res/conditions/scaleHeight24.png",
                   "res/conditions/scaleHeight.png")
        .AddParameter("object", _("Object"), "TileMap", false)
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("expression", _("Value to test"))
        .MarkAsAdvanced()
        .SetFunctionName("GetHeight").SetManipulatedType("number").SetIncludeFile("TileMapObject/RuntimeTileMapObject.h");

    obj.AddAction("SetMapSize",
                   _("Resize the tilemap"),
                   _("Change the size of the tilemap (number of tiles)."),
                   _("Resize the tilemap to _PARAM1_x_PARAM2_ tiles"),
                   _("Size"),
                   "CppPlatform/Extensions/TileMapIcon24.png",
                   "res/TileMapIcon16.png")
        .AddParameter("objectList", _("Tile Map Object"), "TileMap", false)
        .AddParameter("expression", _("Width (tiles count)"))
        .AddParameter("expression", _("Height (tiles count)"))
        .MarkAsSimple()
        .SetFunctionName("SetMapSize").SetIncludeFile("TileMapObject/RuntimeTileMapObject.h");

    extension.AddCondition("SingleTileCollision",
                   _("Collision with one tile"),
                   _("Test if an object collides a specific tile."),
                   _("_PARAM4_ is in collision with the tile at _PARAM2_;_PARAM3_ (layer _PARAM1_) of _PARAM0_"),
                   _("Collisions"),
                   "res/conditions/collision24.png",
                   "res/conditions/collision.png")
        .AddParameter("objectList", _("Tile Map Object"), "TileMap", false)
        .AddParameter("expression", _("Tile layer (0: Back, 1: Middle, 2: Top)"))
        .AddParameter("expression", _("Tile column"))
        .AddParameter("expression", _("Tile row"))
        .AddParameter("objectList", _("Object"))
        .AddCodeOnlyParameter("conditionInverted", "")
        .MarkAsSimple()
        .SetFunctionName("SingleTileCollision").SetIncludeFile("TileMapObject/RuntimeTileMapObject.h");



    obj.AddExpression("TileWidth", _("Tile width"), _("Tile width"), _("Tiles"), "res/TileMapIcon16.png")
        .AddParameter("object", _("Object"), "TileMap", false)
        .SetFunctionName("GetTileWidth").SetIncludeFile("TileMapObject/RuntimeTileMapObject.h");

    obj.AddExpression("TileHeight", _("Tile height"), _("Tile height"), _("Tiles"), "res/TileMapIcon16.png")
        .AddParameter("object", _("Object"), "TileMap", false)
        .SetFunctionName("GetTileHeight").SetIncludeFile("TileMapObject/RuntimeTileMapObject.h");

    obj.AddExpression("MapWidth", _("Map width (tiles)"), _("Map width"), _("Map"), "res/TileMapIcon16.png")
        .AddParameter("object", _("Object"), "TileMap", false)
        .SetFunctionName("GetMapWidth").SetIncludeFile("TileMapObject/RuntimeTileMapObject.h");

    obj.AddExpression("MapHeight", _("Map height (tiles)"), _("Map height"), _("Map"), "res/TileMapIcon16.png")
        .AddParameter("object", _("Object"), "TileMap", false)
        .SetFunctionName("GetMapHeight").SetIncludeFile("TileMapObject/RuntimeTileMapObject.h");



    obj.AddExpression("GetTile", _("Get the Tile (id)"), _("Get the Tile (id)"), _("Map"), "res/TileMapIcon16.png")
        .AddParameter("object", _("Object"), "TileMap", false)
        .AddParameter("expression", _("Layer"), "", false)
        .AddParameter("expression", _("Column"), "", false)
        .AddParameter("expression", _("Row"), "", false)
        .SetFunctionName("GetTile").SetIncludeFile("TileMapObject/RuntimeTileMapObject.h");

    obj.AddAction("SetTile",
                   _("Change a tile"),
                   _("Change a tile at a specific cell."),
                   _("Set tile #_PARAM4_ at the cell _PARAM2_;_PARAM3_ (layer: _PARAM1_) in _PARAM0_"),
                   _("Tiles"),
                   "CppPlatform/Extensions/TileMapIcon24.png",
                   "res/TileMapIcon16.png")
        .AddParameter("objectList", _("Tile Map Object"), "TileMap", false)
        .AddParameter("expression", _("Tile layer (0: Back, 1: Middle, 2: Top)"))
        .AddParameter("expression", _("Tile column"))
        .AddParameter("expression", _("Tile row"))
        .AddParameter("expression", _("New tile Id (-1 to delete the tile)"))
        .MarkAsSimple()
        .SetFunctionName("SetTile").SetIncludeFile("TileMapObject/RuntimeTileMapObject.h");



    obj.AddExpression("GetColumnAt", _("Get tile column from X coordinates"), _("Get tile column from X coordinates"), _("Map"), "res/TileMapIcon16.png")
        .AddParameter("object", _("Object"), "TileMap", false)
        .AddParameter("expression", _("X"), "", false)
        .SetFunctionName("GetColumnAt").SetIncludeFile("TileMapObject/RuntimeTileMapObject.h");

    obj.AddExpression("GetRowAt", _("Get tile row from Y coordinates"), _("Get tile row from Y coordinates"), _("Map"), "res/TileMapIcon16.png")
        .AddParameter("object", _("Object"), "TileMap", false)
        .AddParameter("expression", _("Y"), "", false)
        .SetFunctionName("GetRowAt").SetIncludeFile("TileMapObject/RuntimeTileMapObject.h");



    obj.AddStrExpression("SaveTiles", _("Save the tile map"), _("Save the tile map content in a string"), _("Saving"), "res/TileMapIcon16.png")
        .AddParameter("object", _("Object"), "TileMap", false)
        .SetFunctionName("SaveAsString").SetIncludeFile("TileMapObject/RuntimeTileMapObject.h");

    obj.AddAction("LoadTiles",
                   _("Load the tiles from a string"),
                   _("Load the tiles from a string."),
                   _("Load the tiles of _PARAM0_ from _PARAM1_"),
                   _("Loading"),
                   "CppPlatform/Extensions/TileMapIcon24.png",
                   "res/TileMapIcon16.png")
        .AddParameter("objectList", _("Tile Map Object"), "TileMap", false)
        .AddParameter("string", _("The string representing the tiles"))
        .MarkAsSimple()
        .SetFunctionName("LoadFromString").SetIncludeFile("TileMapObject/RuntimeTileMapObject.h");



    obj.AddAction("ChangeTexture",
                   _("Change the tileset texture"),
                   _("Change the tileset texture."),
                   _("Change the tileset texture of _PARAM0_ to _PARAM1_"),
                   _("Tileset"),
                   "CppPlatform/Extensions/TileMapIcon24.png",
                   "res/TileMapIcon16.png")
        .AddParameter("objectList", _("Tile Map Object"), "TileMap", false)
        .AddParameter("string", _("The new texture name"))
        .AddCodeOnlyParameter("currentScene", "")
        .MarkAsSimple()
        .SetFunctionName("ChangeTexture").SetIncludeFile("TileMapObject/RuntimeTileMapObject.h");

    #endif
}
コード例 #5
0
ファイル: Extension.cpp プロジェクト: sanyaade-teachings/GD
void DeclarePrimitiveDrawingExtension(gd::PlatformExtension & extension)
{
    extension.SetExtensionInformation("PrimitiveDrawing",
                  _("Primitive drawing"),
                  _("Extension allowing to draw shapes and manipulate images."),
                  "Florian Rival",
                  "Open source (MIT License)");

    gd::ObjectMetadata & obj = extension.AddObject("Drawer", //"Drawer" is kept for compatibility with GD<=3.6.76
               _("Shape painter"),
               _("Allows to draw simple shapes on the screen"),
               "CppPlatform/Extensions/primitivedrawingicon.png",
               &CreateShapePainterObject);

    #if defined(GD_IDE_ONLY)
    ShapePainterObject::LoadEdittimeIcon();
    obj.SetIncludeFile("PrimitiveDrawing/ShapePainterObject.h");

    obj.AddAction("Rectangle",
                   _("Rectangle"),
                   _("Draw a rectangle on screen"),
                   _("Draw from _PARAM1_;_PARAM2_ to _PARAM3_;_PARAM4_ a rectangle with _PARAM0_"),
                   _("Drawing"),
                   "res/actions/rectangle24.png",
                   "res/actions/rectangle.png")

        .AddParameter("object", _("Shape Painter object"), "Drawer")
        .AddParameter("expression", _("Top left side: X Position"))
        .AddParameter("expression", _("Top left side : Y Position"))
        .AddParameter("expression", _("Bottom right side : X Position"))
        .AddParameter("expression", _("Bottom right side : Y Position"))
        .SetFunctionName("DrawRectangle").SetIncludeFile("PrimitiveDrawing/ShapePainterObject.h");


    obj.AddAction("Circle",
                   _("Circle"),
                   _("Draw a circle on screen"),
                   _("Draw at _PARAM1_;_PARAM2_ a circle of radius _PARAM3_ with _PARAM0_"),
                   _("Drawing"),
                   "res/actions/circle24.png",
                   "res/actions/circle.png")

        .AddParameter("object", _("Shape Painter object"), "Drawer")
        .AddParameter("expression", _("X position of center"))
        .AddParameter("expression", _("Y position of center"))
        .AddParameter("expression", _("Radius ( in pixels )"))
        .SetFunctionName("DrawCircle").SetIncludeFile("PrimitiveDrawing/ShapePainterObject.h");


    obj.AddAction("Line",
                   _("Line"),
                   _("Draw a line  on screen"),
                   _("Draw from _PARAM1_;_PARAM2_ to _PARAM3_;_PARAM4_ a line (thickness  : _PARAM5_) with _PARAM0_"),
                   _("Drawing"),
                   "res/actions/line24.png",
                   "res/actions/line.png")

        .AddParameter("object", _("Shape Painter object"), "Drawer")
        .AddParameter("expression", _("X Position of start point"))
        .AddParameter("expression", _("Y Position of start point"))
        .AddParameter("expression", _("X Position of end point"))
        .AddParameter("expression", _("Y Position of end point"))
        .AddParameter("expression", _("Thickness ( in pixels )"))
        .SetFunctionName("DrawLine").SetIncludeFile("PrimitiveDrawing/ShapePainterObject.h");


    obj.AddAction("FillColor",
                   _("Fill color"),
                   _("Change the color of filling"),
                   _("Change fill color of _PARAM0_ to _PARAM1_"),
                   _("Setup"),
                   "res/actions/text24.png",
                   "res/actions/text.png")

        .AddParameter("object", _("Shape Painter object"), "Drawer")
        .AddParameter("color", _("Fill color"))
        .SetFunctionName("SetFillColor").SetIncludeFile("PrimitiveDrawing/ShapePainterObject.h");


    obj.AddAction("OutlineColor",
                   _("Outline color"),
                   _("Modify the color of the outline of future drawings."),
                   _("Change outline color of _PARAM0_ to _PARAM1_"),
                   _("Setup"),
                   "res/actions/color24.png",
                   "res/actions/color.png")

        .AddParameter("object", _("Shape Painter object"), "Drawer")
        .AddParameter("color", _("Color"))
        .SetFunctionName("SetOutlineColor").SetIncludeFile("PrimitiveDrawing/ShapePainterObject.h");


    obj.AddAction("OutlineSize",
                   _("Outline size"),
                   _("Modify the size of the outline of future drawings."),
                   _("Do _PARAM1__PARAM2_ to the size of the outline of _PARAM0_"),
                   _("Setup"),
                   "res/actions/outlineSize24.png",
                   "res/actions/outlineSize.png")

        .AddParameter("object", _("Shape Painter object"), "Drawer")
        .AddParameter("operator", _("Modification's sign"))
        .AddParameter("expression", _("Size in pixels"))
        .SetFunctionName("SetOutlineSize").SetManipulatedType("number").SetGetter("GetOutlineSize").SetIncludeFile("PrimitiveDrawing/ShapePainterObject.h");


    obj.AddCondition("OutlineSize",
                   _("Outline size"),
                   _("Test the size of the outline."),
                   _("The size of the outline of _PARAM0_ is _PARAM1__PARAM2_"),
                   _("Setup"),
                   "res/conditions/outlineSize24.png",
                   "res/conditions/outlineSize.png")

        .AddParameter("object", _("Shape Painter object"), "Drawer")
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("expression", _("Size to test"))
        .SetFunctionName("GetOutlineSize").SetManipulatedType("number").SetIncludeFile("PrimitiveDrawing/ShapePainterObject.h");


    obj.AddAction("FillOpacity",
                   _("Fill opacity"),
                   _("Modify the opacity of filling of future drawings."),
                   _("Do _PARAM1__PARAM2_ to the opacity of filling of _PARAM0_"),
                   _("Setup"),
                   "res/actions/opacity24.png",
                   "res/actions/opacity.png")

        .AddParameter("object", _("Shape Painter object"), "Drawer")
        .AddParameter("operator", _("Modification's sign"))
        .AddParameter("expression", _("Value"))
        .SetFunctionName("SetFillOpacity").SetManipulatedType("number").SetGetter("GetFillOpacity").SetIncludeFile("PrimitiveDrawing/ShapePainterObject.h");



    obj.AddCondition("FillOpacity",
                   _("Fill opacity"),
                   _("Test the value of the opacity of the filling."),
                   _("The opacity of filling of _PARAM0_ is _PARAM1__PARAM2_"),
                   _("Setup"),
                   "res/conditions/opacity24.png",
                   "res/conditions/opacity.png")

        .AddParameter("object", _("Shape Painter object"), "Drawer")
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("expression", _("Value to test"))
        .SetFunctionName("GetFillOpacity").SetManipulatedType("number").SetIncludeFile("PrimitiveDrawing/ShapePainterObject.h");


    obj.AddAction("OutlineOpacity",
                   _("Outline opacity"),
                   _("Modify the opacity of the outline of future drawings."),
                   _("Do _PARAM1__PARAM2_ to the opacity of the outline of _PARAM0_"),
                   _("Setup"),
                   "res/actions/opacity24.png",
                   "res/actions/opacity.png")

        .AddParameter("object", _("Shape Painter object"), "Drawer")
        .AddParameter("operator", _("Modification's sign"))
        .AddParameter("expression", _("Value"))
        .SetFunctionName("SetOutlineOpacity").SetManipulatedType("number").SetGetter("GetOutlineOpacity").SetIncludeFile("PrimitiveDrawing/ShapePainterObject.h");


    obj.AddCondition("OutlineOpacity",
                   _("Outline opacity"),
                   _("Test the opacity of the outline."),
                   _("The opacity of the outline of _PARAM0_ is _PARAM1__PARAM2_"),
                   _("Setup"),
                   "res/conditions/opacity24.png",
                   "res/conditions/opacity.png")

        .AddParameter("object", _("Shape Painter object"), "Drawer")
        .AddParameter("relationalOperator", _("Sign of the test"))
        .AddParameter("expression", _("Value to test"))
        .SetFunctionName("GetOutlineOpacity").SetManipulatedType("number").SetIncludeFile("PrimitiveDrawing/ShapePainterObject.h");

    #endif
}