Editor slight refactor
This commit is contained in:
parent
285b90f503
commit
8cfbad01cf
23 changed files with 9 additions and 8 deletions
|
|
@ -0,0 +1,24 @@
|
|||
using Godot;
|
||||
using Newlon.Resources;
|
||||
|
||||
|
||||
[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