Use EzTabBar
This commit is contained in:
@@ -13,6 +13,9 @@ using CustomizePlus.UI.Windows.Controls;
|
|||||||
using CustomizePlus.UI.Windows.MainWindow.Tabs.Profiles;
|
using CustomizePlus.UI.Windows.MainWindow.Tabs.Profiles;
|
||||||
using CustomizePlus.UI.Windows.MainWindow.Tabs;
|
using CustomizePlus.UI.Windows.MainWindow.Tabs;
|
||||||
using CustomizePlus.Templates;
|
using CustomizePlus.Templates;
|
||||||
|
using ECommons.ImGuiMethods;
|
||||||
|
using static System.Windows.Forms.AxHost;
|
||||||
|
using Dalamud.Interface.Colors;
|
||||||
|
|
||||||
namespace CustomizePlus.UI.Windows.MainWindow;
|
namespace CustomizePlus.UI.Windows.MainWindow;
|
||||||
|
|
||||||
@@ -83,50 +86,13 @@ public class MainWindow : Window, IDisposable
|
|||||||
using (var disabled = ImRaii.Disabled(_fantasiaPlusDetectService.IsFantasiaPlusInstalled || _hookingService.RenderHookFailed || _hookingService.MovementHookFailed))
|
using (var disabled = ImRaii.Disabled(_fantasiaPlusDetectService.IsFantasiaPlusInstalled || _hookingService.RenderHookFailed || _hookingService.MovementHookFailed))
|
||||||
{
|
{
|
||||||
LockWindowClosureIfNeeded();
|
LockWindowClosureIfNeeded();
|
||||||
if (ImGui.BeginTabBar("##tabs", ImGuiTabBarFlags.None)) //todo: remember last selected tab
|
ImGuiEx.EzTabBar("##tabs", [
|
||||||
{
|
("Settings", _settingsTab.Draw, null, true),
|
||||||
if (ImGui.BeginTabItem("Settings"))
|
("Templates", _templatesTab.Draw, null, true),
|
||||||
{
|
("Profiles", _profilesTab.Draw, null, true),
|
||||||
_settingsTab.Draw();
|
(_configuration.DebuggingModeEnabled ? "IPC Test" : null, _ipcTestTab.Draw, ImGuiColors.DalamudGrey, true),
|
||||||
ImGui.EndTabItem();
|
(_configuration.DebuggingModeEnabled ? "State monitoring" : null, _stateMonitoringTab.Draw, ImGuiColors.DalamudGrey, true),
|
||||||
}
|
]);
|
||||||
|
|
||||||
if (ImGui.BeginTabItem("Templates"))
|
|
||||||
{
|
|
||||||
_templatesTab.Draw();
|
|
||||||
ImGui.EndTabItem();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui.BeginTabItem("Profiles"))
|
|
||||||
{
|
|
||||||
_profilesTab.Draw();
|
|
||||||
ImGui.EndTabItem();
|
|
||||||
}
|
|
||||||
|
|
||||||
//if(_messagesTab.IsVisible)
|
|
||||||
//{
|
|
||||||
/*if (ImGui.BeginTabItem("Messages"))
|
|
||||||
{
|
|
||||||
_messagesTab.Draw();
|
|
||||||
ImGui.EndTabItem();
|
|
||||||
}*/
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (_configuration.DebuggingModeEnabled)
|
|
||||||
{
|
|
||||||
if (ImGui.BeginTabItem("IPC Test"))
|
|
||||||
{
|
|
||||||
_ipcTestTab.Draw();
|
|
||||||
ImGui.EndTabItem();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui.BeginTabItem("State monitoring"))
|
|
||||||
{
|
|
||||||
_stateMonitoringTab.Draw();
|
|
||||||
ImGui.EndTabItem();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_pluginStateBlock.Draw(yPos);
|
_pluginStateBlock.Draw(yPos);
|
||||||
|
|||||||
Reference in New Issue
Block a user