Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: add an option to control the info window's no move.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 2, 2023
1 parent bb73310 commit 1e2f7e4
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 20 deletions.
3 changes: 2 additions & 1 deletion RotationSolver.Basic/Configuration/PluginConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ public class PluginConfiguration : IPluginConfiguration
public bool ShowControlWindow = false;
public bool IsControlWindowLock = false;
public bool ShowNextActionWindow = false;
public bool IsInfoWindowLock = false;
public bool IsInfoWindowNoInputs = false;
public bool IsInfoWindowNoMove = false;
public bool UseKeyboardCommand = false;
public bool UseGamepadCommand = false;
public bool ShowItemsCooldown = false;
Expand Down
3 changes: 2 additions & 1 deletion RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ internal partial class Strings
public string ConfigWindow_Control_UseKeyboardCommand { get; set; } = "Use Keyboard Command";
public string ConfigWindow_Control_UseGamepadCommand { get; set; } = "Use GamePad Command";
public string ConfigWindow_Control_ShowCooldownWindow { get; set; } = "Show Cooldown Window";
public string ConfigWindow_Control_IsWindowLock { get; set; } = "Lock";
public string ConfigWindow_Control_IsInfoWindowNoInputs { get; set; } = "No Inputs";
public string ConfigWindow_Control_IsInfoWindowNoMove { get; set; } = "No Move";

public string ConfigWindow_Control_ShowItemsCooldown { get; set; } = "Show Items' Cooldown";
public string ConfigWindow_Control_UseOriginalCooldown { get; set; } = "Show Original Cooldown";
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/UI/ControlWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public override void Draw()

ImGui.Text(DataCenter.TargetingType.ToName());

RotationConfigWindow.DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Control_IsWindowLock,
RotationConfigWindow.DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Control_IsInfoWindowNoInputs,
ref Service.Config.IsControlWindowLock);
ImGui.EndGroup();

Expand Down
8 changes: 1 addition & 7 deletions RotationSolver/UI/CooldownWindow.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
using ImGuiNET;
using RotationSolver.Basic.Actions;
using RotationSolver.Basic;
using RotationSolver.Basic.Actions;
using RotationSolver.Updaters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections;
using System.Numerics;

namespace RotationSolver.UI;
Expand Down
12 changes: 5 additions & 7 deletions RotationSolver/UI/InfoWindow.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
using Dalamud.Interface.Windowing;
using ImGuiNET;
using RotationSolver.Basic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RotationSolver.UI;

Expand All @@ -26,11 +21,14 @@ public override void PreDraw()
ImGui.PushStyleColor(ImGuiCol.WindowBg, Service.Config.InfoWindowBg);

Flags = BaseFlags;
if (Service.Config.IsInfoWindowLock)
if (Service.Config.IsInfoWindowNoInputs)
{
Flags |= ImGuiWindowFlags.NoInputs;
}

if (Service.Config.IsInfoWindowNoMove)
{
Flags |= ImGuiWindowFlags.NoMove;
}
//ImGui.PushStyleVar(ImGuiStyleVar.WindowPadding, new Vector2(0, 0));
ImGui.PushStyleVar(ImGuiStyleVar.WindowBorderSize, 0);
}
Expand Down
9 changes: 6 additions & 3 deletions RotationSolver/UI/RotationConfigWindow_Control.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ private void DrawControlTab()
DrawColor4(LocalizationManager.RightLang.ConfigWindow_Control_InfoWindowBg,
ref Service.Config.InfoWindowBg);

DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Control_IsWindowLock,
ref Service.Config.IsInfoWindowLock);
DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Control_IsInfoWindowNoInputs,
ref Service.Config.IsInfoWindowNoInputs);

DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Control_IsInfoWindowNoMove,
ref Service.Config.IsInfoWindowNoMove);

if (Service.Config.ShowCooldownWindow)
{
Expand All @@ -56,7 +59,7 @@ private void DrawControlTab()

if (!Service.Config.ShowControlWindow) return;

DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Control_IsWindowLock,
DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Control_IsInfoWindowNoInputs,
ref Service.Config.IsControlWindowLock);

if (Service.Config.IsControlWindowLock)
Expand Down

0 comments on commit 1e2f7e4

Please sign in to comment.