private void cbLevel_SelectedIndexChanged(object sender, EventArgs e)
{
if (!UtilsGui.askToSave(ref dirty, saveToFile, returnCbLevelIndex))
{
return;
}
if (cbLayoutNo.SelectedIndex == -1)
{
return;
}
curActiveLayout = cbLayoutNo.SelectedIndex;
curWidth = ConfigScript.getLevelWidth(curActiveLayout);
curHeight = ConfigScript.getLevelHeight(curActiveLayout);
drawMode = MapDrawMode.Screens;
curActiveBlock = 0;
activeBlock.Image = screenImages.Images[0];
updatePanelsVisibility();
cbLayoutNo.Items.Clear();
foreach (var lr in ConfigScript.getLevelRecs())
{
cbLayoutNo.Items.Add(String.Format("0x{0:X} ({1}x{2})", lr.layoutAddr, lr.width, lr.height));
}
UtilsGui.setCbIndexWithoutUpdateLevel(cbLayoutNo, cbLevel_SelectedIndexChanged, curActiveLayout);
reloadLevelLayer();
}