Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 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
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
22 changes: 22 additions & 0 deletions Dependencies/clay/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
zlib/libpng license

Copyright (c) 2024 Nic Barker

This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the
use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software in a
product, an acknowledgment in the product documentation would be
appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must not
be misrepresented as being the original software.

3. This notice may not be removed or altered from any source
distribution.
5,058 changes: 5,058 additions & 0 deletions Dependencies/clay/include/clay.h
Comment thread
Gopmyc marked this conversation as resolved.

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions Dependencies/clay/premake5.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
project "clay"
kind "StaticLib"
language "C"
cdialect "C17"
targetdir (outputdir .. "%{cfg.buildcfg}/%{prj.name}")
objdir (objoutdir .. "%{cfg.buildcfg}/%{prj.name}")
warnings "Off"

files {
"include/**.h",
"src/**.c",
"**.lua"
}

includedirs {
"include"
}

filter { "configurations:Debug" }
defines { "DEBUG", "_DEBUG" }
runtime "Debug"
symbols "On"

filter { "configurations:Release or configurations:Publish" }
defines { "NDEBUG" }
runtime "Release"
optimize "On"
8 changes: 8 additions & 0 deletions Dependencies/clay/src/clay.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* @project: Overload
* @author: Overload Tech.
* @licence: MIT
*/

#define CLAY_IMPLEMENTATION
#include <clay.h>
71 changes: 71 additions & 0 deletions Resources/Engine/Lua/Components/Canvas.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---@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 number of UI pixels represented by one world unit
---@return number
function Canvas:GetPixelsPerUnit() end

--- Defines the number of UI pixels represented by one world unit
---@param pixelsPerUnit number
function Canvas:SetPixelsPerUnit(pixelsPerUnit) 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
33 changes: 33 additions & 0 deletions Resources/Engine/Lua/Components/Image.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---@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 size
---@return Vector2
function Image:GetSize() end

--- Defines the image size
---@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
94 changes: 94 additions & 0 deletions Resources/Engine/Lua/Components/LayoutGroup.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---@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 minimum layout container size
---@return Vector2
function LayoutGroup:GetSize() end

--- Defines the minimum layout container size
---@param size Vector2
function LayoutGroup:SetSize(size) 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
79 changes: 79 additions & 0 deletions Resources/Engine/Lua/Components/Text.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---@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 text extents in canvas pixels
---@return Vector2
function Text:GetExtents() end

--- Defines the text extents in canvas pixels
---@param extents Vector2
function Text:SetExtents(extents) 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