mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Use Enum.HasFlag
With .NET core 2.0+ this is as efficient as the ugly code we've been using.
This commit is contained in:
@ -118,9 +118,9 @@ namespace osu.Game.Overlays.Toolbar
|
||||
{
|
||||
Direction = FillDirection.Vertical,
|
||||
RelativeSizeAxes = Axes.Both, //stops us being considered in parent's autosize
|
||||
Anchor = (TooltipAnchor & Anchor.x0) > 0 ? Anchor.BottomLeft : Anchor.BottomRight,
|
||||
Anchor = TooltipAnchor.HasFlag(Anchor.x0) ? Anchor.BottomLeft : Anchor.BottomRight,
|
||||
Origin = TooltipAnchor,
|
||||
Position = new Vector2((TooltipAnchor & Anchor.x0) > 0 ? 5 : -5, 5),
|
||||
Position = new Vector2(TooltipAnchor.HasFlag(Anchor.x0) ? 5 : -5, 5),
|
||||
Alpha = 0,
|
||||
Children = new[]
|
||||
{
|
||||
|
Reference in New Issue
Block a user