public static void Focus(int i = 0) { var itemPanel = panel.GetPanel("Border").GetPanel($"ItemBorder{i}"); if (itemPanel == null) { return; } Vector2 pos = itemPanel.GetPosition(); selected.SetPosition(pos); current_focus = i; selected.SetActive(true); }
public void SetActive(bool b, bool panel) { background.SetActive(b); foreach (CanvasButton button in buttons.Values) { button.SetActive(b); } foreach (CanvasImage image in images.Values) { image.SetActive(b); } foreach (CanvasText t in texts.Values) { t.SetActive(b); } if (panel) { foreach (CanvasPanel p in panels.Values) { p.SetActive(b, panel); //Logger.LogDebug($"Set Panel[{p}] {b}"); } } active = b; }