public override void OnUpdate() { WorldSide localSide = World_AIW2.Instance.GetLocalSide(); if (localSide == null) { return; } ArcenUI_ButtonSet elementAsType = (ArcenUI_ButtonSet)Element; //Window_InGameBottomMenu windowController = (Window_InGameBottomMenu)Element.Window.Controller; if (elementAsType.Buttons.Count <= 0) { elementAsType.ClearButtons(); int numberOfButtons = 9; for (int x = 0; x < numberOfButtons; x++) { bControlGroup newButtonController = new bControlGroup(x); Vector2 offset; offset.x = x * elementAsType.ButtonWidth; offset.y = 0; Vector2 size; size.x = elementAsType.ButtonWidth; size.y = elementAsType.ButtonHeight; elementAsType.AddButton(newButtonController, size, offset); } { bToggleMasterMenu newButtonController = new bToggleMasterMenu(); Vector2 offset; offset.x = numberOfButtons * elementAsType.ButtonWidth; offset.y = 0; Vector2 size; size.x = elementAsType.ButtonWidth; size.y = elementAsType.ButtonHeight; elementAsType.AddButton(newButtonController, size, offset); } } }
public bToggleMasterMenu() : base("Menu", "^") { Instance = this; }