Skip to content

Instantly share code, notes, and snippets.

@Appendme Appendme/gui.cpp Secret
Created Sep 14, 2019

Embed
What would you like to do?
struct TAIMPUIControlPlacement
{
TAIMPUIControlPlacement()
: Alignment(ualNone)
, AlignmentMargins{}
, Anchors{}
, Bounds{}
{
}
TAIMPUIControlPlacement(
TAIMPUIControlAlignment Alignment,
int Size,
RECT AlignmentMargins = { 3, 3, 3, 3 })
: Alignment(Alignment)
, AlignmentMargins(AlignmentMargins)
, Anchors({ 1, 1, 0, 0 })
, Bounds({})
{
if (Alignment == ualClient ||
Alignment == ualTop ||
Alignment == ualBottom)
Bounds.bottom = Size;
if (Alignment == ualClient ||
Alignment == ualLeft ||
Alignment == ualRight)
Bounds.right = Size;
}
TAIMPUIControlPlacement(
TAIMPUIControlAlignment Alignment,
RECT Bounds,
RECT AlignmentMargins = { 3, 3, 3, 3 })
: Alignment(Alignment)
, AlignmentMargins(AlignmentMargins)
, Anchors({ 1, 1, 0, 0 })
, Bounds(Bounds)
{
}
TAIMPUIControlPlacement(
RECT Bounds,
RECT Anchors = { 1, 1, 0, 0 })
: Alignment(ualNone)
, AlignmentMargins({ 3, 3, 3, 3 })
, Anchors(Anchors)
, Bounds(Bounds)
{
}
TAIMPUIControlAlignment Alignment;
RECT AlignmentMargins;
RECT Anchors;
RECT Bounds;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.