Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
4656cbd
chore: ignore issue 631 local artifacts
Gopmyc May 22, 2026
1106b27
feat(font): add runtime font resources
Gopmyc May 22, 2026
1120e5b
feat(ui): add canvas component
Gopmyc May 22, 2026
958ee56
feat(ui): add 2d transform component
Gopmyc May 22, 2026
3945563
feat(ui): add image component and shader
Gopmyc May 22, 2026
9c03605
feat(ui): add text component and shader
Gopmyc May 22, 2026
dd68d8c
feat(ui): add clay-backed layout group
Gopmyc May 22, 2026
d3a09ab
feat(ui): register components with ECS and inspector
Gopmyc May 22, 2026
b1c3e9f
feat(lua): expose UI components
Gopmyc May 22, 2026
5bb1b31
feat(rendering): compose UI drawables in scene renderer
Gopmyc May 22, 2026
ded6032
feat(editor): add UI viewport toggle
Gopmyc May 22, 2026
2c56727
feat(editor): draw UI debug bounds
Gopmyc May 22, 2026
523cbc5
feat(editor): add UI actor creation shortcuts
Gopmyc May 22, 2026
a9288d3
refactor(font): use freetype for UI font atlases
Gopmyc May 22, 2026
bfc575e
feat(ui): add 2d size and layout child-size controls
Gopmyc May 22, 2026
1c4eb19
fix(ui): apply controlled child size in layout groups
Gopmyc May 23, 2026
1844468
feat(ui): add dedicated horizontal and vertical layout components
Gopmyc May 23, 2026
c01ec14
feat(ui): add stretch anchors and update lua ui bindings
Gopmyc May 23, 2026
8109762
feat(font): add embedded material support
Gopmyc May 23, 2026
adbcb4d
refactor(ui): reuse font embedded material in text component
Gopmyc May 23, 2026
dc4457e
fix(editor): scope UI toggle to scene view screen-space mode
Gopmyc May 23, 2026
13f5b93
chore: remove local issue 631 ignore artifacts
Gopmyc May 23, 2026
bb6f099
fix(editor): mark GameView methods as override
Gopmyc May 23, 2026
6432d99
refactor(ui): reuse CTransform rotation and scale in Transform2D
Gopmyc May 23, 2026
ffe4516
fix(ui): use render size for constant-pixel canvas anchors
Gopmyc May 23, 2026
30b03c1
build(clay): package clay as standalone dependency
Gopmyc May 24, 2026
d354331
feat(font): support per-size atlas and embedded material variants
Gopmyc May 24, 2026
7afe259
feat(editor): add font reload action in asset browser
Gopmyc May 24, 2026
9132476
feat(ui): add multiline support to InputText widget
Gopmyc May 24, 2026
fa117a5
fix(ui): rebuild text meshes with requested font pixel size
Gopmyc May 24, 2026
c9b8921
feat(ui): expose layout child-size controls and layout lua docs
Gopmyc May 24, 2026
abe9465
feat(ui): add canvas match modes and pivot-aware transform2d rendering
Gopmyc May 24, 2026
aae8a0c
feat(editor): adapt gizmos and debug bounds for canvas-space UI
Gopmyc May 24, 2026
27ed417
fix(ui): align canvas sizing and component inspector behavior
Gopmyc May 25, 2026
c426974
fix(editor): sync ui gizmo render and picking transforms
Gopmyc May 25, 2026
e16bc89
fix(font): support larger dynamic atlas variants
Gopmyc May 25, 2026
b2a5409
fix(ui): defer widget/plugin invalidation during callbacks
Gopmyc May 25, 2026
11cd1d9
refactor(ui): merge Transform2D into Transform
Gopmyc Jun 1, 2026
2674337
feat(ui): initialize transform UI data in UI components
Gopmyc Jun 1, 2026
4dd63d9
refactor(ui): use Transform UI matrices in renderer and picking
Gopmyc Jun 1, 2026
c70b29a
fix(editor): improve UI gizmo translation and canvas fallback
Gopmyc Jun 1, 2026
0b8d442
fix(ui): stabilize canvas inspector match mode layout
Gopmyc Jun 1, 2026
f0e392f
fix(ui): derive active UI context from parent canvas
Gopmyc Jun 2, 2026
8fbe3b8
fix(ui): align canvas-space rendering and editor tools
Gopmyc Jun 2, 2026
11625a2
feat(ui): add layout force expand controls
Gopmyc Jun 2, 2026
8a9d24d
fix(editor): import and propagate font assets
Gopmyc Jun 2, 2026
fef51c3
chore(ui): rename engine Image and Text resources
Gopmyc Jun 2, 2026
b1f4364
fix(ui): apply layout pivot to child offsets
Gopmyc Jun 6, 2026
8f308ff
fix(editor): draw debug bounds for UI layouts
Gopmyc Jun 6, 2026
d4ea106
fix(ui): remove layout size property
Gopmyc Jun 6, 2026
c660213
fix(ui): apply layout alignment offsets
Gopmyc Jun 6, 2026
5aa94a4
fix(editor): refresh inspector on hierarchy changes
Gopmyc Jun 6, 2026
10ad616
fix(ui): avoid repeated missing font loads
Gopmyc Jun 6, 2026
29c2261
fix(ui): clear deleted image textures
Gopmyc Jun 6, 2026
c5af304
fix(ui): use transform size for text bounds
Gopmyc Jun 6, 2026
9661a2d
fix(ui): clip text to transform bounds
Gopmyc Jun 7, 2026
d892a23
fix(editor): stabilize ui screen-space gizmo
Gopmyc Jun 7, 2026
9484154
fix(editor): hide z axis for 2d ui gizmo
Gopmyc Jun 7, 2026
d5410e9
fix(editor): simplify transform2d rotation and scale fields
Gopmyc Jun 7, 2026
5fb7811
fix(ui): restore layout child sizes when released
Gopmyc Jun 7, 2026
e27b679
refactor(ui): resolve layout groups through Clay
Gopmyc Jun 7, 2026
bb691e8
fix(ui): apply layout alignment to clay results
Gopmyc Jun 7, 2026
7db3651
refactor(ui): centralize resolved ui transforms
Gopmyc Jun 7, 2026
2d8ac4f
refactor(ui): resolve layout children without render mutations
Gopmyc Jun 7, 2026
c099c9e
refactor(ui): move ui transform resolution out of transform
Gopmyc Jun 7, 2026
129f7d6
fix(ui): apply layout controlled sizes per axis
Gopmyc Jun 7, 2026
a4d3ee0
refactor(ui): use transform size for images
Gopmyc Jun 8, 2026
2e8d8aa
fix(ui): apply layout child sizes per axis
Gopmyc Jun 8, 2026
feacc56
refactor(ui): extract text mesh builder
Gopmyc Jun 8, 2026
b1b0d8e
fix(ui): keep text size queries from rebuilding meshes
Gopmyc Jun 8, 2026
70fa2c7
perf(ui): cache resolved layout groups
Gopmyc Jun 8, 2026
9574f60
refactor(ui): add frame resolver cache
Gopmyc Jun 8, 2026
83f6585
perf(ui): reuse frame resolver in scene rendering
Gopmyc Jun 8, 2026
2b4c2a2
perf(editor): reuse ui frame resolver in scene tools
Gopmyc Jun 8, 2026
67cdd31
perf(ui): reuse resolved text layouts
Gopmyc Jun 8, 2026
6315e57
perf(ui): cache image material updates
Gopmyc Jun 8, 2026
bc7ae58
perf(ui): cache text material updates
Gopmyc Jun 8, 2026
5cb5a21
refactor(ui): use explicit clay layout context
Gopmyc Jun 8, 2026
bb60470
refactor(ui): inject default UI resources
Gopmyc Jun 9, 2026
adf7521
refactor(ui): require explicit clay layout context
Gopmyc Jun 9, 2026
a0aae38
refactor(editor): use OptRef for camera target actor
Gopmyc Jun 9, 2026
6a37833
fix(ui): resolve hierarchy transforms for UI elements
Gopmyc Jun 15, 2026
a120fbd
fix(ui): derive image size from texture
Gopmyc Jun 15, 2026
22eca93
fix(ui): keep text layout retryable without font
Gopmyc Jun 15, 2026
00b933e
fix(ui): avoid splitting long text words
Gopmyc Jun 15, 2026
a59bff2
fix(editor): close picker when inspector context changes
Gopmyc Jun 15, 2026
4065382
Merge remote-tracking branch 'origin/main' into 631
Gopmyc Aug 19, 2026
727d13e
fix(rendering): use baregl buffer memory range
Gopmyc Aug 19, 2026
8d9a36e
fix(scene): preserve hierarchy order when unparenting
Gopmyc Aug 19, 2026
3393575
fix(ui): correct Clay layout sizing and offsets
Gopmyc Aug 19, 2026
d4e2ca0
feat(ui): add image aspect preservation
Gopmyc Aug 19, 2026
ea18078
refactor(ui): remove canvas pixels per unit setting
Gopmyc Aug 19, 2026
925a520
fix(ui): resolve stretch anchors per axis
Gopmyc Aug 19, 2026
854e478
fix(editor): stabilize gizmos in 2D UI mode
Gopmyc Aug 19, 2026
4e88d19
fix(ui): support Latin-1 text and logical line bounds
Gopmyc Aug 19, 2026
ad9dff7
feat(resources): track registry and texture revisions
Gopmyc Aug 26, 2026
9639c0f
fix(ui): refresh image state on resource changes
Gopmyc Aug 26, 2026
c6f92fe
fix(ui): invalidate text caches on resource changes
Gopmyc Aug 26, 2026
e0fc718
fix(ui): preserve explicit lines after oversized text runs
Gopmyc Aug 26, 2026
efd2437
fix(ui): resize text input buffers dynamically
Gopmyc Aug 26, 2026
aa47ba6
fix(eventing): tolerate listener removal during dispatch
Gopmyc Aug 26, 2026
98a4a35
fix(ui): harden widget layout lifetimes
Gopmyc Aug 26, 2026
3b8dcd6
fix(editor): complete supported asset type handling
Gopmyc Aug 26, 2026
fce05df
refactor(editor): centralize UI component creation
Gopmyc Aug 26, 2026
7b84d1e
fix(rendering): use defined pointer ordering for batches
Gopmyc Aug 26, 2026
b530fee
fix(rendering): restore frame camera after draw overrides
Gopmyc Aug 26, 2026
461574f
fix(ui): resolve layouts against effective parent sizes
Gopmyc Aug 26, 2026
21d27e9
fix(ui): align Clay layout slots deterministically
Gopmyc Aug 26, 2026
6cfce70
fix(ui): reserve layout space for scaled children
Gopmyc Sep 1, 2026
1868fb0
fix(editor): hide gizmo axes that cannot be translated
Gopmyc Sep 1, 2026
08ed006
feat(ui): warn when a UI component has no parent canvas
Gopmyc Sep 1, 2026
c00c413
fix(ui): align canvas warning with the inspector grid
Gopmyc Sep 3, 2026
4406ba8
fix(font): reject glyphs wider than the atlas
Gopmyc Sep 5, 2026
b2a5ccb
fix(editor): keep the gizmo ball visible in 2D UI mode
Gopmyc Sep 5, 2026
7034070
fix(editor): ignore UI focus in screen-space mode
Gopmyc Sep 5, 2026
9d9a8ac
perf(eventing): defer listener mutations during dispatch
Gopmyc Sep 5, 2026
06e1ed1
refactor(ui): replace clay with a local layout solver
Gopmyc Sep 5, 2026
57a1818
refactor(editor): remove the generic layout group component
Gopmyc Sep 5, 2026
f7a635e
fix(ui): use forward slashes in default UI resource paths
Gopmyc Sep 5, 2026
67876d7
docs(ui): document the UI transform and rendering API
Gopmyc Sep 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions Resources/Editor/Shaders/Gizmo.ovfx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ out VS_OUT

