public SubMenu() { SubMenuFrameOutFocus = new GameObjectDefinition(); SubMenuFrameOutFocus.name = "SubMenuFrameOutFocus"; SubMenuFrameOutFocus.anchorMin = new Vector2(); SubMenuFrameOutFocus.anchorMax = new Vector2(1, 1); SubMenuFrameOutFocus.anchoredPosition = new Vector2(0, 0); SubMenuFrameOutFocus.sizeDelta = new Vector2(0, 0); SubMenuFrameOutFocus.clickAction = CloseSubMenu; }
public void AddEntry(GameObjectDefinition entry) { if (_entrySprite == null) { _entrySprite = Resources.Load <Sprite>("Media/Sprites/SubMenu/entryBG"); } entry.imageSprite = _entrySprite; _entries.Add(entry); }