public override void Input(int input) { if (input == Globals.KEY_ACCEPT) { StateHandler.AddDelay(); if (count == 0) { parent.ParentInput(Globals.MENU_ATTACK); } else if (count == 1) { parent.ParentInput(Globals.MENU_MAGIC); } else if (count == 2) { StateHandler.State = new SubStateItemMenuCombat(this); parent.ParentInput(Globals.MENU_ITEM); } else if (count == 3) { parent.ParentInput(Globals.MENU_DEFEND); } } if (input == Globals.KEY_UP || input == Globals.KEY_DOWN) { base.Input(input); } }
public SubStateOrderChangeTwo(SubStateAbstract theparent, int selected) : base(theparent) { first = selected; int i = 0; StateHandler.AddDelay(); messageBoxes = new MessageBox[1]; colors = new Color[3]; menu = new string[colors.Length]; for (i = 0; i < menu.Length; i++) { menu[i] = StateHandler.GetPC(i).Name; } for (i = 1; i < colors.Length; i++) { colors[i] = Color.DarkGray; } colors[0] = Color.White; mX = 90; mY = 90; width = 900; height = 630; messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true); }//end EVC
public SubStateGameMenu(StateAbstract parent) : base(parent) { StateHandler.AddDelay(); messageBoxes = new MessageBox[1]; colors = new Color[8]; menu = new string[colors.Length]; menu[0] = "Items"; menu[1] = "Equip"; menu[2] = "Rune"; menu[3] = "Status"; menu[4] = "Formation"; menu[5] = "Party Order"; menu[6] = "Return to Title"; menu[7] = "Exit"; for (int i = 1; i < colors.Length; i++) { colors[i] = Color.DarkGray; } colors[0] = Color.White; mX = 30; mY = 30; width = 960; height = 690; messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true); }
public override void Input(int input) { if (input == Globals.KEY_ACCEPT) { if (count == 0) { MapFactory.mapLoad("test"); StateInGame.locX = 4; StateInGame.locY = 4; StateInGame.change = true; StateHandler.State = new StateInGame(); } else if (count == 1) { StateHandler.State = new SubStateFeatureNotImplemented(this); } else if (count == 2) { StateHandler.State = new SubStateOptionsMenu(this); } else if (count == 3) { StateHandler.State = new StateCredits(); } } else if (input == Globals.KEY_CANCEL)//used to prevent the user from exiting the main menu { StateHandler.AddDelay(); MediaHandler.playSFX(FSCMStrikesBackLogic.Properties.Resources.menuBack, "menuBack"); } else { base.Input(input); } }
public SubStateFormationMenu(SubStateAbstract theparent) : base(theparent) { StateHandler.AddDelay(); messageBoxes = new MessageBox[1]; colors = new Color[4]; menu = new string[4]; menu[0] = "The Intern"; menu[1] = "Defense"; menu[2] = "Caster"; menu[3] = "Offense"; for (int i = 1; i < colors.Length; i++) { colors[i] = Color.DarkGray; } colors[0] = Color.White; mX = 30; mY = 30; width = 960; height = 690; messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true); }//end EVC
public override void Input(int input) { if (input != Globals.KEY_ACCEPT && input != Globals.KEY_EXIT) { StateHandler.AddDelay(); StateHandler.State = new StateTitleScreen(); } }
public override void Input(int input) { if (input == Globals.KEY_CANCEL || input == Globals.KEY_ACCEPT) { base.Input(input); StateHandler.AddDelay(); StateHandler.State = Parent; } }
public override void Input(int input) { if (input == Globals.KEY_ACCEPT) { switch (count) { case 0: StateHandler.AddDelay(); StateHandler.State = new SubStateItemMenu(this); break; case 1: StateHandler.AddDelay(); StateHandler.State = new SubStateCharSelectMenuEquip(this); break; case 2: StateHandler.AddDelay(); StateHandler.State = new SubStateCharSelectMenuRune(this); break; case 3: StateHandler.AddDelay(); StateHandler.State = new SubStateStatusMenu(this); break; case 4: StateHandler.AddDelay(); StateHandler.State = new SubStateFormationMenu(this); break; case 5: StateHandler.AddDelay(); StateHandler.State = new SubStateOrderChangeOne(this); break; case 6: StateHandler.AddDelay(); //StateHandler.State = new StateTitleScreen();//Does not work. You should check it out and see if you know how to fix it. StateHandler.State = new SubStateFeatureNotImplemented(this); break; case 7: StateHandler.AddDelay(); StateHandler.State = new SubStateConfirmExit(this, 75, 200); break; } } else if (input == Globals.KEY_MENU) { input = Globals.KEY_CANCEL; } else { base.Input(input); } }
public override void ParentInput(int input) { if (input == Globals.KEY_ACCEPT || input == Globals.MESSAGE_CONFIRMED) { StateHandler.AddDelay(); StateHandler.State = this; } Parent.ParentInput(input); }
public override void Input(int input) { base.Input(input); StateHandler.AddDelay(); if (input == Globals.KEY_ACCEPT) { StateHandler.State = new SubStateCharSelectMenuUse(this, count); } }
public override void Input(int input) { if (input == Globals.KEY_ACCEPT) { StateHandler.AddDelay(); StateHandler.State = Parent; } parent.Input(input); }
public SubStateListMenuRune(StateAbstract parent, int thePC, int theSlot) : base(parent) { PCid = thePC; slot = theSlot; StateHandler.AddDelay(); messageBoxes = new MessageBox[1]; int adjustedLen = ItemHandler.runeList.Count + 1; colors = new Color[adjustedLen]; menu = new string[adjustedLen]; int i = 0; foreach (ItemAbstract item in ItemHandler.runeList) { colors[i] = Color.DarkGray; menu[i] = item.Name; i++; } menu[i] = "Unequip"; colors[i] = Color.DarkGray; colors[0] = Color.White; mX = 240; mY = 75; width = 660; height = 390; int tempVal = (int)(Globals.hmod * height); tempVal /= Globals.FONT_HEIGHT; tempVal -= 1; if (tempVal > adjustedLen) { tempVal = adjustedLen; } string[] tempMenu = new string[tempVal]; for (i = 0; i < tempVal; i++) { tempMenu[i] = menu[i]; } messageBoxes[0] = new MessageBox(mX, mY, width, height, tempMenu, colors, true, true, true); StateHandler.State = new SubStateRuneChange(this, PCid, slot, 0); }
}//end EVC public override void Input(int input) { base.Input(input); StateHandler.AddDelay(); if (input == Globals.KEY_ACCEPT) { StateHandler.State = new SubStateOrderChangeTwo(this, count); } else if (input == Globals.KEY_CANCEL) { StateHandler.State = parent; } }//end input
public SubStateItemMenuCombat(StateAbstract theparent) : base(theparent) { absolute = false; parent = theparent; StateHandler.AddDelay(); messageBoxes = new MessageBox[1]; colors = new Color[ItemHandler.itemList.Count]; menu = new string[ItemHandler.itemList.Count]; int i = 0; foreach (ConsumableAbstract item in ItemHandler.itemList) { colors[i] = Color.DarkGray; menu[i] = item.getName(); i++; } if (ItemHandler.itemList.Count > 0) { colors[0] = Color.White; } mX = 100; mY = 45; width = 860; height = 590; int tempVal = (int)(Globals.hmod * height); tempVal /= Globals.FONT_HEIGHT; tempVal -= 1; if (tempVal > menu.Length) { tempVal = menu.Length; } string[] tempMenu = new string[tempVal]; for (i = 0; i < tempVal; i++) { tempMenu[i] = menu[i]; } messageBoxes[0] = new MessageBox(mX, mY, width, height, tempMenu, colors, true, true, true); }
}//end EVC public override void Input(int input) { base.Input(input); StateHandler.AddDelay(); if (input == Globals.KEY_ACCEPT) { string temp = StateHandler.GetPC(first).Name; StateHandler.SetPC(StateHandler.GetPC(count).Name, first); StateHandler.SetPC(temp, count); parent = new SubStateOrderChangeOne((SubStateAbstract)parent.Parent); StateHandler.State = parent; } else if (input == Globals.KEY_CANCEL) { StateHandler.State = parent; } }//end input
public override void Input(int input) { if (StateHandler.GetDelay() > 0) { return; } if (input == Globals.KEY_ACCEPT) { StateHandler.AddDelay(); if (parent != null) { Parent.ParentInput(Globals.MESSAGE_CONFIRMED); } } }
}//end EVC public override void Input(int input) { base.Input(input); StateHandler.AddDelay(); if (input == Globals.KEY_ACCEPT) { FormationHandler.Formation = count; StateHandler.State = parent; } else if (input == Globals.KEY_CANCEL) { StateHandler.State = parent; } else { StateHandler.State = new SubStateDisplayFormation(this, count); } }//end input
private void nextTurn() { curIndex++; if (current == MonsterList[0]) { curIndex = 0; } if (curIndex > 2) { current = MonsterList[0]; return; } current = StateHandler.GetPC(curIndex); if (current.Health < 1) { bool gameOver = true; for (int i = 0; i < 3; i++) { if (PCBuilder.getPC(i).Health > 0) { gameOver = false; } } if (gameOver) { StateHandler.AddDelay(); Defeat(); } else { nextTurn(); } } else { cameraTarget = current; } }
public override void Input(int input) { if (input == Globals.KEY_ACCEPT) { if (count < ItemHandler.runeList.Count && runeSlotTaken(ItemHandler.runeList[count].Wearflags)) { MediaHandler.playSFX(FSCMStrikesBackLogic.Properties.Resources.menuBack, "error"); return; } StateHandler.State = new SubStateConfirmEquipMenu(this, 310, 90, PCid, slot, count, Globals.ITEM_TYPE_RUNE); } else { StateHandler.AddDelay(); base.Input(input); if (direction(input)) { StateHandler.State = new SubStateRuneChange(this, PCid, slot, count); } } }//end input
public SubStateStatusMenu(StateAbstract parent) : base(parent) { StateHandler.AddDelay(); messageBoxes = new MessageBox[1]; colors = new Color[31]; menu = new string[colors.Length]; PC temp = null; for (int i = 0; i < 29; i += 10) { temp = StateHandler.GetPC(i / 10); menu[i] = temp.Name + " " + temp.getTitle(); menu[i + 1] = temp.getExp() + @"/" + (temp.getLevel() * 1000); menu[i + 2] = "Level: " + temp.getLevel(); menu[i + 3] = "Health: " + temp.Health + "/" + temp.MaxHealth; menu[i + 4] = "MP: " + temp.Mp + "/" + temp.MaxMp; menu[i + 5] = "Attack: " + temp.getAttack(); menu[i + 6] = "Defense: " + temp.getDefense(); menu[i + 7] = "Magic: " + temp.getMagic(); menu[i + 8] = "Magic Defense: " + temp.getMagicDefense(); menu[i + 9] = ""; } menu[30] = "Formation: " + FormationHandler.FormName; for (int i = 0; i < colors.Length; i++) { colors[i] = Color.White; } mX = 30; mY = 30; width = 960; height = 690; messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true); }
public SubStateFeatureNotImplemented(StateAbstract parent) : base(parent) { StateHandler.AddDelay(); messageBoxes = new MessageBox[1]; colors = new Color[1]; menu = new string[1]; menu[0] = "This feature is currently not working."; for (int i = 0; i < colors.Length; i++) { colors[i] = Color.White; } mX = 30; mY = 30; width = 960; height = 690; messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true); }
public SubStateDisplayFormation(StateAbstract parent, int formation) : base(parent) { StateHandler.AddDelay(); messageBoxes = new MessageBox[1]; colors = new Color[4]; menu = new string[4]; menu = setFormation(formation); for (int i = 1; i < colors.Length; i++) { colors[i] = Color.DarkGray; } colors[0] = Color.White; mX = 130; mY = 40; width = 0; height = 0; messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true, true); }
public SubStateCombatMenu(StateAbstract parent) : base(parent) { StateHandler.AddDelay(); messageBoxes = new MessageBox[1]; colors = new Color[4]; menu = new string[4]; menu[0] = "Attack"; menu[1] = "Magic"; menu[2] = "Items"; menu[3] = "Defend"; colors[0] = Color.White; colors[1] = Color.DarkGray; colors[2] = Color.DarkGray; colors[3] = Color.DarkGray; mX = 450; mY = 600; width = 185; height = 125; messageBoxes[0] = new MessageBox(mX, mY, width, height, menu, colors, true); }
public override void Input(int input) { if (input == Globals.KEY_UP || input == Globals.KEY_DOWN) { MediaHandler.playSFX(FSCMStrikesBackLogic.Properties.Resources.menuMove, "menuMove"); StateHandler.SetDelay(8); colors[count] = Color.DarkGray; if (input == Globals.KEY_UP) { if (count == 0) { count = menu.Length - 1; } else { count--; } } else if (input == Globals.KEY_DOWN) { count = (count + 1) % menu.Length; } colors[count] = Color.White; int tempVal = (int)(Globals.hmod * height); tempVal /= Globals.FONT_HEIGHT; tempVal -= 1; Color[] tempColor = null; string[] tempMenu = null; int prefCount = tempVal / 2; if (tempVal >= menu.Length || absolute) // The total amount of options is less than the size of the menu box { tempColor = colors; tempMenu = menu; } else { int realCount; tempMenu = new string[tempVal]; if (prefCount > count) { realCount = count; for (int i = 0; i < tempVal; i++) { tempMenu[i] = menu[i]; } } else if (prefCount >= menu.Length - count) { realCount = count - (menu.Length - tempVal); // Menu from menu-tval to menu) for (int i = 0; i < tempVal; i++) { tempMenu[i] = menu[(menu.Length - tempVal) + i]; } } else { realCount = tempVal / 2; for (int i = 0; i < tempVal; i++) { tempMenu[i] = menu[(count - prefCount) + i]; } } tempColor = new Color[tempVal]; for (int i = 0; i < tempVal; i++) { tempColor[i] = Color.DarkGray; } tempColor[realCount] = Color.White; } messageBoxes[0] = new MessageBox(mX, mY, width, height, tempMenu, tempColor, true, messageBoxes[0].Scaling(), messageBoxes[0].IsChildMessage()); } else if (input == Globals.KEY_CANCEL) { StateHandler.AddDelay(); MediaHandler.playSFX(FSCMStrikesBackLogic.Properties.Resources.menuBack, "menuBack"); StateHandler.State = Parent; } }
public override void Input(int input) { switch (input) { case Globals.KEY_DOWN: if (mainActor != null) { mainActor.MoveY(-0.3f); } break; case Globals.KEY_UP: if (mainActor != null) { mainActor.MoveY(0.3f); } break; case Globals.KEY_LEFT: if (mainActor != null) { mainActor.MoveX(-0.3f); } break; case Globals.KEY_RIGHT: if (mainActor != null) { mainActor.MoveX(0.3f); } break; case Globals.KEY_ACCEPT: break; case Globals.KEY_CANCEL: break; case Globals.KEY_MENU: StateHandler.State = new SubStateGameMenu(this); break; case Globals.KEY_MISC: break; // These are meant for rotations around the character. case Globals.KEY_CAMERA_LEFT: Camera.Rotate(-1.0f); break; case Globals.KEY_CAMERA_RIGHT: Camera.Rotate(1.0f); break; case Globals.KEY_START: StateHandler.Paused = !StateHandler.Paused; if (StateHandler.Paused) { MediaHandler.Pause(); } else { MediaHandler.Unpause(); } StateHandler.AddDelay(); break; } }