Skip to content

feat: integrate Clay UI Layout Library as optional layout engine#1

Open
pbisogno wants to merge 2 commits intomainfrom
feat/clay-ui-layout
Open

feat: integrate Clay UI Layout Library as optional layout engine#1
pbisogno wants to merge 2 commits intomainfrom
feat/clay-ui-layout

Conversation

@pbisogno
Copy link
Owner

@pbisogno pbisogno commented Mar 1, 2026

Add Clay (C Layout) as a new layout option for OTUI screens, coexisting with the existing anchor, horizontal, vertical, grid, and flexbox layouts.

  • Vendor clay.h v0.14 (single-header, MIT licensed, zero dependencies)
  • New UIClayLayout class bridging Clay's layout engine with UIWidget
  • OTUI support via layout: clay with direction, child-gap, align-x/y
  • Lua bindings for programmatic layout creation
  • CMake toggle TOGGLE_FRAMEWORK_CLAY (ON by default)
  • Demo module (client_claydemo) with button on top menu for testing

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Behavior

Actual

Do this and that doesn't happens

Expected

Do this and that happens

Fixes

# (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • Server Version:
  • Client:
  • Operating System:

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

pbisogno and others added 2 commits March 1, 2026 19:28
Add Clay (C Layout) as a new layout option for OTUI screens, coexisting
with the existing anchor, horizontal, vertical, grid, and flexbox layouts.

- Vendor clay.h v0.14 (single-header, MIT licensed, zero dependencies)
- New UIClayLayout class bridging Clay's layout engine with UIWidget
- OTUI support via `layout: clay` with direction, child-gap, align-x/y
- Lua bindings for programmatic layout creation
- CMake toggle TOGGLE_FRAMEWORK_CLAY (ON by default)
- Demo module (client_claydemo) with button on top menu for testing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add display:clay and display:inline-clay as CSS display types that
route through the Clay layout engine. This extends the OTUI-only Clay
integration to also work with the HTML/CSS UI pipeline.

- Add Clay/InlineClay variants to DisplayType enum
- Add layoutClay() free function for HTML containers
- Wire Clay dispatch in uiwidgethtml.cpp layout pipeline
- Update helper functions (isInlineLike, breakLine, widthAutoFillsContainingBlock)
- Add game_htmlclaydemo module with HTML/CSS example using display:clay

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant