void ShowModelData(string mdlName) { if (texts.Count > 0) { for (int i = 0; i < texts.Count; i++) { texts[i].Destroy(true); } texts.Clear(); } Vector2 initialPos = new Vector2(20, 90); if (txt != null) { txt.ChangeText("Name: " + mdlName); } else { txt = new TextItem(ID + "txt", 0, "Name: " + mdlName, "Eon/Fonts/Arial12", initialPos, Color.White, true); AttachComponent(txt); } initialPos.Y += 20; string[] meshNames = mdl.GetMeshNames(); if (meshNames.Length > 0) { for (int i = 0; i < meshNames.Length; i++) { TextItem t = new TextItem(ID + "txt" + meshNames[i], 0, "Mesh: " + meshNames[i], "Eon/Fonts/Arial12", initialPos, Color.White, true); texts.Add(t); AttachComponent(t); initialPos.Y += 14; } initialPos.Y += 30; string[] boneNames = mdl.GetBoneNames(); if (boneNames.Length > 0) { for (int i = 0; i < boneNames.Length; i++) { TextItem t = new TextItem(ID + "txtBone" + boneNames[i], 0, "Bone: " + boneNames[i], "Eon/Fonts/Arial12", initialPos, Color.White, true); texts.Add(t); AttachComponent(t); initialPos.Y += 14; } initialPos.Y += 30; } string text = "Total Vertices: "; if (mdl.GetVertexCount() > 0) { text += mdl.GetVertexCount(); } else { text += "0"; } TextItem v = new TextItem(ID + "txtVerts", 0, text, "Eon/Fonts/Arial12", initialPos, Color.White, true); texts.Add(v); AttachComponent(v); } else { initialPos.Y += 14; TextItem t = new TextItem(ID + "txtNone", 0, "//No meshes are present in the model//", "Eon/Fonts/Arial12", initialPos, Color.Red, true); texts.Add(t); AttachComponent(t); } }