mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-12 03:25:55 +00:00
Changed UI sprites to use sprite in resource
This commit is contained in:
parent
9717ca8a55
commit
f2482e4e38
10 changed files with 47 additions and 13 deletions
|
|
@ -92,7 +92,12 @@ public partial class Hud : CanvasLayer
|
|||
var hbox = new HBoxContainer();
|
||||
_itemsContainer.AddChild(hbox);
|
||||
|
||||
var instance = item.HudItemScene.Instantiate<TextureRect>();
|
||||
var instance = new TextureRect();
|
||||
instance.Texture = item.InventorySprite;
|
||||
instance.StretchMode = TextureRect.StretchModeEnum.Keep;
|
||||
// change transform size?
|
||||
|
||||
//var instance = item.HudItemScene.Instantiate<TextureRect>();
|
||||
//_in.CallDeferred("add_child", instance);
|
||||
hbox.AddChild(instance);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue