mirror of
https://github.com/nicbarker/clay.git
synced 2026-02-06 12:48:49 +00:00
[Core] Replace .scroll config with .clip
This commit is contained in:
parent
313964132c
commit
f9ebeced60
2 changed files with 91 additions and 72 deletions
|
|
@ -65,7 +65,7 @@ Clay_RenderCommandArray CreateLayout(void) {
|
|||
CLAY({.id = CLAY_ID("MainContent"),
|
||||
.layout = { .layoutDirection = CLAY_TOP_TO_BOTTOM, .padding = {16, 16, 16, 16}, .childGap = 16, .sizing = { .width = CLAY_SIZING_GROW(0) } },
|
||||
.backgroundColor = {200, 200, 255, 255},
|
||||
.scroll = { .vertical = true },
|
||||
.clip = { .vertical = true, .childOffset = Clay_GetScrollOffset() },
|
||||
})
|
||||
{
|
||||
CLAY({ .id = CLAY_ID("FloatingContainer"),
|
||||
|
|
@ -107,7 +107,7 @@ Clay_RenderCommandArray CreateLayout(void) {
|
|||
}
|
||||
|
||||
CLAY({ .id = CLAY_ID("Blob4Floating2"), .floating = { .attachTo = CLAY_ATTACH_TO_ELEMENT_WITH_ID, .zIndex = 1, .parentId = Clay_GetElementId(CLAY_STRING("SidebarBlob4")).id } }) {
|
||||
CLAY({ .id = CLAY_ID("ScrollContainer"), .layout = { .sizing = { .height = CLAY_SIZING_FIXED(200) }, .childGap = 2 }, .scroll = { .vertical = true } }) {
|
||||
CLAY({ .id = CLAY_ID("ScrollContainer"), .layout = { .sizing = { .height = CLAY_SIZING_FIXED(200) }, .childGap = 2 }, .clip = { .vertical = true, .childOffset = Clay_GetScrollOffset() } }) {
|
||||
CLAY({ .id = CLAY_ID("FloatingContainer2"), .floating = { .attachTo = CLAY_ATTACH_TO_PARENT, .zIndex = 1 } }) {
|
||||
CLAY({ .id = CLAY_ID("FloatingContainerInner"), .layout = { .sizing = { .width = CLAY_SIZING_FIXED(300), .height = CLAY_SIZING_FIXED(300) }, .padding = {16, 16, 16, 16} }, .backgroundColor = {140,80, 200, 200} }) {
|
||||
CLAY_TEXT(CLAY_STRING("I'm an inline floating container."), CLAY_TEXT_CONFIG({ .fontSize = 24, .textColor = {255,255,255,255} }));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue