Commit Graph

247 Commits

Author SHA1 Message Date
Taylor Robbins (Piggybank Studios)
6c616ff656 Fixed a bug in the CLAY macro that would cause an infinite loop if 256 for loops ended at the same time (i.e. without another for loop starting). This was caused by the CLAY__ELEMENT_DEFINITION_LATCH static uint8_t overflowing to 0 when incremented in the post-loop step which causes the loop to wrongfully run a second time 2025-03-24 18:21:24 -07:00
Taylor Robbins (Piggybank Studios)
f969c8f5b4 Adds CLAY_TEXT_ALIGN_SHRINK option to Clay_TextAlignment which tells the TEXT command producing code it is allowed to pass a boundingBox that is horizontally smaller than the result of the MeasureText call for that string. The Renderer is then able to choose how it wants to fit a piece of text in a smaller space (often this involves removing some number of characters and replacing them with "..." characters) 2025-03-05 13:02:15 -08:00
Nic Barker
5009146c65 [Bindings/Odin] Recompile odin bindings with -O3
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
2025-03-05 15:11:11 +13:00
Rico P
865b06d386
[Documentation] fix example in README (#307)
Some checks are pending
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Waiting to run
2025-03-05 10:14:37 +13:00
__hexmaster111
12319fc240
Updated measure text to support the defualt raylib font if the user spesfied font failed to load. (#305) 2025-03-05 10:13:42 +13:00
Laytan
2d7d5bc082
[Bindings/Odin] fix CreateArenaWithCapacityAndMemory capacity type (#306) 2025-03-05 09:49:53 +13:00
Nic Barker
02bce89d17
[Core] Improve & streamline grow / shrink handling (#296)
Some checks are pending
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Waiting to run
2025-03-04 10:56:38 +13:00
FintasticMan
b5b086af13
[Macros] Add versions of the CLAY_ID macros that take Clay_String (#285) 2025-03-04 10:30:53 +13:00
Nic Barker
5571c00a21 [Core] Convert capacity from uint32_t to size_t in Clay_CreateArenaWithCapacityAndMemory
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
2025-03-03 11:36:12 +13:00
Joram Vandemoortele
4ee501019c
[Compilers] Added DLL macro to support .dll building (#278)
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
2025-02-26 15:37:51 +13:00
Nic Barker
1fa8684e47 [Core] Fix bug where hover state didnt take clip rectangles into account
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
2025-02-25 08:55:14 +13:00
Benjamin Block
feead45f3e
[Documentation] Update README.md for Odin bindings to reflect the latest API changes. (#281)
Some checks are pending
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Waiting to run
2025-02-24 08:52:41 +13:00
mizmar
766325c395
[Core] Fix inverted condition for setting booleanWarnings.maxTextMeasureCacheExceeded (#275)
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
2025-02-20 09:22:35 +13:00
Alex Pedley
5afdf3f8c9
[Core] Make fakeContext use correct value from currentContext (#269) 2025-02-20 09:21:14 +13:00
Nic Barker
a60b977946 [Core] Fix a bug where floating elements would be incorrectly configured
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
2025-02-18 09:41:06 +13:00
Laytan
20340f6544
[Bindings/Odin] add missing bindings, fix binding, improve ergonomics of userdata, conform to stricter style flags (#270)
Co-authored-by: Nic Barker <contact+github@nicbarker.com>
Co-authored-by: Courtney Strachan <courtney.strachan@gmail.com>
2025-02-18 09:16:31 +13:00
Timothy Hoyt
ee99e5f0f2
[Renderers/SDL2] Opengl, antialiasing, vsync, alpha blending (#264)
Some checks are pending
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Waiting to run
2025-02-17 09:15:58 +13:00
Nic Barker
256fc32549 [Documentation] Update README.md to include docs on Clay_GetElementData() 2025-02-17 09:12:11 +13:00
Thomas Anderson
28a8f59733
[Renderers/Raylib] Convert Image usage to Texture (#266) 2025-02-17 08:56:26 +13:00
Timothy Hoyt
47c8e9178e
[Renderers/SDL2] Make SDL_RenderCornerBorder static (#263) 2025-02-17 08:49:05 +13:00
irfan-zahir
a62ee15758
[Renderers/SDL3] Enable sdl3 alpha blending (#261) 2025-02-17 08:48:19 +13:00
Nic Barker
c73dffbb6f
[Github] Create FUNDING.yml
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
2025-02-14 10:17:29 +13:00
Timothy Hoyt
eb553962e8
[Renderers/SDL2] Added rounded corner borders and fixed other issues (#258) 2025-02-14 10:14:11 +13:00
Nic Barker
d9e02ab1d3 [Core] Fix aspect ratio scaling of images when only one sizing axis was specified 2025-02-14 10:05:16 +13:00
tomat
bc2548e3ec
[Renderers/SDL3] Add image rendering and scissor support to SDL3 renderer (#246)
Some checks are pending
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Waiting to run
2025-02-13 10:02:06 +13:00
Julio Ernesto Rodríguez Cabañas
eeb4520f48
[Renderers/SDL3] Use text engine to render text on the SDL3 renderer (#256) 2025-02-13 09:19:36 +13:00
Nic Barker
6d23a35d15 [Examples/clay-official-website] Update compiled wasm for official website example
Some checks are pending
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Waiting to run
2025-02-12 13:09:29 +13:00
Nic Barker
b4933a6e4c [Examples/clay-official-website] Switch default renderer back to HTML for official website example 2025-02-12 13:08:46 +13:00
Nic Barker
9f91450431 [Bindings/Odin] Update odin bindings to include debug tools changes 2025-02-12 13:07:05 +13:00
Nic Barker
e35bba079e [Core] Update debug tools to include text alignment 2025-02-12 13:05:48 +13:00
Nic Barker
d637e2a122 [Documentation] Fix documentation mistake for border configuration 2025-02-12 12:02:57 +13:00
Nic Barker
e6e0cd5a46 [Documentation] Update README with better documentation of Clay_ElementDeclaration 2025-02-12 11:59:50 +13:00
Nic Barker
82ca328ae2 [Core] Add .textAlignment field to text element config
Some checks are pending
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Waiting to run
2025-02-12 10:43:32 +13:00
Nic Barker
72af2a4020 [Compilers] Fix missing initializer warnings under -Wextra 2025-02-12 09:12:11 +13:00
Nic Barker
3961720ef0 [Core & Documentation] Cleanup public / private API and internal document public API via comments
Some checks are pending
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Waiting to run
2025-02-11 17:11:03 +13:00
Nic Barker
dd1f018444 [Documentation] Add inline documentation comments for subfields of Clay_ElementDeclaration 2025-02-11 14:14:55 +13:00
Nic Barker
5a328da308 [Bindings/Odin] Switch error enum to correct size 2025-02-11 10:51:10 +13:00
Harrison Lambeth
3030390038
Define CLAY_IMPLEMENTATION in Jetbrains IDE (#236)
Some checks are pending
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Waiting to run
2025-02-11 10:11:42 +13:00
Nic Barker
92582f66d8 [DebugTools] Fix a bug with display of border widths in debug tools 2025-02-11 10:11:15 +13:00
Nic Barker
65d2122dd6 [Core] Fix a bug where floating containers with anonymous IDs could conflict 2025-02-11 10:09:17 +13:00
FelixBreitweiser
fd76ce62f3
[Core] Check whether the maximum number of elements has been exceeded before rendering the debug view (#255) 2025-02-11 09:35:51 +13:00
Joram Vandemoortele
a5983dee96
Create csharp bindings README (#247)
Some checks are pending
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Waiting to run
2025-02-10 19:09:30 +13:00
Nic Barker
76c8e1f115 [Examples/clay-official-website] Update web renderer example to latest API
Some checks are pending
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Waiting to run
2025-02-10 16:53:21 +13:00
Nic Barker
dcd6feda86 [Bindings/Odin] Add support for Clay_Hovered() to Odin bindings
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
2025-02-08 18:54:15 +13:00
Dan Korostelev
b4102400ff
[Bindings/Odin] Add get/set current context method to Odin bindings (#252) 2025-02-08 18:51:55 +13:00
Nic Barker
5b0e5ea456 [Documentation] Update README to fix quick start example nesting
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
2025-02-07 11:34:10 +13:00
tomat
e7bc3869f7
[Renderers/SDL2] Add rounded rectangle support to sdl2 renderer; feature-completes sdl2 renderer (#245) 2025-02-07 11:26:49 +13:00
Nic Barker
ddc20bc8f6 [Core] Add error for incorrect percentage values, update Odin bindings enum formatting 2025-02-07 10:39:55 +13:00
Nic Barker
0a9122e78d [Bindings/odin] Update odin bindings for debug tooling 2025-02-07 10:24:57 +13:00
Nic Barker
e97031f234 fix mistake in x64 simd comparison 2025-02-07 09:56:05 +13:00