private void ImguiUpdateRender(ImguiMode mode) { imgui.Mode = mode; if (imgui.DoTextButton(new Vector2(10, 10), new TextDrawData("Expand Text", font, Color.Yellow), Color.Blue)) { if (test[test.Length - 1] == 'a') { test += 'b'; } else { test += 'a'; } } imgui.DoText(new Vector2(10, 100), new TextDrawData(test, font, Color.Black)); // Prefab List { int listWidth = 200; Panel panel = new Panel(imgui, new Vector2(graphics.PreferredBackBufferWidth - listWidth, 50), listWidth, graphics.PreferredBackBufferHeight - 100); List <string> categories = Prefabs.Select(x => x.Category).Distinct().ToList(); int newCategoryIndex = panel.DoDropDown(ref isCategoryDropDownOpen, new TextDrawData("Category", font, Color.Yellow), categories, categoryIndex); if (newCategoryIndex != -1 && newCategoryIndex != categoryIndex) { prefabScroll = 0; categoryIndex = newCategoryIndex; } panel.DoLine(Color.Yellow); panel.BeginScrollableSection(prefabScroll); foreach (Prefab prefab in Prefabs.Where(x => x.Category == categories[categoryIndex])) { panel.DoText(new TextDrawData(prefab.Name, font, Color.Yellow)); } panel.EndScrollableSection(ref prefabScroll); } }