uniform bool u_IsBall;
uniform bool u_IsPickable;
uniform int u_VisibleAxes;
uniform int u_HighlightedAxis;
uniform float u_GizmoScale;

mat4 rotationMatrix(vec3 axis, float angle)
{
Expand All @@ -41,6 +43,17 @@ mat4 rotationMatrix(vec3 axis, float angle)

void main()
{
/* Instances are ordered Z, X, Y, while axis bits are ordered X, Y, Z */
int axisBit = gl_InstanceID == 1 ? 1 : (gl_InstanceID == 2 ? 2 : 4);

/* The ball is drawn with a single instance and isn't tied to an axis */
if (!u_IsBall && (u_VisibleAxes & axisBit) == 0)
{
vs_out.Color = vec3(0.0f);
gl_Position = vec4(2.0f, 2.0f, 2.0f, 1.0f);
return;
}

mat4 instanceModel = ubo_Model;

if (gl_InstanceID == 1)
Expand All @@ -49,10 +62,11 @@ void main()
instanceModel *= rotationMatrix(vec3(1, 0, 0), radians(90)); /* Y axis */

float distanceToCamera = distance(ubo_ViewPos, instanceModel[3].xyz);
float gizmoScale = u_GizmoScale > 0.0 ? u_GizmoScale : distanceToCamera * 0.1f;

vec3 pos = geo_Pos;

vec3 fragPos = vec3(instanceModel * vec4(pos * distanceToCamera * 0.1f, 1.0));
vec3 fragPos = vec3(instanceModel * vec4(pos * gizmoScale, 1.0));

if (u_IsPickable)
{
Expand Down Expand Up @@ -110,4 +124,4 @@ uniform bool u_IsPickable;
void main()
{
FRAGMENT_COLOR = vec4(fs_in.Color, 1.0f);
}
}
63 changes: 63 additions & 0 deletions Resources/Engine/Lua/Components/Canvas.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---@meta

--- Defines how a Canvas scales UI elements
---@enum CanvasScalerMode
CanvasScalerMode = {
CONSTANT_PIXEL_SIZE = 0,
SCALE_WITH_SCREEN_SIZE = 1
}

---@enum CanvasScreenMatchMode
CanvasScreenMatchMode = {
MATCH_WIDTH_OR_HEIGHT = 0,
EXPAND = 1,
SHRINK = 2
}

--- Represents a root canvas for in-game user interface elements
---@class Canvas : Component
Canvas = {}

--- Returns the actor that owns this component
---@return Actor
function Canvas:GetOwner() end

--- Returns the reference resolution used by the canvas
---@return Vector2
function Canvas:GetReferenceResolution() end

--- Defines the reference resolution used by the canvas
---@param referenceResolution Vector2
function Canvas:SetReferenceResolution(referenceResolution) end

--- Returns the canvas scale factor
---@return number
function Canvas:GetScaleFactor() end

--- Defines the canvas scale factor
---@param scaleFactor number
function Canvas:SetScaleFactor(scaleFactor) end

--- Returns the canvas scaler mode
---@return CanvasScalerMode
function Canvas:GetScalerMode() end

--- Defines the canvas scaler mode
---@param scalerMode CanvasScalerMode
function Canvas:SetScalerMode(scalerMode) end

--- Returns the screen match mode used with SCALE_WITH_SCREEN_SIZE
---@return CanvasScreenMatchMode
function Canvas:GetScreenMatchMode() end

--- Defines the screen match mode used with SCALE_WITH_SCREEN_SIZE
---@param screenMatchMode CanvasScreenMatchMode
function Canvas:SetScreenMatchMode(screenMatchMode) end

--- Returns the match width/height factor in range [0, 1]
---@return number
function Canvas:GetMatchWidthOrHeight() end

--- Defines the match width/height factor in range [0, 1]
---@param value number
function Canvas:SetMatchWidthOrHeight(value) end
9 changes: 9 additions & 0 deletions Resources/Engine/Lua/Components/HorizontalLayout.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---@meta

--- Arranges direct user interface children horizontally
---@class HorizontalLayout : LayoutGroup
HorizontalLayout = {}

--- Returns the actor that owns this component
---@return Actor
function HorizontalLayout:GetOwner() end
41 changes: 41 additions & 0 deletions Resources/Engine/Lua/Components/Image.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---@meta

--- Represents a renderable user interface image
---@class Image : Component
Image = {}

--- Returns the actor that owns this component
---@return Actor
function Image:GetOwner() end

--- Returns the texture rendered by the image
---@return Texture|nil
function Image:GetTexture() end

--- Defines the texture rendered by the image
---@param texture Texture|nil
function Image:SetTexture(texture) end

--- Returns the image display size stored by Transform UI data
---@return Vector2
function Image:GetSize() end

--- Defines the image display size stored by Transform UI data
---@param size Vector2
function Image:SetSize(size) end

--- Returns the image tint
---@return Vector4
function Image:GetTint() end

--- Defines the image tint
---@param tint Vector4
function Image:SetTint(tint) end

--- Returns whether the image keeps its intrinsic aspect ratio when resized
---@return boolean
function Image:GetPreserveAspect() end

--- Defines whether the image keeps its intrinsic aspect ratio when resized
---@param preserveAspect boolean
function Image:SetPreserveAspect(preserveAspect) end
102 changes: 102 additions & 0 deletions Resources/Engine/Lua/Components/LayoutGroup.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---@meta

--- Defines how a LayoutGroup arranges direct UI children
---@enum LayoutDirection
LayoutDirection = {
HORIZONTAL = 0,
VERTICAL = 1
}

---@enum LayoutHorizontalAlignment
LayoutHorizontalAlignment = {
LEFT = 0,
CENTER = 1,
RIGHT = 2
}

---@enum LayoutVerticalAlignment
LayoutVerticalAlignment = {
TOP = 0,
CENTER = 1,
BOTTOM = 2
}

--- Arranges direct user interface children along an axis
---@class LayoutGroup : Component
LayoutGroup = {}

--- Returns the actor that owns this component
---@return Actor
function LayoutGroup:GetOwner() end

--- Returns the layout direction
---@return LayoutDirection
function LayoutGroup:GetDirection() end

--- Defines the layout direction
---@param direction LayoutDirection
function LayoutGroup:SetDirection(direction) end

--- Returns the spacing between children
---@return number
function LayoutGroup:GetSpacing() end

--- Defines the non-negative spacing between children
---@param spacing number
function LayoutGroup:SetSpacing(spacing) end

--- Returns the layout padding as left, right, top, bottom
---@return Vector4
function LayoutGroup:GetPadding() end

--- Defines the layout padding as left, right, top, bottom
---@param padding Vector4
function LayoutGroup:SetPadding(padding) end

--- Returns the horizontal children alignment
---@return LayoutHorizontalAlignment
function LayoutGroup:GetHorizontalAlignment() end

--- Defines the horizontal children alignment
---@param alignment LayoutHorizontalAlignment
function LayoutGroup:SetHorizontalAlignment(alignment) end

--- Returns the vertical children alignment
---@return LayoutVerticalAlignment
function LayoutGroup:GetVerticalAlignment() end

--- Defines the vertical children alignment
---@param alignment LayoutVerticalAlignment
function LayoutGroup:SetVerticalAlignment(alignment) end

--- Returns whether the layout controls children width
---@return boolean
function LayoutGroup:GetControlChildrenWidth() end

--- Defines whether the layout controls children width
---@param value boolean
function LayoutGroup:SetControlChildrenWidth(value) end

--- Returns whether the layout controls children height
---@return boolean
function LayoutGroup:GetControlChildrenHeight() end

--- Defines whether the layout controls children height
---@param value boolean
function LayoutGroup:SetControlChildrenHeight(value) end

--- Returns whether child layout slots expand to use all available width
---@return boolean
function LayoutGroup:GetForceExpandWidth() end

--- Defines whether child layout slots expand to use all available width
---@param value boolean
function LayoutGroup:SetForceExpandWidth(value) end

--- Returns whether child layout slots expand to use all available height
---@return boolean
function LayoutGroup:GetForceExpandHeight() end

--- Defines whether child layout slots expand to use all available height
---@param value boolean
function LayoutGroup:SetForceExpandHeight(value) end
71 changes: 71 additions & 0 deletions Resources/Engine/Lua/Components/Text.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---@meta

---@enum TextHorizontalAlignment
TextHorizontalAlignment = {
LEFT = 0,
CENTER = 1,
RIGHT = 2
}

---@enum TextVerticalAlignment
TextVerticalAlignment = {
TOP = 0,
CENTER = 1,
BOTTOM = 2
}

--- Represents a renderable user interface text
---@class Text : Component
Text = {}

--- Returns the actor that owns this component
---@return Actor
function Text:GetOwner() end

--- Returns the text content
---@return string
function Text:GetText() end

--- Defines the text content
---@param text string
function Text:SetText(text) end

--- Returns the font resource path
---@return string
function Text:GetFontPath() end

--- Defines the font resource path
---@param fontPath string
function Text:SetFontPath(fontPath) end

--- Returns the font size in canvas pixels
---@return number
function Text:GetFontSize() end

--- Defines the font size in canvas pixels
---@param fontSize number
function Text:SetFontSize(fontSize) end

--- Returns the text color
---@return Vector4
function Text:GetColor() end

--- Defines the text color
---@param color Vector4
function Text:SetColor(color) end

--- Returns the horizontal text alignment
---@return TextHorizontalAlignment
function Text:GetHorizontalAlignment() end

--- Defines the horizontal text alignment
---@param alignment TextHorizontalAlignment
function Text:SetHorizontalAlignment(alignment) end

--- Returns the vertical text alignment
---@return TextVerticalAlignment
function Text:GetVerticalAlignment() end

--- Defines the vertical text alignment
---@param alignment TextVerticalAlignment
function Text:SetVerticalAlignment(alignment) end
Loading