private void nIndex_ValueChanged(object sender, EventArgs e) { if (nIndex.Value == -1) { return; } nMap.Value = transitionLoader.transitions[(int)nIndex.Value].map; cboDirection.SelectedIndex = transitionLoader.transitions[(int)nIndex.Value].direction; nFrom.Minimum = nTo.Minimum = -1; nFrom.Value = PaletteLoader.GetPaletteIndex(gb, game, transitionLoader.transitions[(int)nIndex.Value].from); nTo.Value = PaletteLoader.GetPaletteIndex(gb, game, transitionLoader.transitions[(int)nIndex.Value].to); nFrom.Minimum = nTo.Minimum = 0; }
public frmTransitions(TransitionLoader tl, GBHL.GBFile g, Program.GameTypes ga) { InitializeComponent(); gb = g; game = ga; transitionLoader = tl; nIndex.Maximum = tl.transitions.Count - 1; if (tl.transitions.Count == 0) { groupBox1.Enabled = false; } else { nMap.Value = transitionLoader.transitions[(int)nIndex.Value].map; cboDirection.SelectedIndex = transitionLoader.transitions[(int)nIndex.Value].direction; nFrom.Value = PaletteLoader.GetPaletteIndex(gb, game, transitionLoader.transitions[(int)nIndex.Value].from); nTo.Value = PaletteLoader.GetPaletteIndex(gb, game, transitionLoader.transitions[(int)nIndex.Value].to); } }