public void DetermineAvailableObjects() { m_ObjAvailable.Clear(); for (int i = 0; i < LevelObject.NUM_OBJ_TYPES; i++) { ObjectDatabase.ObjectInfo objinfo = ObjectDatabase.m_ObjectInfo[i]; bool available = true; if (objinfo.m_BankRequirement == 1) { if (m_LevelSettings.ObjectBanks[objinfo.m_NumBank] != objinfo.m_BankSetting) { available = false; } } else if (objinfo.m_BankRequirement == 2) { available = false; } m_ObjAvailable.Add((ushort)i, available); } //m_ObjAvailable.Add(511, true); }
private void ObjectListForm_Load(object sender, EventArgs e) { m_ObjAvailable = ((LevelEditorForm)Owner).m_Level.m_ObjAvailable; m_BasicDescriptions = new Dictionary <ushort, string>(); lbxObjectList.BeginUpdate(); for (int i = 0; i < LevelObject.NUM_OBJ_TYPES; i++) { ObjectDatabase.ObjectInfo objinfo = ObjectDatabase.m_ObjectInfo[i]; m_ObjectListText[i] = string.Format("{0} - {1}", objinfo.m_ID, objinfo.m_Name); if (objinfo.m_Name != null) { if (objinfo.m_Name.Length > 0) { lbxObjectList.Items.Insert(lbxObjectList.Items.Count, m_ObjectListText[i]); m_ObjectIndexIDMap[lbxObjectList.Items.Count] = i; } } m_BasicDescriptions.Add((ushort)i, objinfo.GetBasicInfo()); } lbxObjectList.EndUpdate(); lbxObjectList.SelectedIndex = 0; tbxObjSearch.Text = "something"; tbxObjSearch.Text = ""; }
private void lbxObjectList_SelectedIndexChanged(object sender, EventArgs e) { ObjectID = (ushort)m_ObjectIndexIDMap[lbxObjectList.SelectedIndex]; ObjectDatabase.ObjectInfo objinfo = ObjectDatabase.m_ObjectInfo[ObjectID]; rtbObjectDesc.Text = ""; AppendToObjectDesc(objinfo.m_Name, FontStyle.Bold, rtbObjectDesc.ForeColor); AppendToObjectDesc("\n\n" + objinfo.m_Description, FontStyle.Regular, rtbObjectDesc.ForeColor); }
private void ObjectListForm_Load(object sender, EventArgs e) { m_ObjAvailable = ((LevelEditorForm)Owner).m_ObjAvailable; m_BasicDescriptions = new Dictionary <ushort, string>(); lbxObjectList.BeginUpdate(); for (int i = 0; i < 326; i++) { ObjectDatabase.ObjectInfo objinfo = ObjectDatabase.m_ObjectInfo[i]; m_ObjectListText[i] = string.Format("{0} - {1}", i, objinfo.m_Name); lbxObjectList.Items.Insert(i, m_ObjectListText[i]); m_BasicDescriptions.Add((ushort)i, objinfo.GetBasicInfo()); } m_ObjectListText[326] = "511 - Minimap change"; lbxObjectList.Items.Insert(326, m_ObjectListText[326]); lbxObjectList.EndUpdate(); lbxObjectList.SelectedIndex = (ObjectID == 511) ? (ushort)326 : ObjectID; }
private void lbxObjectList_SelectedIndexChanged(object sender, EventArgs e) { ObjectID = (ushort)m_ObjectIndexIDMap[lbxObjectList.SelectedIndex]; if (ObjectID == LevelObject.NUM_OBJ_TYPES) ObjectID = 511; // haxx // describe the object if (ObjectID != 511) { ObjectDatabase.ObjectInfo objinfo = ObjectDatabase.m_ObjectInfo[ObjectID]; rtbObjectDesc.Text = ""; AppendToObjectDesc(objinfo.m_Name, FontStyle.Bold, rtbObjectDesc.ForeColor); AppendToObjectDesc("\n\n" + objinfo.m_Description, FontStyle.Regular, rtbObjectDesc.ForeColor); } else { rtbObjectDesc.Text = ""; AppendToObjectDesc("Minimap change", FontStyle.Bold, rtbObjectDesc.ForeColor); AppendToObjectDesc("\n\nChanges the minimap shown on the bottom screen when the user passes near it.", FontStyle.Regular, rtbObjectDesc.ForeColor); } }