GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
Public Member Functions | Static Public Member Functions | List of all members
gd::InstructionSentenceFormatter Class Reference

Generate user friendly sentences and information from an action or condition metadata. More...

#include <InstructionSentenceFormatter.h>

Public Member Functions

std::vector< std::pair< gd::String, gd::TextFormatting > > GetAsFormattedText (const gd::Instruction &instr, const gd::InstructionMetadata &metadata)
 Create a formatted sentence from an instruction and its metadata.
 
gd::String GetFullText (const gd::Instruction &instr, const gd::InstructionMetadata &metadata)
 

Static Public Member Functions

static gd::String GetFormattedParameterValue (const gd::String &rawValue, const gd::String &parameterType)
 Return the value to display for a parameter, normalizing types (like yesorno/trueorfalse) whose runtime interpretation differs from the raw stored value. More...
 
static InstructionSentenceFormatter * Get ()
 
static void DestroySingleton ()
 

Detailed Description

Generate user friendly sentences and information from an action or condition metadata.

Member Function Documentation

◆ GetFormattedParameterValue()

gd::String gd::InstructionSentenceFormatter::GetFormattedParameterValue ( const gd::String &  rawValue,
const gd::String &  parameterType 
)
static

Return the value to display for a parameter, normalizing types (like yesorno/trueorfalse) whose runtime interpretation differs from the raw stored value.

Look at EventsCodeGenerator::GenerateParameterCodes and AdvancedExtension.cpp (for GDJS) for related logic that must stay consistent.


The documentation for this class was generated from the following files: