mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Self-Test Window improvements (#2298)
* Move Logout self-test to the bottom of the list * Increase self-test result and make it scrollable * Allow text wrapping for some strings in self-tests * Fix context menu self-test not working properly on HQ items
This commit is contained in:
parent
6a42568073
commit
b1986bd3d1
4 changed files with 12 additions and 9 deletions
|
|
@ -57,8 +57,8 @@ internal class SelfTestWindow : Window
|
|||
new SheetRedirectResolverSelfTestStep(),
|
||||
new NounProcessorSelfTestStep(),
|
||||
new SeStringEvaluatorSelfTestStep(),
|
||||
new LogoutEventSelfTestStep(),
|
||||
new CompletionSelfTestStep()
|
||||
new CompletionSelfTestStep(),
|
||||
new LogoutEventSelfTestStep()
|
||||
];
|
||||
|
||||
private readonly Dictionary<int, (SelfTestStepResult Result, TimeSpan? Duration)> testIndexToResult = new();
|
||||
|
|
@ -152,6 +152,9 @@ internal class SelfTestWindow : Window
|
|||
return;
|
||||
}
|
||||
|
||||
using var resultChild = ImRaii.Child("SelfTestResultChild", ImGui.GetContentRegionAvail());
|
||||
if (!resultChild) return;
|
||||
|
||||
var step = this.steps[this.currentStep];
|
||||
ImGui.TextUnformatted($"Current: {step.Name}");
|
||||
|
||||
|
|
@ -184,7 +187,7 @@ internal class SelfTestWindow : Window
|
|||
var tableSize = ImGui.GetContentRegionAvail();
|
||||
|
||||
if (this.selfTestRunning)
|
||||
tableSize -= new Vector2(0, 150);
|
||||
tableSize -= new Vector2(0, 200);
|
||||
|
||||
tableSize.Y = Math.Min(tableSize.Y, ImGui.GetWindowViewport().Size.Y * 0.5f);
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ internal class CompletionSelfTestStep : ISelfTestStep
|
|||
|
||||
case 1:
|
||||
ImGui.Text("[Chat Log]");
|
||||
ImGui.Text("Use the category menus to navigate to [Dalamud], then complete a command from the list. Did it work?");
|
||||
ImGui.TextWrapped("Use the category menus to navigate to [Dalamud], then complete a command from the list. Did it work?");
|
||||
if (ImGui.Button("Yes"))
|
||||
this.step++;
|
||||
ImGui.SameLine();
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ internal class ContextMenuSelfTestStep : ISelfTestStep
|
|||
var targetItem = (a.Target as MenuTargetInventory)!.TargetItem;
|
||||
if (targetItem is { } item)
|
||||
{
|
||||
name = (this.itemSheet.GetRowOrDefault(item.ItemId)?.Name.ExtractText() ?? $"Unknown ({item.ItemId})") + (item.IsHq ? $" {SeIconChar.HighQuality.ToIconString()}" : string.Empty);
|
||||
name = (this.itemSheet.GetRowOrDefault(item.BaseItemId)?.Name.ExtractText() ?? $"Unknown ({item.BaseItemId})") + (item.IsHq ? $" {SeIconChar.HighQuality.ToIconString()}" : string.Empty);
|
||||
count = item.Quantity;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using System.Globalization;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
||||
using Dalamud.Game.MarketBoard;
|
||||
|
|
@ -109,7 +109,7 @@ internal class MarketBoardSelfTestStep : ISelfTestStep
|
|||
}
|
||||
else
|
||||
{
|
||||
ImGui.Text("Does this information match the purchase you made? This is testing the request to the server.");
|
||||
ImGui.TextWrapped("Does this information match the purchase you made? This is testing the request to the server.");
|
||||
ImGui.Separator();
|
||||
ImGui.Text($"Quantity: {this.marketBoardPurchaseRequest.ItemQuantity.ToString()}");
|
||||
ImGui.Text($"Item ID: {this.marketBoardPurchaseRequest.CatalogId}");
|
||||
|
|
@ -135,7 +135,7 @@ internal class MarketBoardSelfTestStep : ISelfTestStep
|
|||
}
|
||||
else
|
||||
{
|
||||
ImGui.Text("Does this information match the purchase you made? This is testing the response from the server.");
|
||||
ImGui.TextWrapped("Does this information match the purchase you made? This is testing the response from the server.");
|
||||
ImGui.Separator();
|
||||
ImGui.Text($"Quantity: {this.marketBoardPurchase.ItemQuantity.ToString()}");
|
||||
ImGui.Text($"Item ID: {this.marketBoardPurchase.CatalogId}");
|
||||
|
|
@ -156,7 +156,7 @@ internal class MarketBoardSelfTestStep : ISelfTestStep
|
|||
case SubStep.Taxes:
|
||||
if (this.marketTaxRate == null)
|
||||
{
|
||||
ImGui.Text("Goto a Retainer Vocate and talk to then. Click the 'View market tax rates' menu item.");
|
||||
ImGui.TextWrapped("Goto a Retainer Vocate and talk to then. Click the 'View market tax rates' menu item.");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue