Flint Engine
Modular C++20 2D game engine powered by SDL3
Loading...
Searching...
No Matches
ui-types.h
1// SPDX-License-Identifier: MIT
2// SPDX-FileCopyrightText: 2025-2026 Manuel Osorio
3#pragma once
4
5#include "flint/math/types.h"
6
7namespace Flint {
8 class UICanvas;
15 enum class UIInputMode {
16 Mouse,
17 Keyboard,
18 Gamepad
19 };
20
26 enum class UILayoutDirection {
27 None,
28 Horizontal ,
29 Vertical
30 };
31
37 enum class UIAlign {
38 Start,
39 Center,
40 End,
41 Stretch
43 };
44
50 struct UIPadding {
51 float top = 0.0f;
52 float right = 0.0f;
53 float bottom = 0.0f;
54 float left = 0.0f;
55 };
56
62 struct UIMargin {
63 float top = 0.0f;
64 float left = 0.0f;
65 float right = 0.0f;
66 float bottom = 0.0f;
67 };
68
79 float scale = 1.f;
82 nullptr;
83 };
84
85}
Dynamic 2D batching engine processing shape vector geometry and hardware-accelerated text strings....
Definition ui-canvas.h:106
UICanvas * canvas
Definition ui-types.h:81
Represents the boundary budget passed down the node tree during layout allocation.
Definition ui-types.h:76
Defines the exterior boundaries (in pixels) surrounding a UI element.
Definition ui-types.h:62
Defines the internal spacing boundaries (in pixels) for UI layout containers.
Definition ui-types.h:50