public CLPS_Form(LevelEditorForm _owner) { InitializeComponent(); this._owner = _owner; for (int i = 0; i < 52; i++) cbxLevels.Items.Add(i + " - " + Strings.LevelNames[i]); loadGlobalCLPSTypes(); loadCLPSData(); }
public TextureAnimationForm(LevelEditorForm _owner) { InitializeComponent(); this._owner = _owner; for (int i = 0; i < _owner.m_NumAreas; i++) { lbxArea.Items.Add("" + i); } lbxArea.SelectedIndex = 0;//Make sure an area is selected reloadData(); }
private void MinimapEditor_Load(object sender, EventArgs e) { LevelEditorForm _owner = (LevelEditorForm)Owner; this._owner = _owner; m_NumAreas = _owner.m_NumAreas; m_CurArea = 0; m_TileMapFiles = new NitroFile[m_NumAreas]; txtCoordScale.Text = "" + ((_owner.m_LevelSettings.MinimapCoordinateScale) / 1000f); int i, pos = tsMinimapEditor.Items.IndexOf(tslBeforeAreaBtns) + 1; for (i = 0; i < m_NumAreas; i++, pos++) { ToolStripButton btn = new ToolStripButton(i.ToString(), null, new EventHandler(btnAreaXX_Click)); btn.Tag = i; tsMinimapEditor.Items.Insert(pos, btn); } ((ToolStripButton)tsMinimapEditor.Items[pos - i]).Checked = true; for (int j = 1024; j >= 0; j -= 8) { dmnWidth.Items.Add(j); dmnHeight.Items.Add(j); } for (int j = 15; j >= 0; j--) { dmnPaletteRow.Items.Add(j); } txtZoom.Text = "" + m_Zoom; LoadMinimapFiles(); RedrawMinimap(m_IsUsingTileMap, m_SizeX, m_SizeY, m_BPP); }
private void OpenLevel(int levelid) { if ((levelid < 0) || (levelid >= 52)) return; foreach (LevelEditorForm lvledit in Program.m_LevelEditors) { if (lvledit.m_LevelID == levelid) { lvledit.Focus(); return; } } // try { LevelEditorForm newedit = new LevelEditorForm(Program.m_ROM, levelid); newedit.Show(); Program.m_LevelEditors.Add(newedit); } /*catch (Exception ex) { MessageBox.Show("The following error occured while opening the level:\n" + ex.Message, Program.AppTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); }*/ }