mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
70 lines
2.3 KiB
C++
70 lines
2.3 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/Tools/Localization.h"
|
|
|
|
using namespace std;
|
|
namespace gd {
|
|
|
|
void GD_CORE_API
|
|
BuiltinExtensionsImplementer::ImplementsCommonConversionsExtension(
|
|
gd::PlatformExtension& extension) {
|
|
extension
|
|
.SetExtensionInformation(
|
|
"BuiltinCommonConversions",
|
|
_("Standard Conversions"),
|
|
"Expressions to convert number, texts and quantities.",
|
|
"Florian Rival",
|
|
"Open source (MIT License)")
|
|
.SetExtensionHelpPath("/all-features/common-conversions");
|
|
|
|
|
|
extension
|
|
.AddExpression("ToNumber",
|
|
_("Text > Number"),
|
|
_("Convert the text to a number"),
|
|
_("Conversion"),
|
|
"res/conditions/toujours24.png")
|
|
.AddParameter("string", _("Text to convert to a number"));
|
|
|
|
extension
|
|
.AddStrExpression("ToString",
|
|
_("Number > Text"),
|
|
_("Convert the result of the expression to text"),
|
|
_("Conversion"),
|
|
"res/conditions/toujours24.png")
|
|
.AddParameter("expression", _("Expression to be converted to text"));
|
|
|
|
extension
|
|
.AddStrExpression("LargeNumberToString",
|
|
_("Number > Text ( without scientific notation )"),
|
|
_("Convert the result of the expression to text, "
|
|
"without using the scientific notation"),
|
|
_("Conversion"),
|
|
"res/conditions/toujours24.png")
|
|
.AddParameter("expression", _("Expression to be converted to text"));
|
|
|
|
extension
|
|
.AddExpression(
|
|
"ToRad",
|
|
_("Degrees > Radians"),
|
|
_("Converts the angle, expressed in degrees, into radians"),
|
|
_("Conversion"),
|
|
"res/conditions/toujours24.png")
|
|
.AddParameter("expression", _("Angle, in degrees"));
|
|
|
|
extension
|
|
.AddExpression(
|
|
"ToDeg",
|
|
_("Radians > Degrees"),
|
|
_("Converts the angle, expressed in radians, into degrees"),
|
|
_("Conversion"),
|
|
"res/conditions/toujours24.png")
|
|
.AddParameter("expression", _("Angle, in radians"));
|
|
}
|
|
|
|
} // namespace gd
|