Something went wrong. Try again.
art software for the rest of us
drawing paint image sdl art
Something went wrong. Try again.
603 B · 31 lines
C
1234567891011121314151617181920212223242526272829303132#pragma once
#include <cstdint>
namespace UI {
enum class Orientation { Vertical, Horizontal};
enum class AnchorFlags { None = 0, Left = 1 << 0, Top = 1 << 1, Right = 1 << 2, Bottom = 1 << 3, Center = 1 << 4, Stretch = Left | Right | Top | Bottom};
inline AnchorFlags operator|(AnchorFlags a, AnchorFlags b) { return static_cast<AnchorFlags>(static_cast<uint32_t>(a) | static_cast<uint32_t>(b));}
inline AnchorFlags operator&(AnchorFlags a, AnchorFlags b) { return static_cast<AnchorFlags>(static_cast<uint32_t>(a) & static_cast<uint32_t>(b));}
}