private void LstWalls_MouseClick(object sender, MouseEventArgs e) { BtnZoomInWall.Visible = true; BtnZoomOutWall.Visible = true; HideWallTextInterface(); foreach (ListViewItem Item in LstWalls.Items) { //We only support selecting one item at a time. if (Item.Selected) { byte[] Hash = FileUtilities.GenerateHash(Item.Text); int ArchiveIndex = 0; //This is NOT effective, but it's a tool so it doesn't have to be super fast... foreach (FAR1Archive Archive in m_Archives) { ArchiveIndex++; if (Archive.ContainsEntry(Hash)) { m_CurrentIff = new Iff(RndWalls.GraphicsDevice); m_CurrentIff.Init(Archive.GrabEntry(Hash), false); RndWalls.AddSprite(m_CurrentIff.SPRs[0]); DirectoryInfo DirInfo = new DirectoryInfo(Archive.Path); LblArchive.Text = "Wall is in: " + DirInfo.Parent + "\\" + Path.GetFileName(Archive.Path); PopulateLanguagesAndStrings(); } } } } }
/// <summary> /// User wanted to zoom out a wall. /// </summary> private void BtnZoomOutWall_Click(object sender, EventArgs e) { if (m_ZoomLevel > 0) { m_ZoomLevel--; } RndWalls.AddSprite(m_CurrentIff.SPRs[m_ZoomLevel]); }