-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
UILargeButton has a function RefreshLocationBasedOnAnchor that makes it look nice when anchored.
Unfortunately, that's only implemented for Bottom_Right, Middle_Center, Bottom_Center, Top_Center.
simulated function RefreshLocationBasedOnAnchor()
{
switch( anchor )
{
case class'UIUtilities'.const.ANCHOR_BOTTOM_RIGHT:
SetPosition(-Width - 12 + OffsetX, -Height - 12 + OffsetY); // giving it a little breathing space to edge of screen, aligned with shortcut hud.
break;
case class'UIUtilities'.const.ANCHOR_MIDDLE_CENTER:
SetPosition(-Width * 0.5 + OffsetX, -Height * 0.5 + OffsetY);
break;
case class'UIUtilities'.const.ANCHOR_BOTTOM_CENTER:
SetPosition(-Width * 0.5 + OffsetX, -Height + OffsetY);
break;
case class'UIUtilities'.const.ANCHOR_TOP_CENTER:
SetPosition(-Width * 0.5 + OffsetX, OffsetY);
break;
}
if(bHideUntilRealized)
Show();
}
It should be expanded for every anchor.