Skip to content

Commit f579690

Browse files
committed
Improve space allocation for GROW containers
1 parent d826187 commit f579690

File tree

10 files changed

+92
-71
lines changed

10 files changed

+92
-71
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ Available options are:
10441044
- `CLAY_TEXT_WRAP_NEWLINES` - will only wrap when encountering newline characters.
10451045
- `CLAY_TEXT_WRAP_NONE` - Text will never wrap even if its container is compressed beyond the text measured width.
10461046
1047-
---
1047+
---****
10481048
10491049
**Example Usage**
10501050
```C

bindings/odin/build-clay-lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cp ../../clay.h clay.c;
22
# Intel Mac
33
clang -c -DCLAY_IMPLEMENTATION -o clay.o -static -target x86_64-apple-darwin clay.c -fPIC && ar r clay-odin/macos/clay.a clay.o;
44
# ARM Mac
5-
clang -c -DCLAY_IMPLEMENTATION -o clay.o -static clay.c -fPIC && ar r clay-odin/macos-arm64/clay.a clay.o;
5+
clang -c -DCLAY_IMPLEMENTATION -DCLAY_DEBUG -o clay.o -static clay.c && ar r clay-odin/macos-arm64/clay.a clay.o;
66
# x64 Windows
77
clang -c -DCLAY_IMPLEMENTATION -o clay-odin/windows/clay.lib -target x86_64-pc-windows-msvc -fuse-ld=llvm-lib -static clay.c;
88
# Linux
1.77 KB
Binary file not shown.
1.34 KB
Binary file not shown.
1.35 KB
Binary file not shown.
3.24 KB
Binary file not shown.
1.61 KB
Binary file not shown.

clay.h

Lines changed: 86 additions & 65 deletions
Large diffs are not rendered by default.

examples/raylib-sidebar-scrolling-container/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ FetchContent_MakeAvailable(raylib)
2020

2121
add_executable(clay_examples_raylib_sidebar_scrolling_container main.c multi-compilation-unit.c)
2222

23-
target_compile_options(clay_examples_raylib_sidebar_scrolling_container PUBLIC -Wall -Werror -Wno-unknown-pragmas)
23+
target_compile_options(clay_examples_raylib_sidebar_scrolling_container PUBLIC -DCLAY_DEBUG -Wall -Werror -Wno-unknown-pragmas)
2424
target_include_directories(clay_examples_raylib_sidebar_scrolling_container PUBLIC .)
2525

2626
target_link_libraries(clay_examples_raylib_sidebar_scrolling_container PUBLIC raylib)

examples/raylib-sidebar-scrolling-container/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ Clay_RenderCommandArray CreateLayout() {
103103
}
104104
}
105105
CLAY_RECTANGLE(CLAY_ID("ScrollContainerInner"), CLAY_LAYOUT(.layoutDirection = CLAY_TOP_TO_BOTTOM), CLAY_RECTANGLE_CONFIG(.color = {160, 160, 160, 255})) {
106-
// for (int i = 0; i < 100; i++) {
107-
// RenderDropdownTextItem(i);
108-
// }
106+
for (int i = 0; i < 10; i++) {
107+
RenderDropdownTextItem(i);
108+
}
109109
}
110110
}
111111
}

0 commit comments

Comments
 (0)