Exemplo n.º 1
0
 private void RefreshAudioComboBoxes(CharacterAudioSlotSelection audio)
 {
     comboBoxVoiceSlot1.SelectedIndex = audio.Voice1;
     comboBoxVoiceSlot2.SelectedIndex = audio.Voice2;
     comboBoxSoundSlot1.SelectedIndex = audio.Sound1;
     comboBoxSoundSlot2.SelectedIndex = audio.Sound2;
 }
Exemplo n.º 2
0
        private void comboBoxSoundSlot2_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (_SmashProjectManager == null)
            {
                return;
            }

            CharacterAudioSlotSelection audio = _SmashProjectManager._CharacterModsPage.CurrentFighterAudioSlotSelections;

            if (audio == null)
            {
                return;
            }
            audio.Sound2 = comboBoxSoundSlot2.SelectedIndex;
        }
 private void GetCurrentCharacterActiveMods()
 {
     CurrentFighterActiveSlotMods.Clear();
     CurrentFighterActiveGeneralMods.Clear();
     for (int i = 0; i < _SmashProjectManager.CurrentProject.ActiveCharacterSlotMods.Count; ++i)
     {
         if (_SmashProjectManager.CurrentProject.ActiveCharacterSlotMods[i].CharacterID == _CurrentFighter.id)
         {
             CurrentFighterActiveSlotMods.Add(_SmashProjectManager.CurrentProject.ActiveCharacterSlotMods[i]);
         }
     }
     for (int i = 0; i < _SmashProjectManager.CurrentProject.ActiveCharacterGeneralMods.Count; ++i)
     {
         if (_SmashProjectManager.CurrentProject.ActiveCharacterGeneralMods[i].CharacterID == _CurrentFighter.id)
         {
             CurrentFighterActiveGeneralMods.Add(_SmashProjectManager.CurrentProject.ActiveCharacterGeneralMods[i]);
         }
     }
     CurrentFighterAudioSlotSelections = null;
     if (_CurrentFighter.voicePackSlots != DB.Fighter.VoicePackSlots.All || _CurrentFighter.soundPackSlots != DB.Fighter.SoundPackSlots.All)
     {
         for (int i = 0; i < _SmashProjectManager.CurrentProject.CharacterAudioSlotSelections.Count; ++i)
         {
             if (_SmashProjectManager.CurrentProject.CharacterAudioSlotSelections[i].CharacterID == _CurrentFighter.id)
             {
                 CurrentFighterAudioSlotSelections = _SmashProjectManager.CurrentProject.CharacterAudioSlotSelections[i];
                 break;
             }
         }
         if (CurrentFighterAudioSlotSelections == null)
         {
             CurrentFighterAudioSlotSelections             = new CharacterAudioSlotSelection();
             CurrentFighterAudioSlotSelections.CharacterID = _CurrentFighter.id;
             _SmashProjectManager.CurrentProject.CharacterAudioSlotSelections.Add(CurrentFighterAudioSlotSelections);
         }
     }
 }
Exemplo n.º 4
0
        public void ChangeSelectedFighter(DB.Fighter a_fighter)
        {
            if (a_fighter == _CurrentFighter)
            {
                return;
            }
            _CurrentFighter = a_fighter;
            if (_Rows != null)
            {
                for (int i = 0; i < _Rows.Count; ++i)
                {
                    _Rows[i].ChangeSelectedFighter(_CurrentFighter);
                }
            }
            switch (_CurrentFighter.voicePackSlots)
            {
            case (DB.Fighter.VoicePackSlots.All): groupBoxVoiceMods.Visible = false; break;

            case (DB.Fighter.VoicePackSlots.One):
                comboBoxVoiceSlot2.Visible = false;
                groupBoxVoiceMods.Visible  = true;
                break;

            case (DB.Fighter.VoicePackSlots.Two):
                comboBoxVoiceSlot2.Visible = true;
                groupBoxVoiceMods.Visible  = true;
                break;
            }
            switch (_CurrentFighter.soundPackSlots)
            {
            case (DB.Fighter.SoundPackSlots.All): groupBoxSoundSlots.Visible = false; break;

            case (DB.Fighter.SoundPackSlots.One):
                comboBoxSoundSlot2.Visible = false;
                groupBoxSoundSlots.Visible = true;
                break;

            case (DB.Fighter.SoundPackSlots.Two):
                comboBoxSoundSlot2.Visible = true;
                groupBoxSoundSlots.Visible = true;
                break;
            }
            if (!groupBoxVoiceMods.Visible && !groupBoxSoundSlots.Visible)
            {
                tableLayoutPanel4.SetRowSpan(panelModList, 2);
            }
            else
            {
                CharacterAudioSlotSelection audio = _SmashProjectManager._CharacterModsPage.CurrentFighterAudioSlotSelections;
                if (audio != null)
                {
                    RefreshAudioComboBoxes(audio);
                }

                tableLayoutPanel4.SetRowSpan(panelModList, 1);
                if (groupBoxVoiceMods.Visible)
                {
                    if (groupBoxSoundSlots.Visible)
                    {
                        tableLayoutPanel1.SetColumnSpan(groupBoxVoiceMods, 1);
                        tableLayoutPanel1.SetColumnSpan(groupBoxSoundSlots, 1);
                        tableLayoutPanel1.SetColumn(groupBoxSoundSlots, 1);
                    }
                    else
                    {
                        tableLayoutPanel1.SetColumnSpan(groupBoxVoiceMods, 2);
                    }
                }
                else
                {
                    tableLayoutPanel1.SetColumnSpan(groupBoxSoundSlots, 2);
                    tableLayoutPanel1.SetColumn(groupBoxSoundSlots, 1);
                }
            }
            RefreshRowData();
        }