Beispiel #1
0
 public override void Initialize()
 {
     base.Initialize();
     SetSendActions <MenuInstruction>(Process, 0);
     instructionHolder = ReceiveFunction(1);
     holderIndicies    = new List <int>();
     holderIndicies.Add(1);
 }
Beispiel #2
0
 public override void CancelUI()
 {
     if (holderIndicies.Count > 1)
     {
         holderIndicies.Remove(instructionHolder.ID);
         instructionHolder = ReceiveFunction(holderIndicies[holderIndicies.Count - 1]);
         DisplayData();
         return;
     }
     instructionHolder.SetSelectionIndex(0);
     EndAction();
 }
Beispiel #3
0
 public void Process(MenuInstruction sentItem)
 {
     instructionHolder.SetSelectionIndex(sentItem.ID);
     if (sentItem is CycleMenuInstruction)
     {
         CycleMenuInstruction instruction = (CycleMenuInstruction)sentItem;
         instructionHolder = ReceiveFunction(instruction.HolderIndex);
         holderIndicies.Add(instructionHolder.ID);
         DisplayData();
         return;
     }
     else if (sentItem.Extension == ExtensionEnum.GamePlay)
     {
         instructionHolder.SetSelectionIndex(0);
     }
     sentItem.Use();
 }