Zombie editor
This commit is contained in:
parent
623362e430
commit
7d1ca26baa
23 changed files with 435 additions and 25 deletions
22
addons/pvzadventure/scripts/ZE_AssetBrowserButton.cs
Normal file
22
addons/pvzadventure/scripts/ZE_AssetBrowserButton.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using Godot;
|
||||
|
||||
[Tool]
|
||||
public partial class ZE_AssetBrowserButton : PanelContainer
|
||||
{
|
||||
private ZombieResource resource;
|
||||
public void SetData(ZombieResource data)
|
||||
{
|
||||
resource = data;
|
||||
UpdateContent();
|
||||
}
|
||||
private void UpdateContent()
|
||||
{
|
||||
GetNode<TextureRect>("Texture").Texture = resource.Preview;
|
||||
}
|
||||
|
||||
public override Variant _GetDragData(Vector2 atPosition)
|
||||
{
|
||||
return resource;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue