muffin v7.5.0
This commit is contained in:
parent
afafd5e377
commit
a6481e7b9a
67 changed files with 4281 additions and 2372 deletions
|
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
|
|
@ -31,17 +32,18 @@ internal sealed class ChangelogWindow : LWindow
|
|||
public ChangelogWindow(Configuration configuration, IDalamudPluginInterface pluginInterface)
|
||||
: base("Questionable Changelog###QuestionableChangelog", ImGuiWindowFlags.NoTitleBar)
|
||||
{
|
||||
//IL_0086: Unknown result type (might be due to invalid IL or missing references)
|
||||
_configuration = configuration;
|
||||
_pluginInterface = pluginInterface;
|
||||
_headerComponent = new ChangelogHeaderComponent();
|
||||
_footerComponent = new ChangelogFooterComponent();
|
||||
base.Size = new Vector2(900f, 650f);
|
||||
base.SizeCondition = ImGuiCond.FirstUseEver;
|
||||
base.SizeConstraints = new WindowSizeConstraints
|
||||
{
|
||||
MinimumSize = new Vector2(700f, 500f),
|
||||
MaximumSize = new Vector2(float.MaxValue, float.MaxValue)
|
||||
};
|
||||
WindowSizeConstraints value = default(WindowSizeConstraints);
|
||||
((WindowSizeConstraints)(ref value))._002Ector();
|
||||
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(700f, 500f);
|
||||
((WindowSizeConstraints)(ref value)).MaximumSize = new Vector2(float.MaxValue, float.MaxValue);
|
||||
((Window)this).SizeConstraints = value;
|
||||
}
|
||||
|
||||
public override void DrawContent()
|
||||
|
|
@ -78,50 +80,90 @@ internal sealed class ChangelogWindow : LWindow
|
|||
|
||||
private void DrawChangelogEntries()
|
||||
{
|
||||
//IL_00de: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0103: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0108: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_010a: Unknown result type (might be due to invalid IL or missing references)
|
||||
_headerAnimationTime += ImGui.GetIO().DeltaTime;
|
||||
using (ImRaii.PushColor(ImGuiCol.ScrollbarBg, new Vector4(0.1f, 0.08f, 0.14f, 0.6f)))
|
||||
ColorDisposable val = ImRaii.PushColor(ImGuiCol.ScrollbarBg, new Vector4(0.1f, 0.08f, 0.14f, 0.6f), true);
|
||||
try
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.ScrollbarGrab, new Vector4(0.55f, 0.45f, 0.75f, 0.4f)))
|
||||
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.ScrollbarGrab, new Vector4(0.55f, 0.45f, 0.75f, 0.4f), true);
|
||||
try
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.ScrollbarGrabHovered, new Vector4(0.65f, 0.55f, 0.85f, 0.6f)))
|
||||
ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.ScrollbarGrabHovered, new Vector4(0.65f, 0.55f, 0.85f, 0.6f), true);
|
||||
try
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.ScrollbarGrabActive, new Vector4(0.75f, 0.55f, 0.95f, 0.8f)))
|
||||
ColorDisposable val4 = ImRaii.PushColor(ImGuiCol.ScrollbarGrabActive, new Vector4(0.75f, 0.55f, 0.95f, 0.8f), true);
|
||||
try
|
||||
{
|
||||
float num = ImGui.GetFrameHeightWithSpacing() + ImGui.GetStyle().ItemSpacing.Y * 2f;
|
||||
using ImRaii.IEndObject endObject = ImRaii.Child("ChangelogScroll", new Vector2(0f, 0f - num), border: false, ImGuiWindowFlags.NoScrollbar);
|
||||
if (!endObject)
|
||||
ChildDisposable val5 = ImRaii.Child((ImU8String)"ChangelogScroll", new Vector2(0f, 0f - num), false, ImGuiWindowFlags.NoScrollbar);
|
||||
try
|
||||
{
|
||||
return;
|
||||
if (!val5)
|
||||
{
|
||||
return;
|
||||
}
|
||||
ChildDisposable val6 = ImRaii.Child((ImU8String)"ChangelogScrollInner", Vector2.Zero, false);
|
||||
try
|
||||
{
|
||||
if (!val6)
|
||||
{
|
||||
return;
|
||||
}
|
||||
List<ChangelogEntry> changelogs = ChangelogData.Changelogs;
|
||||
ChangelogEntry changelogEntry = changelogs.FirstOrDefault();
|
||||
if (changelogs.Count == 0)
|
||||
{
|
||||
ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 40f);
|
||||
Vector2 vector = ImGui.CalcTextSize("No changelog entries available.");
|
||||
ImGui.SetCursorPosX((ImGui.GetContentRegionAvail().X - vector.X) * 0.5f);
|
||||
ImGui.TextDisabled("No changelog entries available.");
|
||||
return;
|
||||
}
|
||||
ChangelogEntryComponent changelogEntryComponent = new ChangelogEntryComponent(_configuration, _windowOpenCount, _headerAnimationTime);
|
||||
foreach (ChangelogEntry item in changelogs)
|
||||
{
|
||||
changelogEntryComponent.Draw(item, item == changelogEntry, _hasSetInitialState);
|
||||
Vector2 cursorScreenPos = ImGui.GetCursorScreenPos();
|
||||
float num2 = ImGui.GetContentRegionAvail().X * 0.5f;
|
||||
float num3 = (ImGui.GetContentRegionAvail().X - num2) * 0.5f;
|
||||
ImGui.GetWindowDrawList().AddLine(cursorScreenPos + new Vector2(num3, 0f), cursorScreenPos + new Vector2(num3 + num2, 0f), ImGui.ColorConvertFloat4ToU32(new Vector4(0.55f, 0.45f, 0.75f, 0.1f)), 1f);
|
||||
ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 4f);
|
||||
}
|
||||
_hasSetInitialState = true;
|
||||
}
|
||||
finally
|
||||
{
|
||||
((ChildDisposable)(ref val6)).Dispose();
|
||||
}
|
||||
}
|
||||
using ImRaii.IEndObject endObject2 = ImRaii.Child("ChangelogScrollInner", Vector2.Zero, border: false);
|
||||
if (!endObject2)
|
||||
finally
|
||||
{
|
||||
return;
|
||||
((ChildDisposable)(ref val5)).Dispose();
|
||||
}
|
||||
List<ChangelogEntry> changelogs = ChangelogData.Changelogs;
|
||||
ChangelogEntry changelogEntry = changelogs.FirstOrDefault();
|
||||
if (changelogs.Count == 0)
|
||||
{
|
||||
ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 40f);
|
||||
Vector2 vector = ImGui.CalcTextSize("No changelog entries available.");
|
||||
ImGui.SetCursorPosX((ImGui.GetContentRegionAvail().X - vector.X) * 0.5f);
|
||||
ImGui.TextDisabled("No changelog entries available.");
|
||||
return;
|
||||
}
|
||||
ChangelogEntryComponent changelogEntryComponent = new ChangelogEntryComponent(_configuration, _windowOpenCount, _headerAnimationTime);
|
||||
foreach (ChangelogEntry item in changelogs)
|
||||
{
|
||||
changelogEntryComponent.Draw(item, item == changelogEntry, _hasSetInitialState);
|
||||
Vector2 cursorScreenPos = ImGui.GetCursorScreenPos();
|
||||
float num2 = ImGui.GetContentRegionAvail().X * 0.5f;
|
||||
float num3 = (ImGui.GetContentRegionAvail().X - num2) * 0.5f;
|
||||
ImGui.GetWindowDrawList().AddLine(cursorScreenPos + new Vector2(num3, 0f), cursorScreenPos + new Vector2(num3 + num2, 0f), ImGui.ColorConvertFloat4ToU32(new Vector4(0.55f, 0.45f, 0.75f, 0.1f)), 1f);
|
||||
ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 4f);
|
||||
}
|
||||
_hasSetInitialState = true;
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val4)?.Dispose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val3)?.Dispose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val2)?.Dispose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,12 @@ internal sealed class ConfigWindow : LWindow, IPersistableWindowConfig
|
|||
public ConfigWindow(IDalamudPluginInterface pluginInterface, GeneralConfigComponent generalConfigComponent, PluginConfigComponent pluginConfigComponent, DutyConfigComponent dutyConfigComponent, SinglePlayerDutyConfigComponent singlePlayerDutyConfigComponent, StopConditionComponent stopConditionComponent, BlacklistConfigComponent blacklistConfigComponent, NotificationConfigComponent notificationConfigComponent, DebugConfigComponent debugConfigComponent, Configuration configuration, ChangelogWindow changelogWindow)
|
||||
: base("Config - Questionable###QuestionableConfig", ImGuiWindowFlags.AlwaysAutoResize)
|
||||
{
|
||||
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_007f: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00d0: Expected O, but got Unknown
|
||||
_pluginInterface = pluginInterface;
|
||||
_generalConfigComponent = generalConfigComponent;
|
||||
_pluginConfigComponent = pluginConfigComponent;
|
||||
|
|
@ -46,7 +52,7 @@ internal sealed class ConfigWindow : LWindow, IPersistableWindowConfig
|
|||
_notificationConfigComponent = notificationConfigComponent;
|
||||
_debugConfigComponent = debugConfigComponent;
|
||||
_configuration = configuration;
|
||||
base.TitleBarButtons.Add(new TitleBarButton
|
||||
((Window)this).TitleBarButtons.Add(new TitleBarButton
|
||||
{
|
||||
Icon = FontAwesomeIcon.FileAlt,
|
||||
IconOffset = new Vector2(1.5f, 1f),
|
||||
|
|
@ -65,17 +71,27 @@ internal sealed class ConfigWindow : LWindow, IPersistableWindowConfig
|
|||
|
||||
public override void DrawContent()
|
||||
{
|
||||
using ImRaii.IEndObject endObject = ImRaii.TabBar("QuestionableConfigTabs");
|
||||
if (!(!endObject))
|
||||
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
|
||||
TabBarDisposable val = ImRaii.TabBar((ImU8String)"QuestionableConfigTabs");
|
||||
try
|
||||
{
|
||||
_generalConfigComponent.DrawTab();
|
||||
_pluginConfigComponent.DrawTab();
|
||||
_dutyConfigComponent.DrawTab();
|
||||
_singlePlayerDutyConfigComponent.DrawTab();
|
||||
_stopConditionComponent.DrawTab();
|
||||
_blacklistConfigComponent.DrawTab();
|
||||
_notificationConfigComponent.DrawTab();
|
||||
_debugConfigComponent.DrawTab();
|
||||
if (!(!val))
|
||||
{
|
||||
_generalConfigComponent.DrawTab();
|
||||
_pluginConfigComponent.DrawTab();
|
||||
_dutyConfigComponent.DrawTab();
|
||||
_singlePlayerDutyConfigComponent.DrawTab();
|
||||
_stopConditionComponent.DrawTab();
|
||||
_blacklistConfigComponent.DrawTab();
|
||||
_notificationConfigComponent.DrawTab();
|
||||
_debugConfigComponent.DrawTab();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((TabBarDisposable)(ref val)).Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ internal sealed class FateSelectionWindow : LWindow
|
|||
public FateSelectionWindow(FateController fateController, FateDefinitionRegistry fateDefinitionRegistry, QuestController questController, MovementController movementController, QuestFunctions questFunctions, QuestData questData, TerritoryData territoryData)
|
||||
: base("FATE Farming###QuestionableFateFarming")
|
||||
{
|
||||
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
|
||||
_fateController = fateController;
|
||||
_fateDefinitionRegistry = fateDefinitionRegistry;
|
||||
_questController = questController;
|
||||
|
|
@ -50,11 +51,11 @@ internal sealed class FateSelectionWindow : LWindow
|
|||
_territoryData = territoryData;
|
||||
base.Size = new Vector2(600f, 400f);
|
||||
base.SizeCondition = ImGuiCond.FirstUseEver;
|
||||
base.SizeConstraints = new WindowSizeConstraints
|
||||
{
|
||||
MinimumSize = new Vector2(500f, 300f),
|
||||
MaximumSize = new Vector2(900f, 700f)
|
||||
};
|
||||
WindowSizeConstraints value = default(WindowSizeConstraints);
|
||||
((WindowSizeConstraints)(ref value))._002Ector();
|
||||
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(500f, 300f);
|
||||
((WindowSizeConstraints)(ref value)).MaximumSize = new Vector2(900f, 700f);
|
||||
((Window)this).SizeConstraints = value;
|
||||
}
|
||||
|
||||
public override void DrawContent()
|
||||
|
|
@ -90,18 +91,26 @@ internal sealed class FateSelectionWindow : LWindow
|
|||
float num2 = (float)ImGui.GetTime();
|
||||
float num3 = 0.85f + MathF.Sin(num2 * 3f) * 0.15f;
|
||||
Vector4 col = new Vector4(1f * num3, 0.85f * num3, 0f, 1f);
|
||||
using (ImRaii.PushFont(UiBuilder.IconFont))
|
||||
FontDisposable val = ImRaii.PushFont(UiBuilder.IconFont, true);
|
||||
try
|
||||
{
|
||||
ImGui.TextColored(in col, FontAwesomeIcon.Star.ToIconString());
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
ImGui.SameLine();
|
||||
ImGui.TextColored(ImGuiColors.ParsedGold, _fateController.CurrentFate.Name);
|
||||
ImGui.SameLine(x - 35f);
|
||||
using (ImRaii.PushColor(ImGuiCol.Button, Vector4.Zero))
|
||||
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Button, Vector4.Zero, true);
|
||||
try
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.8f, 0.3f, 0.3f, 0.4f)))
|
||||
ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.8f, 0.3f, 0.3f, 0.4f), true);
|
||||
try
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.9f, 0.2f, 0.2f, 0.6f)))
|
||||
ColorDisposable val4 = ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.9f, 0.2f, 0.2f, 0.6f), true);
|
||||
try
|
||||
{
|
||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Stop))
|
||||
{
|
||||
|
|
@ -109,7 +118,19 @@ internal sealed class FateSelectionWindow : LWindow
|
|||
_movementController.Stop();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val4)?.Dispose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val3)?.Dispose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val2)?.Dispose();
|
||||
}
|
||||
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + 8f);
|
||||
string value = (_fateController.CycleLimit.HasValue ? $"Cycle {_fateController.CompletedCycles + 1} / {_fateController.CycleLimit}" : $"Cycle {_fateController.CompletedCycles + 1}");
|
||||
|
|
@ -137,7 +158,8 @@ internal sealed class FateSelectionWindow : LWindow
|
|||
ImGui.TextColored(in col2, text3);
|
||||
}
|
||||
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + 8f);
|
||||
using (ImRaii.Disabled(disabled: true))
|
||||
DisabledDisposable val5 = ImRaii.Disabled(true);
|
||||
try
|
||||
{
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGui.TextUnformatted("Cycles:");
|
||||
|
|
@ -145,13 +167,18 @@ internal sealed class FateSelectionWindow : LWindow
|
|||
ImGui.SetNextItemWidth(100f);
|
||||
ImGui.InputInt("##CycleLimitRunning", ref _cycleLimit, 1, 5);
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val5)?.Dispose();
|
||||
}
|
||||
ImGui.SetCursorPosY(cursorScreenPos.Y + num - ImGui.GetCursorScreenPos().Y + ImGui.GetCursorPosY() + 4f);
|
||||
ImGui.Spacing();
|
||||
}
|
||||
|
||||
private void DrawControlsStrip()
|
||||
{
|
||||
using (ImRaii.Disabled(_fateController.IsRunning))
|
||||
DisabledDisposable val = ImRaii.Disabled(_fateController.IsRunning);
|
||||
try
|
||||
{
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGui.TextUnformatted("Cycles:");
|
||||
|
|
@ -165,6 +192,10 @@ internal sealed class FateSelectionWindow : LWindow
|
|||
ImGui.SameLine();
|
||||
ImGui.TextColored(ImGuiColors.DalamudGrey, (_cycleLimit == 0) ? "(unlimited)" : "");
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
ImGui.Spacing();
|
||||
}
|
||||
|
||||
|
|
@ -206,6 +237,9 @@ internal sealed class FateSelectionWindow : LWindow
|
|||
|
||||
private void DrawFateTable()
|
||||
{
|
||||
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
|
||||
List<FateDefinition> list = _fateDefinitionRegistry.Definitions.Values.OrderBy(delegate(FateDefinition f)
|
||||
{
|
||||
DateTime? eventExpiry = f.EventExpiry;
|
||||
|
|
@ -233,40 +267,49 @@ internal sealed class FateSelectionWindow : LWindow
|
|||
return double.MaxValue;
|
||||
}).ThenBy<FateDefinition, string>((FateDefinition f) => f.Name, StringComparer.OrdinalIgnoreCase)
|
||||
.ToList();
|
||||
using ImRaii.IEndObject endObject = ImRaii.Table("FateTable", 4, ImGuiTableFlags.SizingStretchProp | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersInnerH | ImGuiTableFlags.ScrollY);
|
||||
if (!endObject)
|
||||
TableDisposable val = ImRaii.Table((ImU8String)"FateTable", 4, ImGuiTableFlags.SizingStretchProp | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersInnerH | ImGuiTableFlags.ScrollY);
|
||||
try
|
||||
{
|
||||
return;
|
||||
}
|
||||
ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.None, 3f);
|
||||
ImGui.TableSetupColumn("Zone", ImGuiTableColumnFlags.None, 2f);
|
||||
ImGui.TableSetupColumn("Expiry", ImGuiTableColumnFlags.WidthFixed, 80f);
|
||||
ImGui.TableSetupColumn("##Actions", ImGuiTableColumnFlags.WidthFixed, 30f);
|
||||
ImGui.TableHeadersRow();
|
||||
foreach (FateDefinition item in list)
|
||||
{
|
||||
ImGui.TableNextRow();
|
||||
bool flag = _fateController.IsRunning && _fateController.CurrentFate == item;
|
||||
if (flag)
|
||||
if (!val)
|
||||
{
|
||||
float num = (float)ImGui.GetTime();
|
||||
float w = 0.1f + MathF.Sin(num * 2.5f) * 0.05f;
|
||||
ImGui.TableSetBgColor(ImGuiTableBgTarget.RowBg1, ImGui.GetColorU32(new Vector4(1f, 0.85f, 0f, w)));
|
||||
return;
|
||||
}
|
||||
ImGui.TableNextColumn();
|
||||
DrawFateRowName(item, flag);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted(_territoryData.GetName(item.TerritoryId) ?? item.Description);
|
||||
ImGui.TableNextColumn();
|
||||
DrawFateRowExpiry(item);
|
||||
ImGui.TableNextColumn();
|
||||
bool disabled = _fateController.IsRunning || _questController.AutomationType != QuestController.EAutomationType.Manual;
|
||||
DrawFateRowActions(item, disabled);
|
||||
ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.None, 3f);
|
||||
ImGui.TableSetupColumn("Zone", ImGuiTableColumnFlags.None, 2f);
|
||||
ImGui.TableSetupColumn("Expiry", ImGuiTableColumnFlags.WidthFixed, 80f);
|
||||
ImGui.TableSetupColumn("##Actions", ImGuiTableColumnFlags.WidthFixed, 30f);
|
||||
ImGui.TableHeadersRow();
|
||||
foreach (FateDefinition item in list)
|
||||
{
|
||||
ImGui.TableNextRow();
|
||||
bool flag = _fateController.IsRunning && _fateController.CurrentFate == item;
|
||||
if (flag)
|
||||
{
|
||||
float num = (float)ImGui.GetTime();
|
||||
float w = 0.1f + MathF.Sin(num * 2.5f) * 0.05f;
|
||||
ImGui.TableSetBgColor(ImGuiTableBgTarget.RowBg1, ImGui.GetColorU32(new Vector4(1f, 0.85f, 0f, w)));
|
||||
}
|
||||
ImGui.TableNextColumn();
|
||||
DrawFateRowName(item, flag);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted(_territoryData.GetName(item.TerritoryId) ?? item.Description);
|
||||
ImGui.TableNextColumn();
|
||||
DrawFateRowExpiry(item);
|
||||
ImGui.TableNextColumn();
|
||||
bool disabled = _fateController.IsRunning || _questController.AutomationType != QuestController.EAutomationType.Manual;
|
||||
DrawFateRowActions(item, disabled);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((TableDisposable)(ref val)).Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawFateRowName(FateDefinition fate, bool isActive)
|
||||
{
|
||||
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
|
||||
if (isActive)
|
||||
{
|
||||
float num = (float)ImGui.GetTime();
|
||||
|
|
@ -281,7 +324,8 @@ internal sealed class FateSelectionWindow : LWindow
|
|||
{
|
||||
return;
|
||||
}
|
||||
using (ImRaii.Tooltip())
|
||||
TooltipDisposable val = ImRaii.Tooltip();
|
||||
try
|
||||
{
|
||||
ImGui.TextColored(ImGuiColors.DalamudWhite, fate.Name);
|
||||
ImGui.Separator();
|
||||
|
|
@ -316,6 +360,10 @@ internal sealed class FateSelectionWindow : LWindow
|
|||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((TooltipDisposable)(ref val)).Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private static void DrawFateRowExpiry(FateDefinition fate)
|
||||
|
|
@ -344,17 +392,23 @@ internal sealed class FateSelectionWindow : LWindow
|
|||
private void DrawFateRowActions(FateDefinition fate, bool disabled)
|
||||
{
|
||||
bool flag = fate.RequiredQuestId.HasValue && !_questFunctions.IsQuestComplete(new QuestId(fate.RequiredQuestId.Value));
|
||||
ImU8String id = new ImU8String(5, 1);
|
||||
id.AppendLiteral("fate_");
|
||||
id.AppendFormatted(fate.Name);
|
||||
using (ImRaii.PushId(id))
|
||||
ImU8String imU8String = new ImU8String(5, 1);
|
||||
imU8String.AppendLiteral("fate_");
|
||||
imU8String.AppendFormatted(fate.Name);
|
||||
IdDisposable val = ImRaii.PushId(imU8String, true);
|
||||
try
|
||||
{
|
||||
if (flag)
|
||||
{
|
||||
using (ImRaii.PushFont(UiBuilder.IconFont))
|
||||
FontDisposable val2 = ImRaii.PushFont(UiBuilder.IconFont, true);
|
||||
try
|
||||
{
|
||||
ImGui.TextColored(ImGuiColors.DalamudRed, FontAwesomeIcon.Times.ToIconString());
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val2)?.Dispose();
|
||||
}
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
IQuestInfo questInfo;
|
||||
|
|
@ -367,7 +421,8 @@ internal sealed class FateSelectionWindow : LWindow
|
|||
}
|
||||
return;
|
||||
}
|
||||
using (ImRaii.Disabled(disabled))
|
||||
DisabledDisposable val3 = ImRaii.Disabled(disabled);
|
||||
try
|
||||
{
|
||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Play))
|
||||
{
|
||||
|
|
@ -377,6 +432,10 @@ internal sealed class FateSelectionWindow : LWindow
|
|||
_fateController.Start(fate, cycleLimit);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val3)?.Dispose();
|
||||
}
|
||||
if (disabled && ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
|
||||
{
|
||||
if (_fateController.IsRunning)
|
||||
|
|
@ -389,6 +448,10 @@ internal sealed class FateSelectionWindow : LWindow
|
|||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private static string FormatElapsed(TimeSpan elapsed)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Numerics;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.Plugin.Services;
|
||||
|
|
@ -28,6 +29,7 @@ internal sealed class JournalProgressWindow : LWindow, IDisposable
|
|||
public JournalProgressWindow(QuestJournalComponent questJournalComponent, QuestRewardComponent questRewardComponent, AlliedSocietyJournalComponent alliedSocietyJournalComponent, GatheringJournalComponent gatheringJournalComponent, DutyJournalComponent dutyJournalComponent, QuestRegistry questRegistry, IClientState clientState)
|
||||
: base("Journal Progress###QuestionableJournalProgress")
|
||||
{
|
||||
//IL_011f: Unknown result type (might be due to invalid IL or missing references)
|
||||
_questJournalComponent = questJournalComponent;
|
||||
_alliedSocietyJournalComponent = alliedSocietyJournalComponent;
|
||||
_questRewardComponent = questRewardComponent;
|
||||
|
|
@ -42,10 +44,10 @@ internal sealed class JournalProgressWindow : LWindow, IDisposable
|
|||
_clientState.Logout += _questJournalComponent.ClearCounts;
|
||||
_clientState.Logout += _gatheringJournalComponent.ClearCounts;
|
||||
_questRegistry.Reloaded += OnQuestsReloaded;
|
||||
base.SizeConstraints = new WindowSizeConstraints
|
||||
{
|
||||
MinimumSize = new Vector2(700f, 500f)
|
||||
};
|
||||
WindowSizeConstraints value = default(WindowSizeConstraints);
|
||||
((WindowSizeConstraints)(ref value))._002Ector();
|
||||
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(700f, 500f);
|
||||
((Window)this).SizeConstraints = value;
|
||||
}
|
||||
|
||||
private void OnQuestsReloaded(object? sender, EventArgs e)
|
||||
|
|
@ -67,14 +69,24 @@ internal sealed class JournalProgressWindow : LWindow, IDisposable
|
|||
|
||||
public override void DrawContent()
|
||||
{
|
||||
using ImRaii.IEndObject endObject = ImRaii.TabBar("Journal");
|
||||
if (!(!endObject))
|
||||
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
|
||||
TabBarDisposable val = ImRaii.TabBar((ImU8String)"Journal");
|
||||
try
|
||||
{
|
||||
_questJournalComponent.DrawQuests();
|
||||
_dutyJournalComponent.DrawDuties();
|
||||
_alliedSocietyJournalComponent.DrawAlliedSocietyQuests();
|
||||
_questRewardComponent.DrawItemRewards();
|
||||
_gatheringJournalComponent.DrawGatheringItems();
|
||||
if (!(!val))
|
||||
{
|
||||
_questJournalComponent.DrawQuests();
|
||||
_dutyJournalComponent.DrawDuties();
|
||||
_alliedSocietyJournalComponent.DrawAlliedSocietyQuests();
|
||||
_questRewardComponent.DrawItemRewards();
|
||||
_gatheringJournalComponent.DrawGatheringItems();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((TabBarDisposable)(ref val)).Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Interface.Colors;
|
||||
|
|
@ -43,7 +44,8 @@ internal sealed class OneTimeSetupWindow : LWindow
|
|||
ImGui.Spacing();
|
||||
if (allRequiredInstalled)
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen))
|
||||
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.ParsedGreen, true);
|
||||
try
|
||||
{
|
||||
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Check, "Finish Setup"))
|
||||
{
|
||||
|
|
@ -53,15 +55,29 @@ internal sealed class OneTimeSetupWindow : LWindow
|
|||
base.IsOpen = false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
using (ImRaii.Disabled())
|
||||
DisabledDisposable val2 = ImRaii.Disabled();
|
||||
try
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed))
|
||||
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed, true);
|
||||
try
|
||||
{
|
||||
ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Check, "Missing required plugins");
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val2)?.Dispose();
|
||||
}
|
||||
}
|
||||
ImGui.SameLine();
|
||||
|
|
|
|||
|
|
@ -33,43 +33,80 @@ internal sealed class PriorityWindow : LWindow
|
|||
public PriorityWindow(QuestController questController, QuestFunctions questFunctions, QuestSelector questSelector, QuestTooltipComponent questTooltipComponent, PresetBuilderComponent presetBuilderComponent, SavedPresetsComponent savedPresetsComponent, UiUtils uiUtils, IChatGui chatGui, IDalamudPluginInterface pluginInterface)
|
||||
: base("Quest Priority###QuestionableQuestPriority")
|
||||
{
|
||||
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
|
||||
_manualPriorityComponent = new ManualPriorityComponent(questController, questFunctions, questSelector, questTooltipComponent, uiUtils, chatGui, pluginInterface);
|
||||
_presetBuilderComponent = presetBuilderComponent;
|
||||
_savedPresetsComponent = savedPresetsComponent;
|
||||
base.Size = new Vector2(500f, 500f);
|
||||
base.SizeCondition = ImGuiCond.Once;
|
||||
base.SizeConstraints = new WindowSizeConstraints
|
||||
{
|
||||
MinimumSize = new Vector2(615f, 500f),
|
||||
MaximumSize = new Vector2(800f, 1000f)
|
||||
};
|
||||
WindowSizeConstraints value = default(WindowSizeConstraints);
|
||||
((WindowSizeConstraints)(ref value))._002Ector();
|
||||
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(615f, 500f);
|
||||
((WindowSizeConstraints)(ref value)).MaximumSize = new Vector2(800f, 1000f);
|
||||
((Window)this).SizeConstraints = value;
|
||||
}
|
||||
|
||||
public override void DrawContent()
|
||||
{
|
||||
using ImRaii.IEndObject endObject = ImRaii.TabBar("PriorityTabs");
|
||||
if (!endObject)
|
||||
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0086: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
|
||||
TabBarDisposable val = ImRaii.TabBar((ImU8String)"PriorityTabs");
|
||||
try
|
||||
{
|
||||
return;
|
||||
}
|
||||
using (ImRaii.IEndObject endObject2 = ImRaii.TabItem("Manual Priority"))
|
||||
{
|
||||
if (endObject2)
|
||||
if (!val)
|
||||
{
|
||||
_manualPriorityComponent.Draw();
|
||||
return;
|
||||
}
|
||||
TabItemDisposable val2 = ImRaii.TabItem((ImU8String)"Manual Priority");
|
||||
try
|
||||
{
|
||||
if (TabItemDisposable.op_Implicit(val2))
|
||||
{
|
||||
_manualPriorityComponent.Draw();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((TabItemDisposable)(ref val2)).Dispose();
|
||||
}
|
||||
TabItemDisposable val3 = ImRaii.TabItem((ImU8String)"Quest Presets");
|
||||
try
|
||||
{
|
||||
if (TabItemDisposable.op_Implicit(val3))
|
||||
{
|
||||
_presetBuilderComponent.Draw();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((TabItemDisposable)(ref val3)).Dispose();
|
||||
}
|
||||
TabItemDisposable val4 = ImRaii.TabItem((ImU8String)"Saved Presets");
|
||||
try
|
||||
{
|
||||
if (TabItemDisposable.op_Implicit(val4))
|
||||
{
|
||||
_savedPresetsComponent.Draw();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((TabItemDisposable)(ref val4)).Dispose();
|
||||
}
|
||||
}
|
||||
using (ImRaii.IEndObject endObject3 = ImRaii.TabItem("Quest Presets"))
|
||||
finally
|
||||
{
|
||||
if (endObject3)
|
||||
{
|
||||
_presetBuilderComponent.Draw();
|
||||
}
|
||||
}
|
||||
using ImRaii.IEndObject endObject4 = ImRaii.TabItem("Saved Presets");
|
||||
if (endObject4)
|
||||
{
|
||||
_savedPresetsComponent.Draw();
|
||||
((TabBarDisposable)(ref val)).Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
|
|
@ -59,6 +60,7 @@ internal sealed class QuestSelectionWindow : LWindow
|
|||
public QuestSelectionWindow(QuestData questData, IGameGui gameGui, IChatGui chatGui, QuestFunctions questFunctions, QuestController questController, QuestRegistry questRegistry, IDalamudPluginInterface pluginInterface, TerritoryData territoryData, IClientState clientState, UiUtils uiUtils, QuestTooltipComponent questTooltipComponent)
|
||||
: base("Quest Selection###QuestionableQuestSelection")
|
||||
{
|
||||
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
|
||||
_questData = questData;
|
||||
_gameGui = gameGui;
|
||||
_chatGui = chatGui;
|
||||
|
|
@ -72,10 +74,10 @@ internal sealed class QuestSelectionWindow : LWindow
|
|||
_questTooltipComponent = questTooltipComponent;
|
||||
base.Size = new Vector2(500f, 200f);
|
||||
base.SizeCondition = ImGuiCond.Once;
|
||||
base.SizeConstraints = new WindowSizeConstraints
|
||||
{
|
||||
MinimumSize = new Vector2(500f, 200f)
|
||||
};
|
||||
WindowSizeConstraints value = default(WindowSizeConstraints);
|
||||
((WindowSizeConstraints)(ref value))._002Ector();
|
||||
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(500f, 200f);
|
||||
((Window)this).SizeConstraints = value;
|
||||
}
|
||||
|
||||
public unsafe void OpenForTarget(IGameObject? gameObject)
|
||||
|
|
@ -106,7 +108,7 @@ internal sealed class QuestSelectionWindow : LWindow
|
|||
|
||||
public unsafe void OpenForCurrentZone()
|
||||
{
|
||||
ushort territoryId = _clientState.TerritoryType;
|
||||
uint territoryId = _clientState.TerritoryType;
|
||||
string nameAndId = _territoryData.GetNameAndId(territoryId);
|
||||
base.WindowName = "Quests starting in " + nameAndId + "###QuestionableQuestSelection";
|
||||
_quests = (from x in _questRegistry.AllQuests
|
||||
|
|
@ -133,130 +135,145 @@ internal sealed class QuestSelectionWindow : LWindow
|
|||
|
||||
public override void DrawContent()
|
||||
{
|
||||
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
|
||||
if (_offeredQuests.Count != 0)
|
||||
{
|
||||
ImGui.Checkbox("Only show quests currently offered", ref _onlyAvailableQuests);
|
||||
}
|
||||
using ImRaii.IEndObject endObject = ImRaii.Table("QuestSelection", 4, ImGuiTableFlags.Borders | ImGuiTableFlags.ScrollY);
|
||||
if (!endObject)
|
||||
TableDisposable val = ImRaii.Table((ImU8String)"QuestSelection", 4, ImGuiTableFlags.Borders | ImGuiTableFlags.ScrollY);
|
||||
try
|
||||
{
|
||||
ImGui.Text("Not table");
|
||||
return;
|
||||
}
|
||||
float x;
|
||||
using (_pluginInterface.UiBuilder.IconFontFixedWidthHandle.Push())
|
||||
{
|
||||
x = ImGui.CalcTextSize(FontAwesomeIcon.Copy.ToIconString()).X;
|
||||
}
|
||||
ImGui.PushFont(UiBuilder.IconFont);
|
||||
float initWidthOrWeight = ImGui.CalcTextSize(FontAwesomeIcon.Copy.ToIconString()).X + ImGui.CalcTextSize(FontAwesomeIcon.Copy.ToIconString()).X + ImGui.CalcTextSize(FontAwesomeIcon.Copy.ToIconString()).X + 6f * ImGui.GetStyle().FramePadding.X + 2f * ImGui.GetStyle().ItemSpacing.X;
|
||||
ImGui.PopFont();
|
||||
ImGui.TableSetupColumn("Id", ImGuiTableColumnFlags.WidthFixed, 50f * ImGui.GetIO().FontGlobalScale);
|
||||
ImGui.TableSetupColumn("", ImGuiTableColumnFlags.WidthFixed, x);
|
||||
ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.None, 200f);
|
||||
ImGui.TableSetupColumn("Actions", ImGuiTableColumnFlags.WidthFixed, initWidthOrWeight);
|
||||
ImGui.TableHeadersRow();
|
||||
foreach (IQuestInfo item in (_offeredQuests.Count != 0 && _onlyAvailableQuests) ? _offeredQuests : _quests)
|
||||
{
|
||||
ImGui.TableNextRow();
|
||||
string text = item.QuestId.ToString();
|
||||
Quest quest;
|
||||
bool flag = _questRegistry.TryGetQuest(item.QuestId, out quest);
|
||||
if (ImGui.TableNextColumn())
|
||||
if (!val)
|
||||
{
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGui.TextUnformatted(text);
|
||||
ImGui.Text("Not table");
|
||||
return;
|
||||
}
|
||||
if (ImGui.TableNextColumn())
|
||||
float x;
|
||||
using (_pluginInterface.UiBuilder.IconFontFixedWidthHandle.Push())
|
||||
{
|
||||
ImGui.AlignTextToFramePadding();
|
||||
var (col, icon, _) = _uiUtils.GetQuestStyle(item.QuestId);
|
||||
using (_pluginInterface.UiBuilder.IconFontFixedWidthHandle.Push())
|
||||
{
|
||||
if (flag)
|
||||
{
|
||||
ImGui.TextColored(in col, icon.ToIconString());
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui.TextColored(ImGuiColors.DalamudGrey, icon.ToIconString());
|
||||
}
|
||||
}
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
_questTooltipComponent.Draw(item);
|
||||
}
|
||||
x = ImGui.CalcTextSize(FontAwesomeIcon.Copy.ToIconString()).X;
|
||||
}
|
||||
if (ImGui.TableNextColumn())
|
||||
ImGui.PushFont(UiBuilder.IconFont);
|
||||
float initWidthOrWeight = ImGui.CalcTextSize(FontAwesomeIcon.Copy.ToIconString()).X + ImGui.CalcTextSize(FontAwesomeIcon.Copy.ToIconString()).X + ImGui.CalcTextSize(FontAwesomeIcon.Copy.ToIconString()).X + 6f * ImGui.GetStyle().FramePadding.X + 2f * ImGui.GetStyle().ItemSpacing.X;
|
||||
ImGui.PopFont();
|
||||
ImGui.TableSetupColumn("Id", ImGuiTableColumnFlags.WidthFixed, 50f * ImGui.GetIO().FontGlobalScale);
|
||||
ImGui.TableSetupColumn("", ImGuiTableColumnFlags.WidthFixed, x);
|
||||
ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.None, 200f);
|
||||
ImGui.TableSetupColumn("Actions", ImGuiTableColumnFlags.WidthFixed, initWidthOrWeight);
|
||||
ImGui.TableHeadersRow();
|
||||
foreach (IQuestInfo item in (_offeredQuests.Count != 0 && _onlyAvailableQuests) ? _offeredQuests : _quests)
|
||||
{
|
||||
ImGui.AlignTextToFramePadding();
|
||||
if (quest != null && quest.Root.Disabled)
|
||||
ImGui.TableNextRow();
|
||||
string text = item.QuestId.ToString();
|
||||
Quest quest;
|
||||
bool flag = _questRegistry.TryGetQuest(item.QuestId, out quest);
|
||||
if (ImGui.TableNextColumn())
|
||||
{
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGui.TextUnformatted(text);
|
||||
}
|
||||
if (ImGui.TableNextColumn())
|
||||
{
|
||||
ImGui.AlignTextToFramePadding();
|
||||
var (col, icon, _) = _uiUtils.GetQuestStyle(item.QuestId);
|
||||
using (_pluginInterface.UiBuilder.IconFontFixedWidthHandle.Push())
|
||||
{
|
||||
ImGui.TextColored(ImGuiColors.DalamudOrange, FontAwesomeIcon.Ban.ToIconString());
|
||||
ImGui.SameLine();
|
||||
if (flag)
|
||||
{
|
||||
ImGui.TextColored(in col, icon.ToIconString());
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui.TextColored(ImGuiColors.DalamudGrey, icon.ToIconString());
|
||||
}
|
||||
}
|
||||
}
|
||||
ImGui.TextUnformatted(item.Name);
|
||||
}
|
||||
if (!ImGui.TableNextColumn())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
using (ImRaii.PushId(text))
|
||||
{
|
||||
bool num = ImGuiComponents.IconButton(FontAwesomeIcon.Copy);
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
ImGui.SetTooltip("Copy as file name");
|
||||
}
|
||||
if (num)
|
||||
{
|
||||
CopyToClipboard(item, suffix: true);
|
||||
}
|
||||
else if (ImGui.IsItemClicked(ImGuiMouseButton.Right))
|
||||
{
|
||||
CopyToClipboard(item, suffix: false);
|
||||
}
|
||||
ImGui.SameLine();
|
||||
if (quest == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
EInteractionType? eInteractionType = quest.FindSequence(0)?.LastStep()?.InteractionType;
|
||||
if (!eInteractionType.HasValue || eInteractionType != EInteractionType.AcceptQuest || !_questFunctions.IsReadyToAcceptQuest(item.QuestId))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
ImGui.BeginDisabled(_questController.NextQuest != null || _questController.SimulatedQuest != null);
|
||||
bool num2 = ImGuiComponents.IconButton(FontAwesomeIcon.Play);
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
ImGui.SetTooltip("Start as next quest");
|
||||
}
|
||||
if (num2)
|
||||
{
|
||||
_questController.SetNextQuest(quest);
|
||||
if (!_questController.ManualPriorityQuests.Contains(quest))
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
_questController.ManualPriorityQuests.Insert(0, quest);
|
||||
_questTooltipComponent.Draw(item);
|
||||
}
|
||||
_questController.Start("QuestSelectionWindow");
|
||||
}
|
||||
ImGui.SameLine();
|
||||
bool num3 = ImGuiComponents.IconButton(FontAwesomeIcon.AngleDoubleRight);
|
||||
if (ImGui.IsItemHovered())
|
||||
if (ImGui.TableNextColumn())
|
||||
{
|
||||
ImGui.SetTooltip("Set as next quest");
|
||||
ImGui.AlignTextToFramePadding();
|
||||
if (quest != null && quest.Root.Disabled)
|
||||
{
|
||||
using (_pluginInterface.UiBuilder.IconFontFixedWidthHandle.Push())
|
||||
{
|
||||
ImGui.TextColored(ImGuiColors.DalamudOrange, FontAwesomeIcon.Ban.ToIconString());
|
||||
ImGui.SameLine();
|
||||
}
|
||||
}
|
||||
ImGui.TextUnformatted(item.Name);
|
||||
}
|
||||
if (num3)
|
||||
if (!ImGui.TableNextColumn())
|
||||
{
|
||||
_questController.SetNextQuest(quest);
|
||||
continue;
|
||||
}
|
||||
IdDisposable val2 = ImRaii.PushId((ImU8String)text, true);
|
||||
try
|
||||
{
|
||||
bool num = ImGuiComponents.IconButton(FontAwesomeIcon.Copy);
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
ImGui.SetTooltip("Copy as file name");
|
||||
}
|
||||
if (num)
|
||||
{
|
||||
CopyToClipboard(item, suffix: true);
|
||||
}
|
||||
else if (ImGui.IsItemClicked(ImGuiMouseButton.Right))
|
||||
{
|
||||
CopyToClipboard(item, suffix: false);
|
||||
}
|
||||
ImGui.SameLine();
|
||||
if (quest == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
EInteractionType? eInteractionType = quest.FindSequence(0)?.LastStep()?.InteractionType;
|
||||
if (!eInteractionType.HasValue || eInteractionType != EInteractionType.AcceptQuest || !_questFunctions.IsReadyToAcceptQuest(item.QuestId))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
ImGui.BeginDisabled(_questController.NextQuest != null || _questController.SimulatedQuest != null);
|
||||
bool num2 = ImGuiComponents.IconButton(FontAwesomeIcon.Play);
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
ImGui.SetTooltip("Start as next quest");
|
||||
}
|
||||
if (num2)
|
||||
{
|
||||
_questController.SetNextQuest(quest);
|
||||
if (!_questController.ManualPriorityQuests.Contains(quest))
|
||||
{
|
||||
_questController.ManualPriorityQuests.Insert(0, quest);
|
||||
}
|
||||
_questController.Start("QuestSelectionWindow");
|
||||
}
|
||||
ImGui.SameLine();
|
||||
bool num3 = ImGuiComponents.IconButton(FontAwesomeIcon.AngleDoubleRight);
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
ImGui.SetTooltip("Set as next quest");
|
||||
}
|
||||
if (num3)
|
||||
{
|
||||
_questController.SetNextQuest(quest);
|
||||
}
|
||||
ImGui.EndDisabled();
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val2)?.Dispose();
|
||||
}
|
||||
ImGui.EndDisabled();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((TableDisposable)(ref val)).Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private void CopyToClipboard(IQuestInfo quest, bool suffix)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using System.Numerics;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
|
|
@ -24,16 +25,17 @@ internal sealed class QuestSequenceWindow : LWindow, IPersistableWindowConfig
|
|||
public QuestSequenceWindow(IDalamudPluginInterface pluginInterface, Configuration configuration, QuestSequenceComponent questSequenceComponent)
|
||||
: base("Quest Sequence Viewer###QuestionableQuestSequenceViewer", ImGuiWindowFlags.NoTitleBar)
|
||||
{
|
||||
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
|
||||
_pluginInterface = pluginInterface;
|
||||
_configuration = configuration;
|
||||
_questSequenceComponent = questSequenceComponent;
|
||||
base.Size = new Vector2(950f, 700f);
|
||||
base.SizeCondition = ImGuiCond.FirstUseEver;
|
||||
base.SizeConstraints = new WindowSizeConstraints
|
||||
{
|
||||
MinimumSize = new Vector2(750f, 550f),
|
||||
MaximumSize = new Vector2(float.MaxValue, float.MaxValue)
|
||||
};
|
||||
WindowSizeConstraints value = default(WindowSizeConstraints);
|
||||
((WindowSizeConstraints)(ref value))._002Ector();
|
||||
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(750f, 550f);
|
||||
((WindowSizeConstraints)(ref value)).MaximumSize = new Vector2(float.MaxValue, float.MaxValue);
|
||||
((Window)this).SizeConstraints = value;
|
||||
}
|
||||
|
||||
public void SaveWindowConfig()
|
||||
|
|
@ -50,42 +52,83 @@ internal sealed class QuestSequenceWindow : LWindow, IPersistableWindowConfig
|
|||
|
||||
public override void DrawContent()
|
||||
{
|
||||
//IL_0090: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0095: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
|
||||
bool isOpen = base.IsOpen;
|
||||
QuestSequenceComponent.DrawCustomHeader(ref isOpen);
|
||||
base.IsOpen = isOpen;
|
||||
ImGui.Spacing();
|
||||
ImGui.Spacing();
|
||||
using (ImRaii.PushColor(ImGuiCol.Tab, new Vector4(0.15f, 0.13f, 0.2f, 0.7f)))
|
||||
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Tab, new Vector4(0.15f, 0.13f, 0.2f, 0.7f), true);
|
||||
try
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.TabHovered, new Vector4(0.35f, 0.3f, 0.45f, 0.9f)))
|
||||
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.TabHovered, new Vector4(0.35f, 0.3f, 0.45f, 0.9f), true);
|
||||
try
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.TabActive, new Vector4(0.28f, 0.24f, 0.35f, 1f)))
|
||||
ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.TabActive, new Vector4(0.28f, 0.24f, 0.35f, 1f), true);
|
||||
try
|
||||
{
|
||||
using ImRaii.IEndObject endObject = ImRaii.TabBar("QuestSequenceTabs", ImGuiTabBarFlags.None);
|
||||
if (!endObject)
|
||||
TabBarDisposable val4 = ImRaii.TabBar((ImU8String)"QuestSequenceTabs", ImGuiTabBarFlags.None);
|
||||
try
|
||||
{
|
||||
return;
|
||||
}
|
||||
using (ImRaii.IEndObject endObject2 = ImRaii.TabItem("Current Quest", ImGuiTabItemFlags.None))
|
||||
{
|
||||
if (endObject2)
|
||||
if (!val4)
|
||||
{
|
||||
ImGui.Spacing();
|
||||
_questSequenceComponent.DrawCurrentQuestTab();
|
||||
return;
|
||||
}
|
||||
}
|
||||
ImGuiTabItemFlags flags = (_selectLookupTabNextFrame ? ImGuiTabItemFlags.SetSelected : ImGuiTabItemFlags.None);
|
||||
using (ImRaii.IEndObject endObject3 = ImRaii.TabItem("Quest Lookup", flags))
|
||||
{
|
||||
if (endObject3)
|
||||
TabItemDisposable val5 = ImRaii.TabItem((ImU8String)"Current Quest", ImGuiTabItemFlags.None);
|
||||
try
|
||||
{
|
||||
ImGui.Spacing();
|
||||
_questSequenceComponent.DrawQuestLookupTab();
|
||||
if (TabItemDisposable.op_Implicit(val5))
|
||||
{
|
||||
ImGui.Spacing();
|
||||
_questSequenceComponent.DrawCurrentQuestTab();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((TabItemDisposable)(ref val5)).Dispose();
|
||||
}
|
||||
ImGuiTabItemFlags imGuiTabItemFlags = (_selectLookupTabNextFrame ? ImGuiTabItemFlags.SetSelected : ImGuiTabItemFlags.None);
|
||||
TabItemDisposable val6 = ImRaii.TabItem((ImU8String)"Quest Lookup", imGuiTabItemFlags);
|
||||
try
|
||||
{
|
||||
if (TabItemDisposable.op_Implicit(val6))
|
||||
{
|
||||
ImGui.Spacing();
|
||||
_questSequenceComponent.DrawQuestLookupTab();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((TabItemDisposable)(ref val6)).Dispose();
|
||||
}
|
||||
_selectLookupTabNextFrame = false;
|
||||
}
|
||||
_selectLookupTabNextFrame = false;
|
||||
finally
|
||||
{
|
||||
((TabBarDisposable)(ref val4)).Dispose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val3)?.Dispose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val2)?.Dispose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
QuestSequenceComponent.DrawWindowBorder();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,15 +20,16 @@ internal sealed class QuestValidationWindow : LWindow, IPersistableWindowConfig
|
|||
public QuestValidationWindow(QuestValidationComponent questValidationComponent, IDalamudPluginInterface pluginInterface, Configuration configuration)
|
||||
: base("Quest Validation###QuestionableValidator")
|
||||
{
|
||||
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
|
||||
_questValidationComponent = questValidationComponent;
|
||||
_pluginInterface = pluginInterface;
|
||||
_configuration = configuration;
|
||||
base.Size = new Vector2(800f, 400f);
|
||||
base.SizeCondition = ImGuiCond.FirstUseEver;
|
||||
base.SizeConstraints = new WindowSizeConstraints
|
||||
{
|
||||
MinimumSize = new Vector2(600f, 300f)
|
||||
};
|
||||
WindowSizeConstraints value = default(WindowSizeConstraints);
|
||||
((WindowSizeConstraints)(ref value))._002Ector();
|
||||
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(600f, 300f);
|
||||
((Window)this).SizeConstraints = value;
|
||||
}
|
||||
|
||||
public void SaveWindowConfig()
|
||||
|
|
|
|||
|
|
@ -57,6 +57,21 @@ internal sealed class QuestWindow : LWindow, IPersistableWindowConfig
|
|||
public QuestWindow(IDalamudPluginInterface pluginInterface, QuestController questController, IObjectTable objectTable, IClientState clientState, Configuration configuration, TerritoryData territoryData, ActiveQuestComponent activeQuestComponent, ARealmRebornComponent aRealmRebornComponent, EventInfoComponent eventInfoComponent, CreationUtilsComponent creationUtilsComponent, QuickAccessButtonsComponent quickAccessButtonsComponent, RemainingTasksComponent remainingTasksComponent, IFramework framework, InteractionUiController interactionUiController, ConfigWindow configWindow)
|
||||
: base("Questionable v" + PluginVersion.ToString(3) + "###Questionable", ImGuiWindowFlags.AlwaysAutoResize)
|
||||
{
|
||||
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0108: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_011d: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_012f: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_013b: Expected O, but got Unknown
|
||||
//IL_0153: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0158: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0163: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0178: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_018a: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0195: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_01bf: Expected O, but got Unknown
|
||||
QuestWindow questWindow = this;
|
||||
_pluginInterface = pluginInterface;
|
||||
_questController = questController;
|
||||
|
|
@ -72,11 +87,11 @@ internal sealed class QuestWindow : LWindow, IPersistableWindowConfig
|
|||
_remainingTasksComponent = remainingTasksComponent;
|
||||
_framework = framework;
|
||||
_interactionUiController = interactionUiController;
|
||||
base.SizeConstraints = new WindowSizeConstraints
|
||||
{
|
||||
MinimumSize = new Vector2(240f, 30f),
|
||||
MaximumSize = default(Vector2)
|
||||
};
|
||||
WindowSizeConstraints value = default(WindowSizeConstraints);
|
||||
((WindowSizeConstraints)(ref value))._002Ector();
|
||||
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(240f, 30f);
|
||||
((WindowSizeConstraints)(ref value)).MaximumSize = default(Vector2);
|
||||
((Window)this).SizeConstraints = value;
|
||||
base.RespectCloseHotkey = false;
|
||||
base.AllowClickthrough = false;
|
||||
_minimizeButton = new TitleBarButton
|
||||
|
|
@ -91,8 +106,8 @@ internal sealed class QuestWindow : LWindow, IPersistableWindowConfig
|
|||
},
|
||||
AvailableClickthrough = true
|
||||
};
|
||||
base.TitleBarButtons.Insert(0, _minimizeButton);
|
||||
base.TitleBarButtons.Add(new TitleBarButton
|
||||
((Window)this).TitleBarButtons.Insert(0, _minimizeButton);
|
||||
((Window)this).TitleBarButtons.Add(new TitleBarButton
|
||||
{
|
||||
Icon = FontAwesomeIcon.Cog,
|
||||
IconOffset = new Vector2(1.5f, 1f),
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
|
|||
public SeasonalDutySelectionWindow(SeasonalDutyController seasonalDutyController, SeasonalDutyDefinitionRegistry seasonalDutyDefinitionRegistry, QuestController questController, FateController fateController, MovementController movementController, QuestFunctions questFunctions, QuestData questData, TerritoryData territoryData)
|
||||
: base("Seasonal Duty Farming###QuestionableSeasonalDutyFarming")
|
||||
{
|
||||
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
|
||||
_seasonalDutyController = seasonalDutyController;
|
||||
_seasonalDutyDefinitionRegistry = seasonalDutyDefinitionRegistry;
|
||||
_questController = questController;
|
||||
|
|
@ -53,11 +54,11 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
|
|||
_territoryData = territoryData;
|
||||
base.Size = new Vector2(600f, 400f);
|
||||
base.SizeCondition = ImGuiCond.FirstUseEver;
|
||||
base.SizeConstraints = new WindowSizeConstraints
|
||||
{
|
||||
MinimumSize = new Vector2(500f, 300f),
|
||||
MaximumSize = new Vector2(900f, 700f)
|
||||
};
|
||||
WindowSizeConstraints value = default(WindowSizeConstraints);
|
||||
((WindowSizeConstraints)(ref value))._002Ector();
|
||||
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(500f, 300f);
|
||||
((WindowSizeConstraints)(ref value)).MaximumSize = new Vector2(900f, 700f);
|
||||
((Window)this).SizeConstraints = value;
|
||||
}
|
||||
|
||||
public override void DrawContent()
|
||||
|
|
@ -93,18 +94,26 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
|
|||
float num2 = (float)ImGui.GetTime();
|
||||
float num3 = 0.85f + MathF.Sin(num2 * 3f) * 0.15f;
|
||||
Vector4 col = new Vector4(0f, 1f * num3, 0.3f * num3, 1f);
|
||||
using (ImRaii.PushFont(UiBuilder.IconFont))
|
||||
FontDisposable val = ImRaii.PushFont(UiBuilder.IconFont, true);
|
||||
try
|
||||
{
|
||||
ImGui.TextColored(in col, FontAwesomeIcon.Leaf.ToIconString());
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
ImGui.SameLine();
|
||||
ImGui.TextColored(ImGuiColors.ParsedGreen, _seasonalDutyController.CurrentDuty.Name);
|
||||
ImGui.SameLine(x - 35f);
|
||||
using (ImRaii.PushColor(ImGuiCol.Button, Vector4.Zero))
|
||||
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Button, Vector4.Zero, true);
|
||||
try
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.8f, 0.3f, 0.3f, 0.4f)))
|
||||
ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.8f, 0.3f, 0.3f, 0.4f), true);
|
||||
try
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.9f, 0.2f, 0.2f, 0.6f)))
|
||||
ColorDisposable val4 = ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.9f, 0.2f, 0.2f, 0.6f), true);
|
||||
try
|
||||
{
|
||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Stop))
|
||||
{
|
||||
|
|
@ -112,7 +121,19 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
|
|||
_movementController.Stop();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val4)?.Dispose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val3)?.Dispose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val2)?.Dispose();
|
||||
}
|
||||
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + 8f);
|
||||
string value = (_seasonalDutyController.CycleLimit.HasValue ? $"Cycle {_seasonalDutyController.CompletedCycles + 1} / {_seasonalDutyController.CycleLimit}" : $"Cycle {_seasonalDutyController.CompletedCycles + 1}");
|
||||
|
|
@ -140,7 +161,8 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
|
|||
ImGui.TextColored(in col2, text3);
|
||||
}
|
||||
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + 8f);
|
||||
using (ImRaii.Disabled(disabled: true))
|
||||
DisabledDisposable val5 = ImRaii.Disabled(true);
|
||||
try
|
||||
{
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGui.TextUnformatted("Cycles:");
|
||||
|
|
@ -148,13 +170,18 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
|
|||
ImGui.SetNextItemWidth(100f);
|
||||
ImGui.InputInt("##CycleLimitRunning", ref _cycleLimit, 1, 5);
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val5)?.Dispose();
|
||||
}
|
||||
ImGui.SetCursorPosY(cursorScreenPos.Y + num - ImGui.GetCursorScreenPos().Y + ImGui.GetCursorPosY() + 4f);
|
||||
ImGui.Spacing();
|
||||
}
|
||||
|
||||
private void DrawControlsStrip()
|
||||
{
|
||||
using (ImRaii.Disabled(_seasonalDutyController.IsRunning))
|
||||
DisabledDisposable val = ImRaii.Disabled(_seasonalDutyController.IsRunning);
|
||||
try
|
||||
{
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGui.TextUnformatted("Cycles:");
|
||||
|
|
@ -168,6 +195,10 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
|
|||
ImGui.SameLine();
|
||||
ImGui.TextColored(ImGuiColors.DalamudGrey, (_cycleLimit == 0) ? "(unlimited)" : "");
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
ImGui.Spacing();
|
||||
}
|
||||
|
||||
|
|
@ -209,6 +240,9 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
|
|||
|
||||
private void DrawDutyTable()
|
||||
{
|
||||
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
|
||||
List<SeasonalDutyDefinition> list = _seasonalDutyDefinitionRegistry.Definitions.Values.OrderBy(delegate(SeasonalDutyDefinition d)
|
||||
{
|
||||
DateTime? eventExpiry = d.EventExpiry;
|
||||
|
|
@ -236,40 +270,49 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
|
|||
return double.MaxValue;
|
||||
}).ThenBy<SeasonalDutyDefinition, string>((SeasonalDutyDefinition d) => d.Name, StringComparer.OrdinalIgnoreCase)
|
||||
.ToList();
|
||||
using ImRaii.IEndObject endObject = ImRaii.Table("SeasonalDutyTable", 4, ImGuiTableFlags.SizingStretchProp | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersInnerH | ImGuiTableFlags.ScrollY);
|
||||
if (!endObject)
|
||||
TableDisposable val = ImRaii.Table((ImU8String)"SeasonalDutyTable", 4, ImGuiTableFlags.SizingStretchProp | ImGuiTableFlags.RowBg | ImGuiTableFlags.BordersInnerH | ImGuiTableFlags.ScrollY);
|
||||
try
|
||||
{
|
||||
return;
|
||||
}
|
||||
ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.None, 3f);
|
||||
ImGui.TableSetupColumn("Zone", ImGuiTableColumnFlags.None, 2f);
|
||||
ImGui.TableSetupColumn("Expiry", ImGuiTableColumnFlags.WidthFixed, 80f);
|
||||
ImGui.TableSetupColumn("##Actions", ImGuiTableColumnFlags.WidthFixed, 30f);
|
||||
ImGui.TableHeadersRow();
|
||||
foreach (SeasonalDutyDefinition item in list)
|
||||
{
|
||||
ImGui.TableNextRow();
|
||||
bool flag = _seasonalDutyController.IsRunning && _seasonalDutyController.CurrentDuty == item;
|
||||
if (flag)
|
||||
if (!val)
|
||||
{
|
||||
float num = (float)ImGui.GetTime();
|
||||
float w = 0.1f + MathF.Sin(num * 2.5f) * 0.05f;
|
||||
ImGui.TableSetBgColor(ImGuiTableBgTarget.RowBg1, ImGui.GetColorU32(new Vector4(0f, 0.85f, 0.3f, w)));
|
||||
return;
|
||||
}
|
||||
ImGui.TableNextColumn();
|
||||
DrawDutyRowName(item, flag);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted(_territoryData.GetName(item.TerritoryId) ?? item.Name);
|
||||
ImGui.TableNextColumn();
|
||||
DrawDutyRowExpiry(item);
|
||||
ImGui.TableNextColumn();
|
||||
bool disabled = _seasonalDutyController.IsRunning || _fateController.IsRunning || _questController.AutomationType != QuestController.EAutomationType.Manual;
|
||||
DrawDutyRowActions(item, disabled);
|
||||
ImGui.TableSetupColumn("Name", ImGuiTableColumnFlags.None, 3f);
|
||||
ImGui.TableSetupColumn("Zone", ImGuiTableColumnFlags.None, 2f);
|
||||
ImGui.TableSetupColumn("Expiry", ImGuiTableColumnFlags.WidthFixed, 80f);
|
||||
ImGui.TableSetupColumn("##Actions", ImGuiTableColumnFlags.WidthFixed, 30f);
|
||||
ImGui.TableHeadersRow();
|
||||
foreach (SeasonalDutyDefinition item in list)
|
||||
{
|
||||
ImGui.TableNextRow();
|
||||
bool flag = _seasonalDutyController.IsRunning && _seasonalDutyController.CurrentDuty == item;
|
||||
if (flag)
|
||||
{
|
||||
float num = (float)ImGui.GetTime();
|
||||
float w = 0.1f + MathF.Sin(num * 2.5f) * 0.05f;
|
||||
ImGui.TableSetBgColor(ImGuiTableBgTarget.RowBg1, ImGui.GetColorU32(new Vector4(0f, 0.85f, 0.3f, w)));
|
||||
}
|
||||
ImGui.TableNextColumn();
|
||||
DrawDutyRowName(item, flag);
|
||||
ImGui.TableNextColumn();
|
||||
ImGui.TextUnformatted(_territoryData.GetName(item.TerritoryId) ?? item.Name);
|
||||
ImGui.TableNextColumn();
|
||||
DrawDutyRowExpiry(item);
|
||||
ImGui.TableNextColumn();
|
||||
bool disabled = _seasonalDutyController.IsRunning || _fateController.IsRunning || _questController.AutomationType != QuestController.EAutomationType.Manual;
|
||||
DrawDutyRowActions(item, disabled);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((TableDisposable)(ref val)).Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawDutyRowName(SeasonalDutyDefinition duty, bool isActive)
|
||||
{
|
||||
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
|
||||
if (isActive)
|
||||
{
|
||||
float num = (float)ImGui.GetTime();
|
||||
|
|
@ -284,7 +327,8 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
|
|||
{
|
||||
return;
|
||||
}
|
||||
using (ImRaii.Tooltip())
|
||||
TooltipDisposable val = ImRaii.Tooltip();
|
||||
try
|
||||
{
|
||||
ImGui.TextColored(ImGuiColors.DalamudWhite, duty.Name);
|
||||
ImGui.Separator();
|
||||
|
|
@ -307,6 +351,10 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
|
|||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((TooltipDisposable)(ref val)).Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private static void DrawDutyRowExpiry(SeasonalDutyDefinition duty)
|
||||
|
|
@ -335,17 +383,23 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
|
|||
private void DrawDutyRowActions(SeasonalDutyDefinition duty, bool disabled)
|
||||
{
|
||||
bool flag = duty.RequiredQuestId.HasValue && !_questFunctions.IsQuestComplete(new QuestId(duty.RequiredQuestId.Value));
|
||||
ImU8String id = new ImU8String(5, 1);
|
||||
id.AppendLiteral("duty_");
|
||||
id.AppendFormatted(duty.Name);
|
||||
using (ImRaii.PushId(id))
|
||||
ImU8String imU8String = new ImU8String(5, 1);
|
||||
imU8String.AppendLiteral("duty_");
|
||||
imU8String.AppendFormatted(duty.Name);
|
||||
IdDisposable val = ImRaii.PushId(imU8String, true);
|
||||
try
|
||||
{
|
||||
if (flag)
|
||||
{
|
||||
using (ImRaii.PushFont(UiBuilder.IconFont))
|
||||
FontDisposable val2 = ImRaii.PushFont(UiBuilder.IconFont, true);
|
||||
try
|
||||
{
|
||||
ImGui.TextColored(ImGuiColors.DalamudRed, FontAwesomeIcon.Times.ToIconString());
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val2)?.Dispose();
|
||||
}
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
IQuestInfo questInfo;
|
||||
|
|
@ -358,7 +412,8 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
|
|||
}
|
||||
return;
|
||||
}
|
||||
using (ImRaii.Disabled(disabled))
|
||||
DisabledDisposable val3 = ImRaii.Disabled(disabled);
|
||||
try
|
||||
{
|
||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Play))
|
||||
{
|
||||
|
|
@ -369,6 +424,10 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
|
|||
_seasonalDutyController.Start(duty, cycleLimit);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val3)?.Dispose();
|
||||
}
|
||||
if (disabled && ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
|
||||
{
|
||||
if (_seasonalDutyController.IsRunning)
|
||||
|
|
@ -385,6 +444,10 @@ internal sealed class SeasonalDutySelectionWindow : LWindow
|
|||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
((IDisposable)val)?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private static string FormatElapsed(TimeSpan elapsed)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue