Display missing size on data analysis window in a less scary color
This commit is contained in:
@@ -106,6 +106,7 @@ public class DataAnalysisUi : WindowMediatorSubscriberBase
|
|||||||
if (_cachedAnalysis!.Count == 0) return;
|
if (_cachedAnalysis!.Count == 0) return;
|
||||||
|
|
||||||
bool isAnalyzing = _characterAnalyzer.IsAnalysisRunning;
|
bool isAnalyzing = _characterAnalyzer.IsAnalysisRunning;
|
||||||
|
bool needAnalysis = _cachedAnalysis!.Any(c => c.Value.Any(f => !f.Value.IsComputed));
|
||||||
if (isAnalyzing)
|
if (isAnalyzing)
|
||||||
{
|
{
|
||||||
UiSharedService.ColorTextWrapped($"Analyzing {_characterAnalyzer.CurrentFile}/{_characterAnalyzer.TotalFiles}",
|
UiSharedService.ColorTextWrapped($"Analyzing {_characterAnalyzer.CurrentFile}/{_characterAnalyzer.TotalFiles}",
|
||||||
@@ -117,7 +118,7 @@ public class DataAnalysisUi : WindowMediatorSubscriberBase
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_cachedAnalysis!.Any(c => c.Value.Any(f => !f.Value.IsComputed)))
|
if (needAnalysis)
|
||||||
{
|
{
|
||||||
UiSharedService.ColorTextWrapped("Some entries in the analysis have file size not determined yet, press the button below to analyze your current data",
|
UiSharedService.ColorTextWrapped("Some entries in the analysis have file size not determined yet, press the button below to analyze your current data",
|
||||||
ImGuiColors.DalamudYellow);
|
ImGuiColors.DalamudYellow);
|
||||||
@@ -159,7 +160,17 @@ public class DataAnalysisUi : WindowMediatorSubscriberBase
|
|||||||
ImGui.TextUnformatted(UiSharedService.ByteToString(_cachedAnalysis!.Sum(c => c.Value.Sum(c => c.Value.OriginalSize))));
|
ImGui.TextUnformatted(UiSharedService.ByteToString(_cachedAnalysis!.Sum(c => c.Value.Sum(c => c.Value.OriginalSize))));
|
||||||
ImGui.TextUnformatted("Total size (compressed for up/download only):");
|
ImGui.TextUnformatted("Total size (compressed for up/download only):");
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGui.TextUnformatted(UiSharedService.ByteToString(_cachedAnalysis!.Sum(c => c.Value.Sum(c => c.Value.CompressedSize))));
|
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow, needAnalysis))
|
||||||
|
{
|
||||||
|
ImGui.TextUnformatted(UiSharedService.ByteToString(_cachedAnalysis!.Sum(c => c.Value.Sum(c => c.Value.CompressedSize))));
|
||||||
|
if (needAnalysis && !isAnalyzing)
|
||||||
|
{
|
||||||
|
ImGui.SameLine();
|
||||||
|
using (ImRaii.PushFont(UiBuilder.IconFont))
|
||||||
|
ImGui.TextUnformatted(FontAwesomeIcon.ExclamationCircle.ToIconString());
|
||||||
|
UiSharedService.AttachToolTip("Click \"Start analysis\" to calculate download size");
|
||||||
|
}
|
||||||
|
}
|
||||||
ImGui.TextUnformatted($"Total modded model triangles: {_cachedAnalysis.Sum(c => c.Value.Sum(f => f.Value.Triangles))}");
|
ImGui.TextUnformatted($"Total modded model triangles: {_cachedAnalysis.Sum(c => c.Value.Sum(f => f.Value.Triangles))}");
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
|
|
||||||
@@ -197,7 +208,17 @@ public class DataAnalysisUi : WindowMediatorSubscriberBase
|
|||||||
ImGui.TextUnformatted(UiSharedService.ByteToString(kvp.Value.Sum(c => c.Value.OriginalSize)));
|
ImGui.TextUnformatted(UiSharedService.ByteToString(kvp.Value.Sum(c => c.Value.OriginalSize)));
|
||||||
ImGui.TextUnformatted($"{kvp.Key} size (compressed for up/download only):");
|
ImGui.TextUnformatted($"{kvp.Key} size (compressed for up/download only):");
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGui.TextUnformatted(UiSharedService.ByteToString(kvp.Value.Sum(c => c.Value.CompressedSize)));
|
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow, needAnalysis))
|
||||||
|
{
|
||||||
|
ImGui.TextUnformatted(UiSharedService.ByteToString(kvp.Value.Sum(c => c.Value.CompressedSize)));
|
||||||
|
if (needAnalysis && !isAnalyzing)
|
||||||
|
{
|
||||||
|
ImGui.SameLine();
|
||||||
|
using (ImRaii.PushFont(UiBuilder.IconFont))
|
||||||
|
ImGui.TextUnformatted(FontAwesomeIcon.ExclamationCircle.ToIconString());
|
||||||
|
UiSharedService.AttachToolTip("Click \"Start analysis\" to calculate download size");
|
||||||
|
}
|
||||||
|
}
|
||||||
ImGui.TextUnformatted($"{kvp.Key} VRAM usage:");
|
ImGui.TextUnformatted($"{kvp.Key} VRAM usage:");
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
var vramUsage = groupedfiles.SingleOrDefault(v => string.Equals(v.Key, "tex", StringComparison.Ordinal));
|
var vramUsage = groupedfiles.SingleOrDefault(v => string.Equals(v.Key, "tex", StringComparison.Ordinal));
|
||||||
@@ -410,11 +431,6 @@ public class DataAnalysisUi : WindowMediatorSubscriberBase
|
|||||||
using var text = ImRaii.PushColor(ImGuiCol.Text, new Vector4(0, 0, 0, 1), string.Equals(item.Hash, _selectedHash, StringComparison.Ordinal));
|
using var text = ImRaii.PushColor(ImGuiCol.Text, new Vector4(0, 0, 0, 1), string.Equals(item.Hash, _selectedHash, StringComparison.Ordinal));
|
||||||
using var text2 = ImRaii.PushColor(ImGuiCol.Text, new Vector4(1, 1, 1, 1), !item.IsComputed);
|
using var text2 = ImRaii.PushColor(ImGuiCol.Text, new Vector4(1, 1, 1, 1), !item.IsComputed);
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
if (!item.IsComputed)
|
|
||||||
{
|
|
||||||
ImGui.TableSetBgColor(ImGuiTableBgTarget.RowBg1, UiSharedService.Color(ImGuiColors.DalamudRed));
|
|
||||||
ImGui.TableSetBgColor(ImGuiTableBgTarget.RowBg0, UiSharedService.Color(ImGuiColors.DalamudRed));
|
|
||||||
}
|
|
||||||
if (string.Equals(_selectedHash, item.Hash, StringComparison.Ordinal))
|
if (string.Equals(_selectedHash, item.Hash, StringComparison.Ordinal))
|
||||||
{
|
{
|
||||||
ImGui.TableSetBgColor(ImGuiTableBgTarget.RowBg1, UiSharedService.Color(ImGuiColors.DalamudYellow));
|
ImGui.TableSetBgColor(ImGuiTableBgTarget.RowBg1, UiSharedService.Color(ImGuiColors.DalamudYellow));
|
||||||
@@ -432,7 +448,8 @@ public class DataAnalysisUi : WindowMediatorSubscriberBase
|
|||||||
ImGui.TextUnformatted(UiSharedService.ByteToString(item.OriginalSize));
|
ImGui.TextUnformatted(UiSharedService.ByteToString(item.OriginalSize));
|
||||||
if (ImGui.IsItemClicked()) _selectedHash = item.Hash;
|
if (ImGui.IsItemClicked()) _selectedHash = item.Hash;
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
ImGui.TextUnformatted(UiSharedService.ByteToString(item.CompressedSize));
|
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow, !item.IsComputed))
|
||||||
|
ImGui.TextUnformatted(UiSharedService.ByteToString(item.CompressedSize));
|
||||||
if (ImGui.IsItemClicked()) _selectedHash = item.Hash;
|
if (ImGui.IsItemClicked()) _selectedHash = item.Hash;
|
||||||
if (string.Equals(fileGroup.Key, "tex", StringComparison.Ordinal))
|
if (string.Equals(fileGroup.Key, "tex", StringComparison.Ordinal))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user