mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 14:23:40 +01:00
Fix user actions offset
This commit is contained in:
parent
a1e2473774
commit
2a2fded520
1 changed files with 13 additions and 6 deletions
|
|
@ -93,7 +93,7 @@ internal sealed partial class ActiveNotification
|
|||
this.DrawTopBar(width, actionWindowHeight, isHovered);
|
||||
if (!this.underlyingNotification.Minimized && !this.expandoEasing.IsRunning)
|
||||
{
|
||||
this.DrawContentArea(width, actionWindowHeight);
|
||||
this.DrawContentAndActions(width, actionWindowHeight);
|
||||
}
|
||||
else if (this.expandoEasing.IsRunning)
|
||||
{
|
||||
|
|
@ -101,7 +101,7 @@ internal sealed partial class ActiveNotification
|
|||
ImGui.PushStyleVar(ImGuiStyleVar.Alpha, opacity * (1f - (float)this.expandoEasing.Value));
|
||||
else
|
||||
ImGui.PushStyleVar(ImGuiStyleVar.Alpha, opacity * (float)this.expandoEasing.Value);
|
||||
this.DrawContentArea(width, actionWindowHeight);
|
||||
this.DrawContentAndActions(width, actionWindowHeight);
|
||||
ImGui.PopStyleVar();
|
||||
}
|
||||
|
||||
|
|
@ -347,7 +347,7 @@ internal sealed partial class ActiveNotification
|
|||
return r;
|
||||
}
|
||||
|
||||
private void DrawContentArea(float width, float actionWindowHeight)
|
||||
private void DrawContentAndActions(float width, float actionWindowHeight)
|
||||
{
|
||||
var textColumnX = (NotificationConstants.ScaledWindowPadding * 2) + NotificationConstants.ScaledIconSize;
|
||||
var textColumnWidth = width - textColumnX - NotificationConstants.ScaledWindowPadding;
|
||||
|
|
@ -361,10 +361,17 @@ internal sealed partial class ActiveNotification
|
|||
textColumnOffset.Y += NotificationConstants.ScaledComponentGap;
|
||||
|
||||
this.DrawContentBody(textColumnOffset, textColumnWidth);
|
||||
textColumnOffset.Y = ImGui.GetCursorPosY() + NotificationConstants.ScaledComponentGap;
|
||||
|
||||
ImGui.SetCursorPos(textColumnOffset);
|
||||
this.InvokeDrawActions(textColumnOffset, new(textColumnX + textColumnWidth, float.MaxValue));
|
||||
if (this.DrawActions is null)
|
||||
return;
|
||||
|
||||
var userActionOffset = new Vector2(
|
||||
NotificationConstants.ScaledWindowPadding,
|
||||
ImGui.GetCursorPosY() + NotificationConstants.ScaledComponentGap);
|
||||
ImGui.SetCursorPos(userActionOffset);
|
||||
this.InvokeDrawActions(
|
||||
userActionOffset,
|
||||
new(width - NotificationConstants.ScaledWindowPadding, float.MaxValue));
|
||||
}
|
||||
|
||||
private void DrawIcon(Vector2 minCoord, Vector2 size)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue