示例#1
0
 private int FillSpellPane(TabbedPane pane, int index, int buttonIndexStart)
 {
     Spell[] knownSpells = battle.allies[index].GetSpells();
     for (int i = 0; i < knownSpells.Length; i++)
     {
         SpellButton sb = new SpellButton(this, battle, knownSpells[i], new Vector2i(size.width - 97, 5 + i * 31), index != Game.peerId);
         if (index == Game.peerId)
         {
             sb.SetKeybind(KeyCode.Alpha1 + i);
         }
         spellButtons[i + buttonIndexStart]         = sb;
         spellButtonOwnership[i + buttonIndexStart] = index;
         AddUIObj(sb);
         pane.AddToTab(index, sb);
     }
     return(buttonIndexStart + knownSpells.Length);
 }