Last active
May 31, 2020 21:03
-
-
Save Erinaaaaaaa/25820290f3df953b71f4dfac77530345 to your computer and use it in GitHub Desktop.
DrawSizePreservingFillContainer not behaving as expected when parent is padded (ppy/osu-framework issue #3592)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using osu.Framework.Graphics; | |
using osu.Framework.Graphics.Containers; | |
using osu.Framework.Graphics.Shapes; | |
using osuTK; | |
using osuTK.Graphics; | |
namespace ProjectDiba.Game.Graphics.RhythmGame | |
{ | |
public class NoteContainer : CompositeDrawable | |
{ | |
public NoteContainer() | |
{ | |
Padding = new MarginPadding | |
{ | |
Top = 96, | |
Bottom = 192, | |
Horizontal = 32, | |
}; | |
InternalChildren = new Drawable[] | |
{ | |
new Box | |
{ | |
RelativeSizeAxes = Axes.Both, | |
Colour = Color4.Red, | |
}, | |
new DrawSizePreservingFillContainer() | |
{ | |
RelativeSizeAxes = Axes.Both, | |
Width = 1, Height = 1, | |
TargetDrawSize = new Vector2(3600, 1600), | |
Child = new Box | |
{ | |
Width = 3600, | |
Height = 1600, | |
Colour = Color4.Blue, | |
Alpha = 0.2f, | |
} | |
} | |
}; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment