Merge pull request #97894 from paulloz/dotnet/export-tool-button
Implement `[ExportToolButton]`
This commit is contained in:
commit
ec7fd4f6f1
18 changed files with 406 additions and 3 deletions
|
|
@ -0,0 +1,8 @@
|
|||
using Godot;
|
||||
using Godot.Collections;
|
||||
|
||||
public partial class ExportDiagnostics_GD0108 : Node
|
||||
{
|
||||
[ExportToolButton("")]
|
||||
public Callable {|GD0108:MyButton|};
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
using Godot;
|
||||
using Godot.Collections;
|
||||
|
||||
[Tool]
|
||||
public partial class ExportDiagnostics_GD0109 : Node
|
||||
{
|
||||
[Export, ExportToolButton("")]
|
||||
public Callable {|GD0109:MyButton|};
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
using Godot;
|
||||
using Godot.Collections;
|
||||
|
||||
[Tool]
|
||||
public partial class ExportDiagnostics_GD0110 : Node
|
||||
{
|
||||
[ExportToolButton("")]
|
||||
public string {|GD0110:MyButton|};
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using Godot;
|
||||
using System;
|
||||
|
||||
[Tool]
|
||||
public partial class ExportedToolButtons : GodotObject
|
||||
{
|
||||
[ExportToolButton("Click me!")]
|
||||
public Callable MyButton1 => Callable.From(() => { GD.Print("Clicked MyButton1!"); });
|
||||
|
||||
[ExportToolButton("Click me!", Icon = "ColorRect")]
|
||||
public Callable MyButton2 => Callable.From(() => { GD.Print("Clicked MyButton2!"); });
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue