protected override void UpdateKeys(InputManager input) { bool moved = false; if (TotalChoices.Length > 1) { if (IsInputting(input, Dir8.Left)) { SetPage((CurrentPage + TotalChoices.Length - 1) % TotalChoices.Length); moved = true; } else if (IsInputting(input, Dir8.Right)) { SetPage((CurrentPage + 1) % TotalChoices.Length); moved = true; } } if (moved) { GameManager.Instance.SE("Menu/Skip"); PrevTick = GraphicsManager.TotalFrameTick % (ulong)FrameTick.FrameToTick(CURSOR_FLASH_TIME); } else if (input.JustPressed(FrameInput.InputType.Confirm)) { if (MultiSelect.Max > 0) { List <int> slots = new List <int>(); for (int ii = 0; ii < TotalChoices.Length; ii++) { for (int jj = 0; jj < TotalChoices[ii].Length; jj++) { if (TotalChoices[ii][jj].Selected) { slots.Add(ii * SpacesPerPage + jj); } } } if (slots.Count >= MultiSelect.Min) { if (slots.Count > 0) { GameManager.Instance.SE("Menu/Confirm"); ChoseMultiIndex(slots); } else { Choices[CurrentChoice].OnConfirm(); } } else { GameManager.Instance.SE("Menu/Cancel"); } } else { Choices[CurrentChoice].OnConfirm(); } } else { base.UpdateKeys(input); } }
protected override int FrameMethod(List <CharAnimFrame> frames) { return(CharSheet.TrueFrame(frames, Math.Min(ActionTime.Ticks, FrameTick.FrameToTick(AnimReturnTime)), true)); }
protected override int FrameMethod(List <CharAnimFrame> frames) { return(CharSheet.FractionFrame(frames, ActionTime.Ticks, FrameTick.FrameToTick(AnimTotalTime), true)); }
public void SetTeamMode(bool teamMode) { menuText.Text = (teamMode ? Text.FormatKey("MENU_TEAM_MODE_ON") : Text.FormatKey("MENU_TEAM_MODE_OFF")); timeSinceUpdate = new FrameTick(); Visible = true; }