private void _UpdateBuildTabsList() { buildTabsList.Clear(); int currentTab = buildTabs.CurrentTab; bool noCurrentTab = currentTab < 0 || currentTab >= buildTabs.GetTabCount(); for (int i = 0; i < buildTabs.GetChildCount(); i++) { var tab = (BuildTab)buildTabs.GetChild(i); if (tab == null) { continue; } string itemName = Path.GetFileNameWithoutExtension(tab.BuildInfo.Solution); itemName += " [" + tab.BuildInfo.Configuration + "]"; buildTabsList.AddItem(itemName, tab.IconTexture); string itemTooltip = "Solution: " + tab.BuildInfo.Solution; itemTooltip += "\nConfiguration: " + tab.BuildInfo.Configuration; itemTooltip += "\nStatus: "; if (tab.BuildExited) { itemTooltip += tab.BuildResult == BuildTab.BuildResults.Success ? "Succeeded" : "Errored"; } else { itemTooltip += "Running"; } if (!tab.BuildExited || tab.BuildResult == BuildTab.BuildResults.Error) { itemTooltip += $"\nErrors: {tab.ErrorCount}"; } itemTooltip += $"\nWarnings: {tab.WarningCount}"; buildTabsList.SetItemTooltip(i, itemTooltip); if (noCurrentTab || currentTab == i) { buildTabsList.Select(i); _BuildTabsItemSelected(i); } } }
private void _UpdateBuildTabsList() { buildTabsList.Clear(); int?currentTab = buildTabs.CurrentTab; if (currentTab < 0 || currentTab >= buildTabs.GetTabCount()) { currentTab = null; } for (int i = 0; i < buildTabs.GetChildCount(); i++) { _UpdateBuildTab(i, currentTab); } }
public void ShowBuildTab() { for (int i = 0; i < panelTabs.GetTabCount(); i++) { if (panelTabs.GetTabControl(i) == panelBuildsTab) { panelTabs.CurrentTab = i; GodotSharpEditor.Instance.MakeBottomPanelItemVisible(this); return; } } GD.PushError("Builds tab not found"); }