mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 15:47:22 +01:00
make download ui clickthrough, add option to move it, add forbidden transfers list
This commit is contained in:
parent
af06fd9b87
commit
cf87ed5019
7 changed files with 109 additions and 9 deletions
|
|
@ -13,6 +13,7 @@ public class DownloadUi : Window, IDisposable
|
|||
private readonly WindowSystem _windowSystem;
|
||||
private readonly Configuration _pluginConfiguration;
|
||||
private readonly ApiController _apiController;
|
||||
private readonly UiShared _uiShared;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
|
|
@ -20,12 +21,13 @@ public class DownloadUi : Window, IDisposable
|
|||
_windowSystem.RemoveWindow(this);
|
||||
}
|
||||
|
||||
public DownloadUi(WindowSystem windowSystem, Configuration pluginConfiguration, ApiController apiController) : base("Mare Synchronos Downloads")
|
||||
public DownloadUi(WindowSystem windowSystem, Configuration pluginConfiguration, ApiController apiController, UiShared uiShared) : base("Mare Synchronos Downloads")
|
||||
{
|
||||
Logger.Debug("Creating " + nameof(DownloadUi));
|
||||
_windowSystem = windowSystem;
|
||||
_pluginConfiguration = pluginConfiguration;
|
||||
_apiController = apiController;
|
||||
_uiShared = uiShared;
|
||||
|
||||
SizeConstraints = new WindowSizeConstraints()
|
||||
{
|
||||
|
|
@ -33,12 +35,38 @@ public class DownloadUi : Window, IDisposable
|
|||
MinimumSize = new Vector2(300, 90)
|
||||
};
|
||||
|
||||
Flags = ImGuiWindowFlags.NoDecoration | ImGuiWindowFlags.NoBackground;
|
||||
Flags |= ImGuiWindowFlags.NoMove;
|
||||
Flags |= ImGuiWindowFlags.NoBackground;
|
||||
Flags |= ImGuiWindowFlags.NoInputs;
|
||||
Flags |= ImGuiWindowFlags.NoNavFocus;
|
||||
Flags |= ImGuiWindowFlags.NoResize;
|
||||
Flags |= ImGuiWindowFlags.NoScrollbar;
|
||||
Flags |= ImGuiWindowFlags.NoTitleBar;
|
||||
Flags |= ImGuiWindowFlags.NoDecoration;
|
||||
|
||||
windowSystem.AddWindow(this);
|
||||
IsOpen = true;
|
||||
}
|
||||
|
||||
public override void PreDraw()
|
||||
{
|
||||
base.PreDraw();
|
||||
if (_uiShared.EditTrackerPosition)
|
||||
{
|
||||
Flags &= ~ImGuiWindowFlags.NoMove;
|
||||
Flags &= ~ImGuiWindowFlags.NoBackground;
|
||||
Flags &= ~ImGuiWindowFlags.NoInputs;
|
||||
Flags &= ~ImGuiWindowFlags.NoResize;
|
||||
}
|
||||
else
|
||||
{
|
||||
Flags |= ImGuiWindowFlags.NoMove;
|
||||
Flags |= ImGuiWindowFlags.NoBackground;
|
||||
Flags |= ImGuiWindowFlags.NoInputs;
|
||||
Flags |= ImGuiWindowFlags.NoResize;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Draw()
|
||||
{
|
||||
if (!_pluginConfiguration.ShowTransferWindow) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue