Closed DarkTerraYT closed 2 months ago
Example usage:
ModHelperPanel mainPanel = InGame.instance.uiRect.gameObject.AddModHelperPanel(new("MainPanel", 1200, 750), VanillaSprites.MainBGPanelBlue); mainPanel.AddText(new("Title", 0, 225, 1200, 200), "Towers"); List<string> towerDisplayNames = []; List<string> towerBaseIds = []; foreach (var towerModel in Game.instance.model.towers.ToList().FindAll(t => t.baseId == t.name)) { towerDisplayNames.Add(towerModel.baseId.GetBtd6Localization()); towerBaseIds.Add(towerModel.baseId); } mainPanel.AddDropdown(new("Dropdown", 0, -75, 850, 400), towerBaseIds.ToIl2CppList(), 1200, new Action<int>(index => { ModHelper.Log<BloonsTD6Mod>($"{towerBaseIds[index]}: {towerDisplayNames[index]}"); //Log the base id compared to the display name }));
This can also help with getting the display names of named mod content when not having access to the mod content
Example usage:
This can also help with getting the display names of named mod content when not having access to the mod content