mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 12:23:39 +01:00
Remove ImGui.NET entirely
This commit is contained in:
parent
95ec633cc5
commit
90e426b325
29 changed files with 32 additions and 173 deletions
|
|
@ -493,7 +493,7 @@ internal partial class InterfaceManager : IInternalDisposableService
|
|||
|
||||
var value = enabled ? 1u : 0u;
|
||||
global::Windows.Win32.PInvoke.DwmSetWindowAttribute(
|
||||
new(this.GameWindowHandle.Value),
|
||||
new(new IntPtr(this.GameWindowHandle.Value)),
|
||||
DWMWINDOWATTRIBUTE.DWMWA_USE_IMMERSIVE_DARK_MODE,
|
||||
&value,
|
||||
sizeof(uint)).ThrowOnFailure();
|
||||
|
|
@ -723,7 +723,7 @@ internal partial class InterfaceManager : IInternalDisposableService
|
|||
// NOTE (Chiv) Explicitly deactivate on dalamud boot
|
||||
ImGui.GetIO().ConfigFlags &= ~ImGuiConfigFlags.NavEnableGamepad;
|
||||
|
||||
ImGuiHelpers.MainViewportNew = ImGui.GetMainViewport();
|
||||
ImGuiHelpers.MainViewport = ImGui.GetMainViewport();
|
||||
|
||||
Log.Information("[IM] Scene & ImGui setup OK!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -672,6 +672,6 @@ internal unsafe class UiDebug
|
|||
|
||||
position += ImGuiHelpers.MainViewport.Pos;
|
||||
|
||||
ImGui.GetForegroundDrawList(ImGuiHelpers.MainViewportNew).AddRect(position, position + size, nodeVisible ? 0xFF00FF00 : 0xFF0000FF);
|
||||
ImGui.GetForegroundDrawList(ImGuiHelpers.MainViewport).AddRect(position, position + size, nodeVisible ? 0xFF00FF00 : 0xFF0000FF);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,14 +23,14 @@ internal class AddonPopoutWindow : Window, IDisposable
|
|||
: base(name)
|
||||
{
|
||||
this.addonTree = tree;
|
||||
this.PositionConditionNew = ImGuiCond.Once;
|
||||
this.PositionCondition = ImGuiCond.Once;
|
||||
|
||||
var pos = ImGui.GetMousePos() + new Vector2(50, -50);
|
||||
var workSize = ImGui.GetMainViewport().WorkSize;
|
||||
var pos2 = new Vector2(Math.Min(workSize.X - 750, pos.X), Math.Min(workSize.Y - 250, pos.Y));
|
||||
|
||||
this.Position = pos2;
|
||||
this.SizeConditionNew = ImGuiCond.Once;
|
||||
this.SizeCondition = ImGuiCond.Once;
|
||||
this.Size = new(700, 200);
|
||||
this.IsOpen = true;
|
||||
this.SizeConstraints = new() { MinimumSize = new(100, 100) };
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ internal unsafe class NodePopoutWindow : Window, IDisposable
|
|||
|
||||
this.Position = pos2;
|
||||
this.IsOpen = true;
|
||||
this.PositionConditionNew = ImGuiCond.Once;
|
||||
this.SizeConditionNew = ImGuiCond.Once;
|
||||
this.PositionCondition = ImGuiCond.Once;
|
||||
this.SizeCondition = ImGuiCond.Once;
|
||||
this.Size = new(700, 200);
|
||||
this.SizeConstraints = new() { MinimumSize = new(100, 100) };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ internal sealed class ChangelogWindow : Window, IDisposable
|
|||
ImGui.SetNextWindowBgAlpha(Math.Clamp(this.windowFade.EasedPoint.X, 0, 0.9f));
|
||||
|
||||
this.Size = new Vector2(900, 400);
|
||||
this.SizeConditionNew = ImGuiCond.Always;
|
||||
this.SizeCondition = ImGuiCond.Always;
|
||||
|
||||
// Center the window on the main viewport
|
||||
var viewportPos = ImGuiHelpers.MainViewport.Pos;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ internal sealed class ColorDemoWindow : Window
|
|||
: base("Dalamud Colors Demo")
|
||||
{
|
||||
this.Size = new Vector2(600, 500);
|
||||
this.SizeConditionNew = ImGuiCond.FirstUseEver;
|
||||
this.SizeCondition = ImGuiCond.FirstUseEver;
|
||||
|
||||
this.colors = new List<(string Name, Vector4 Color)>()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ internal sealed class ComponentDemoWindow : Window
|
|||
: base("Dalamud Components Demo")
|
||||
{
|
||||
this.Size = new Vector2(600, 500);
|
||||
this.SizeConditionNew = ImGuiCond.FirstUseEver;
|
||||
this.SizeCondition = ImGuiCond.FirstUseEver;
|
||||
|
||||
this.RespectCloseHotkey = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ internal class ConsoleWindow : Window, IDisposable
|
|||
cm.AddAlias("clear", "cls");
|
||||
|
||||
this.Size = new Vector2(500, 400);
|
||||
this.SizeConditionNew = ImGuiCond.FirstUseEver;
|
||||
this.SizeCondition = ImGuiCond.FirstUseEver;
|
||||
|
||||
this.RespectCloseHotkey = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ internal class DataWindow : Window, IDisposable
|
|||
: base("Dalamud Data", ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoScrollWithMouse)
|
||||
{
|
||||
this.Size = new Vector2(400, 300);
|
||||
this.SizeConditionNew = ImGuiCond.FirstUseEver;
|
||||
this.SizeCondition = ImGuiCond.FirstUseEver;
|
||||
|
||||
this.RespectCloseHotkey = false;
|
||||
this.orderedModules = this.modules.OrderBy(module => module.DisplayName);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ internal class GamepadModeNotifierWindow : Window
|
|||
true)
|
||||
{
|
||||
this.Size = Vector2.Zero;
|
||||
this.SizeConditionNew = ImGuiCond.Always;
|
||||
this.SizeCondition = ImGuiCond.Always;
|
||||
this.IsOpen = false;
|
||||
|
||||
this.RespectCloseHotkey = false;
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ internal class PluginInstallerWindow : Window, IDisposable
|
|||
this.imageCache = imageCache;
|
||||
|
||||
this.Size = new Vector2(830, 570);
|
||||
this.SizeConditionNew = ImGuiCond.FirstUseEver;
|
||||
this.SizeCondition = ImGuiCond.FirstUseEver;
|
||||
|
||||
this.SizeConstraints = new WindowSizeConstraints
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ internal class PluginStatWindow : Window
|
|||
this.RespectCloseHotkey = false;
|
||||
|
||||
this.Size = new Vector2(810, 520);
|
||||
this.SizeConditionNew = ImGuiCond.FirstUseEver;
|
||||
this.SizeCondition = ImGuiCond.FirstUseEver;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ internal class SelfTestWindow : Window
|
|||
: base("Dalamud Self-Test", ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoScrollWithMouse)
|
||||
{
|
||||
this.Size = new Vector2(800, 800);
|
||||
this.SizeConditionNew = ImGuiCond.FirstUseEver;
|
||||
this.SizeCondition = ImGuiCond.FirstUseEver;
|
||||
|
||||
this.RespectCloseHotkey = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Game.Command;
|
||||
using Dalamud.Game.Gui;
|
||||
using Dalamud.Game.Text;
|
||||
using Dalamud.Game.Text.SeStringHandling;
|
||||
|
||||
using ImGuiNET;
|
||||
|
||||
namespace Dalamud.Interface.Internal.Windows.SelfTest.Steps;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ internal class SettingsWindow : Window
|
|||
MaximumSize = new Vector2(1780, 940),
|
||||
};
|
||||
|
||||
this.SizeConditionNew = ImGuiCond.FirstUseEver;
|
||||
this.SizeCondition = ImGuiCond.FirstUseEver;
|
||||
|
||||
this.tabs =
|
||||
[
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class SettingsTabDtr : SettingsTab
|
|||
// TODO: Maybe we can also resort the rest of the bar in the future?
|
||||
// var isRequired = search is Configuration.SearchSetting.Internal or Configuration.SearchSetting.MacroLinks;
|
||||
|
||||
ImGui.PushFont(UiBuilder.IconFontNew);
|
||||
ImGui.PushFont(UiBuilder.IconFont);
|
||||
|
||||
var arrowUpText = $"{FontAwesomeIcon.ArrowUp.ToIconString()}##{title}";
|
||||
if (i == 0)
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ internal class TitleScreenMenuWindow : Window, IDisposable
|
|||
this.ForceMainWindow = true;
|
||||
|
||||
this.Position = new Vector2(0, 200);
|
||||
this.PositionConditionNew = ImGuiCond.Always;
|
||||
this.PositionCondition = ImGuiCond.Always;
|
||||
this.RespectCloseHotkey = false;
|
||||
|
||||
this.shadeTexture = new(() => dalamudAssetManager.GetDalamudTextureWrap(DalamudAsset.TitleScreenMenuShade));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue