You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Implement [ExportToolButton]
This commit is contained in:
@@ -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!"); });
|
||||
}
|
||||
Reference in New Issue
Block a user