mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Fix interpolated strings in ScriptPropertyDefVal
This commit is contained in:
parent
df78c0636d
commit
42233284b1
5 changed files with 105 additions and 1 deletions
|
|
@ -0,0 +1,26 @@
|
|||
using Godot;
|
||||
|
||||
namespace Godot.SourceGenerators.Sample
|
||||
{
|
||||
public partial class ExportedComplexStrings : Node
|
||||
{
|
||||
[Export]
|
||||
private string _fieldInterpolated1 = $"The quick brown fox jumps over ({Engine.GetVersionInfo()})";
|
||||
|
||||
[Export]
|
||||
private string _fieldInterpolated2 = $"The quick brown fox jumps over ({Engine.GetVersionInfo()["major"],0:G}) the lazy dog.";
|
||||
|
||||
[Export]
|
||||
private string _fieldInterpolated3 = $"{((int)Engine.GetVersionInfo()["major"]) * -1 * -1:G} the lazy dog.";
|
||||
|
||||
[Export]
|
||||
private string _fieldInterpolated4 = $"{":::fff,,}<,<}},,}]"}";
|
||||
|
||||
[Export]
|
||||
public string PropertyInterpolated1
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
} = $"The quick brown fox jumps over {GD.VarToStr($"the lazy {Engine.GetVersionInfo()} do")}g.";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue