muffin v7.5.0
This commit is contained in:
parent
afafd5e377
commit
a6481e7b9a
67 changed files with 4281 additions and 2372 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue