Skip to content

Commit

Permalink
UIUsers logic
Browse files Browse the repository at this point in the history
  • Loading branch information
valkyrienyanko committed Dec 24, 2021
1 parent ee81858 commit d1c3f27
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Scripts/UI/UIUsers.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Godot;
using System;

namespace KRU.UI
{
public class UIUsers : PanelContainer
{
#pragma warning disable CS0649 // Values are assigned in the editor
[Export] private readonly NodePath nodePathList;
#pragma warning restore CS0649 // Values are assigned in the editor

private static VBoxContainer list;

// Prefab
private readonly static PackedScene prefabUIUser = ResourceLoader.Load<PackedScene>("res://Scenes/UI/Elements/UIUser.tscn");

public override void _Ready()
{
list = GetNode<VBoxContainer>(nodePathList);
}

public static void AddUser()
{
var user = (UIUser)prefabUIUser.Instance();
user.SetUsername("asd");
}
}
}

0 comments on commit d1c3f27

Please sign in to comment.