mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 13:57:43 +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);
|
this.DrawTopBar(width, actionWindowHeight, isHovered);
|
||||||
if (!this.underlyingNotification.Minimized && !this.expandoEasing.IsRunning)
|
if (!this.underlyingNotification.Minimized && !this.expandoEasing.IsRunning)
|
||||||
{
|
{
|
||||||
this.DrawContentArea(width, actionWindowHeight);
|
this.DrawContentAndActions(width, actionWindowHeight);
|
||||||
}
|
}
|
||||||
else if (this.expandoEasing.IsRunning)
|
else if (this.expandoEasing.IsRunning)
|
||||||
{
|
{
|
||||||
|
|
@ -101,7 +101,7 @@ internal sealed partial class ActiveNotification
|
||||||
ImGui.PushStyleVar(ImGuiStyleVar.Alpha, opacity * (1f - (float)this.expandoEasing.Value));
|
ImGui.PushStyleVar(ImGuiStyleVar.Alpha, opacity * (1f - (float)this.expandoEasing.Value));
|
||||||
else
|
else
|
||||||
ImGui.PushStyleVar(ImGuiStyleVar.Alpha, opacity * (float)this.expandoEasing.Value);
|
ImGui.PushStyleVar(ImGuiStyleVar.Alpha, opacity * (float)this.expandoEasing.Value);
|
||||||
this.DrawContentArea(width, actionWindowHeight);
|
this.DrawContentAndActions(width, actionWindowHeight);
|
||||||
ImGui.PopStyleVar();
|
ImGui.PopStyleVar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -347,7 +347,7 @@ internal sealed partial class ActiveNotification
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawContentArea(float width, float actionWindowHeight)
|
private void DrawContentAndActions(float width, float actionWindowHeight)
|
||||||
{
|
{
|
||||||
var textColumnX = (NotificationConstants.ScaledWindowPadding * 2) + NotificationConstants.ScaledIconSize;
|
var textColumnX = (NotificationConstants.ScaledWindowPadding * 2) + NotificationConstants.ScaledIconSize;
|
||||||
var textColumnWidth = width - textColumnX - NotificationConstants.ScaledWindowPadding;
|
var textColumnWidth = width - textColumnX - NotificationConstants.ScaledWindowPadding;
|
||||||
|
|
@ -361,10 +361,17 @@ internal sealed partial class ActiveNotification
|
||||||
textColumnOffset.Y += NotificationConstants.ScaledComponentGap;
|
textColumnOffset.Y += NotificationConstants.ScaledComponentGap;
|
||||||
|
|
||||||
this.DrawContentBody(textColumnOffset, textColumnWidth);
|
this.DrawContentBody(textColumnOffset, textColumnWidth);
|
||||||
textColumnOffset.Y = ImGui.GetCursorPosY() + NotificationConstants.ScaledComponentGap;
|
|
||||||
|
|
||||||
ImGui.SetCursorPos(textColumnOffset);
|
if (this.DrawActions is null)
|
||||||
this.InvokeDrawActions(textColumnOffset, new(textColumnX + textColumnWidth, float.MaxValue));
|
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)
|
private void DrawIcon(Vector2 minCoord, Vector2 size)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue