add visibility for loaded mods size for pair, use menu bar for settings, remove settings button

This commit is contained in:
rootdarkarchon
2023-11-16 15:57:23 +01:00
parent c196cdd344
commit 96cc64b35a
6 changed files with 21 additions and 18 deletions

View File

@@ -68,8 +68,7 @@ public class CompactUi : WindowMediatorSubscriberBase
_selectPairsForGroupUi = selectPairForTagUi;
_tabMenu = new TopTabMenu(Mediator, _apiController, _pairManager);
// todo: reenable when dalamud title bar buttons are out of staging
/*AllowPinning = false;
AllowPinning = false;
AllowClickthrough = false;
TitleBarButtons = new()
{
@@ -82,7 +81,7 @@ public class CompactUi : WindowMediatorSubscriberBase
},
IconOffset = new(2,1)
}
};*/
};
_drawFolders = GetDrawFolders().ToList();
@@ -371,17 +370,6 @@ public class CompactUi : WindowMediatorSubscriberBase
}
UiSharedService.AttachToolTip("Click to copy");
// todo: remove when dalamud title bar buttons are out of staging
ImGui.SetWindowFontScale(1.5f);
var buttonSize = UiSharedService.GetIconButtonSize(FontAwesomeIcon.Cog);
ImGui.SameLine();
ImGui.SetCursorPosX(ImGui.GetWindowContentRegionMax().X - buttonSize.X);
if (UiSharedService.NormalizedIconButton(FontAwesomeIcon.Cog))
{
Mediator.Publish(new UiToggleMessage(typeof(SettingsUi)));
}
ImGui.SetWindowFontScale(1.0f);
if (!string.Equals(_apiController.DisplayName, _apiController.UID, StringComparison.Ordinal))
{
var origTextSize = ImGui.CalcTextSize(_apiController.UID);

View File

@@ -227,6 +227,12 @@ public class DrawUserPair
userPairText += UiSharedService.TooltipSeparator + "You are directly Paired";
}
if (_pair.LastAppliedDataSize >= 0)
{
userPairText += UiSharedService.TooltipSeparator + (!_pair.IsVisible ? "(Last) " : string.Empty) +
"Loaded Mods Size: " + UiSharedService.ByteToString(_pair.LastAppliedDataSize, true);
}
if (_syncedGroups.Any())
{
userPairText += UiSharedService.TooltipSeparator + string.Join(Environment.NewLine,

View File

@@ -69,9 +69,8 @@ public class SettingsUi : WindowMediatorSubscriberBase
_apiController = apiController;
_fileCompactor = fileCompactor;
_uiShared = uiShared;
// todo: reenable when dalamud is out of staging
/*AllowClickthrough = false;
AllowPinning = false;*/
AllowClickthrough = false;
AllowPinning = false;
SizeConstraints = new WindowSizeConstraints()
{

View File

@@ -420,7 +420,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
var frameOffsetY = ((frameHeight - iconData.IconSize.Y * iconData.IconScaling) / 2f);
drawList.AddText(UiBuilder.IconFont, ImGui.GetFontSize() * iconData.IconScaling,
drawList.AddText(UiBuilder.IconFont, UiBuilder.IconFont.FontSize * iconData.IconScaling,
new(windowPos.X - scrollPosX + cursorPos.X + iconData.OffsetX,
windowPos.Y - scrollPosY + cursorPos.Y + frameOffsetY),
color, icon.ToIconString());