mirror of
https://github.com/nicbarker/clay.git
synced 2025-04-20 05:08:04 +00:00
More progress on odin bindings
This commit is contained in:
parent
91ff9d9d86
commit
e640ab3bc9
@ -1 +1,4 @@
|
|||||||
cp ../../clay.h clay.c; clang -c -o clay.o -static clay.c -fPIC; rm clay.c
|
cp ../../clay.h clay.c;
|
||||||
|
clang -c -o clay.o -static clay.c -fPIC && ar r clay-odin/clay.a clay.o;
|
||||||
|
rm clay.o;
|
||||||
|
rm clay.c;
|
Binary file not shown.
@ -1,7 +1,6 @@
|
|||||||
package clay
|
package clay
|
||||||
|
|
||||||
import "core:c"
|
import "core:c"
|
||||||
import "core:fmt"
|
|
||||||
foreign import Clay "clay.a"
|
foreign import Clay "clay.a"
|
||||||
|
|
||||||
String :: struct {
|
String :: struct {
|
||||||
@ -125,11 +124,11 @@ FloatingElementConfig :: struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ElementConfigUnion :: struct #raw_union {
|
ElementConfigUnion :: struct #raw_union {
|
||||||
rectangleElementConfig: ^ImageElementConfig,
|
rectangleElementConfig: ^RectangleElementConfig,
|
||||||
textElementConfig: ^TextElementConfig,
|
textElementConfig: ^TextElementConfig,
|
||||||
imageElementConfig: ^ImageElementConfig,
|
imageElementConfig: ^ImageElementConfig,
|
||||||
customElementConfig: ^CustomElementConfig,
|
customElementConfig: ^CustomElementConfig,
|
||||||
borderContainerElementConfig: ^BorderElementConfig,
|
borderElementConfig: ^BorderElementConfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderCommand :: struct {
|
RenderCommand :: struct {
|
||||||
@ -140,12 +139,6 @@ RenderCommand :: struct {
|
|||||||
commandType: RenderCommandType,
|
commandType: RenderCommandType,
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderCommandArray :: struct {
|
|
||||||
capacity: c.uint32_t,
|
|
||||||
length: c.uint32_t,
|
|
||||||
internalArray: [^]RenderCommand,
|
|
||||||
}
|
|
||||||
|
|
||||||
ScrollContainerData :: struct {
|
ScrollContainerData :: struct {
|
||||||
// Note: This is a pointer to the real internal scroll position, mutating it may cause a change in final layout.
|
// Note: This is a pointer to the real internal scroll position, mutating it may cause a change in final layout.
|
||||||
// Intended for use with external functionality that modifies scroll position, such as scroll bars or auto scrolling.
|
// Intended for use with external functionality that modifies scroll position, such as scroll bars or auto scrolling.
|
||||||
@ -210,6 +203,12 @@ LayoutConfig :: struct {
|
|||||||
childAlignment: ChildAlignment,
|
childAlignment: ChildAlignment,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ClayArray :: struct($type: typeid) {
|
||||||
|
capacity: c.uint32_t,
|
||||||
|
length: c.uint32_t,
|
||||||
|
internalArray: [^]type,
|
||||||
|
}
|
||||||
|
|
||||||
foreign Clay {
|
foreign Clay {
|
||||||
Clay_MinMemorySize :: proc() -> c.uint32_t ---
|
Clay_MinMemorySize :: proc() -> c.uint32_t ---
|
||||||
Clay_CreateArenaWithCapacityAndMemory :: proc(capacity: c.uint32_t, offset: [^]u8) -> Arena ---
|
Clay_CreateArenaWithCapacityAndMemory :: proc(capacity: c.uint32_t, offset: [^]u8) -> Arena ---
|
||||||
@ -217,20 +216,37 @@ foreign Clay {
|
|||||||
Clay_Initialize :: proc(arena: Arena) ---
|
Clay_Initialize :: proc(arena: Arena) ---
|
||||||
Clay_UpdateScrollContainers :: proc(isPointerActive: c.bool, scrollDelta: Vector2, deltaTime: c.float) ---
|
Clay_UpdateScrollContainers :: proc(isPointerActive: c.bool, scrollDelta: Vector2, deltaTime: c.float) ---
|
||||||
Clay_BeginLayout :: proc(screenWidth: c.int, screenHeight: c.int) ---
|
Clay_BeginLayout :: proc(screenWidth: c.int, screenHeight: c.int) ---
|
||||||
Clay_EndLayout :: proc(screenWidth: c.int, screenHeight: c.int) -> RenderCommandArray ---
|
Clay_EndLayout :: proc(screenWidth: c.int, screenHeight: c.int) -> ClayArray(RenderCommand) ---
|
||||||
Clay_PointerOver :: proc(id: c.uint32_t) -> c.bool ---
|
Clay_PointerOver :: proc(id: c.uint32_t) -> c.bool ---
|
||||||
Clay_GetScrollContainerData :: proc(id: c.uint32_t) -> ScrollContainerData ---
|
Clay_GetScrollContainerData :: proc(id: c.uint32_t) -> ScrollContainerData ---
|
||||||
|
Clay_SetMeasureTextFunction :: proc(measureTextFunction: proc(text: [^]String, config: [^]TextElementConfig) -> Dimensions) ---
|
||||||
Clay__OpenContainerElement :: proc(id: c.uint32_t, layoutConfig: ^LayoutConfig) ---
|
Clay__OpenContainerElement :: proc(id: c.uint32_t, layoutConfig: ^LayoutConfig) ---
|
||||||
Clay__OpenRectangleElement :: proc(id: c.uint32_t, layoutConfig: ^LayoutConfig, rectangleConfig: ^RectangleElementConfig) ---
|
Clay__OpenRectangleElement :: proc(id: c.uint32_t, layoutConfig: ^LayoutConfig, rectangleConfig: ^RectangleElementConfig) ---
|
||||||
Clay__OpenTextElement :: proc(id: c.uint32_t, text: String, textConfig: ^TextElementConfig) ---
|
Clay__OpenTextElement :: proc(id: c.uint32_t, text: String, textConfig: ^TextElementConfig) ---
|
||||||
Clay__OpenImageContainerElement :: proc(id: c.uint32_t, layoutConfig: ^LayoutConfig, imageConfig: ^ImageElementConfig) ---
|
Clay__OpenImageElement :: proc(id: c.uint32_t, layoutConfig: ^LayoutConfig, imageConfig: ^ImageElementConfig) ---
|
||||||
Clay__OpenScrollContainerElement :: proc(id: c.uint32_t, layoutConfig: ^LayoutConfig, imageConfig: ^ScrollElementConfig) ---
|
Clay__OpenScrollElement :: proc(id: c.uint32_t, layoutConfig: ^LayoutConfig, imageConfig: ^ScrollElementConfig) ---
|
||||||
Clay__OpenFloatingContainerElement :: proc(id: c.uint32_t, layoutConfig: ^LayoutConfig, imageConfig: ^FloatingElementConfig) ---
|
Clay__OpenFloatingElement :: proc(id: c.uint32_t, layoutConfig: ^LayoutConfig, imageConfig: ^FloatingElementConfig) ---
|
||||||
Clay__OpenBorderContainerElement :: proc(id: c.uint32_t, layoutConfig: ^LayoutConfig, imageConfig: ^BorderElementConfig) ---
|
Clay__OpenBorderElement :: proc(id: c.uint32_t, layoutConfig: ^LayoutConfig, imageConfig: ^BorderElementConfig) ---
|
||||||
Clay__OpenCustomElement :: proc(id: c.uint32_t, layoutConfig: ^LayoutConfig, imageConfig: ^CustomElementConfig) ---
|
Clay__OpenCustomElement :: proc(id: c.uint32_t, layoutConfig: ^LayoutConfig, imageConfig: ^CustomElementConfig) ---
|
||||||
Clay__CloseContainerElement :: proc() ---
|
Clay__CloseElementWithChildren :: proc() ---
|
||||||
Clay__CloseScrollContainerElement :: proc() ---
|
Clay__CloseScrollElement :: proc() ---
|
||||||
Clay__CloseFloatingContainerElement :: proc() ---
|
Clay__CloseFloatingElement :: proc() ---
|
||||||
|
Clay__layoutConfigs: ClayArray(LayoutConfig)
|
||||||
|
Clay__LayoutConfigArray_Add :: proc(array: ^ClayArray(LayoutConfig), config: LayoutConfig) -> ^LayoutConfig ---
|
||||||
|
Clay__rectangleElementConfigs: ClayArray(RectangleElementConfig)
|
||||||
|
Clay__RectangleElementConfigArray_Add :: proc(array: ^ClayArray(RectangleElementConfig), config: RectangleElementConfig) -> ^RectangleElementConfig ---
|
||||||
|
Clay__textElementConfigs: ClayArray(TextElementConfig)
|
||||||
|
Clay__TextElementConfigArray_Add :: proc(array: ^ClayArray(TextElementConfig), config: TextElementConfig) -> ^TextElementConfig ---
|
||||||
|
Clay__imageElementConfigs: ClayArray(ImageElementConfig)
|
||||||
|
Clay__ImageElementConfigArray_Add :: proc(array: ^ClayArray(ImageElementConfig), config: ImageElementConfig) -> ^ImageElementConfig ---
|
||||||
|
Clay__floatingElementConfigs: ClayArray(FloatingElementConfig)
|
||||||
|
Clay__FloatingElementConfigArray_Add :: proc(array: ^ClayArray(FloatingElementConfig), config: FloatingElementConfig) -> ^FloatingElementConfig ---
|
||||||
|
Clay__customElementConfigs: ClayArray(CustomElementConfig)
|
||||||
|
Clay__CustomElementConfigArray_Add :: proc(array: ^ClayArray(CustomElementConfig), config: CustomElementConfig) -> ^CustomElementConfig ---
|
||||||
|
Clay__scrollElementConfigs: ClayArray(ScrollElementConfig)
|
||||||
|
Clay__ScrollElementConfigArray_Add :: proc(array: ^ClayArray(ScrollElementConfig), config: ScrollElementConfig) -> ^ScrollElementConfig ---
|
||||||
|
Clay__borderElementConfigs: ClayArray(BorderElementConfig)
|
||||||
|
Clay__BorderElementConfigArray_Add :: proc(array: ^ClayArray(BorderElementConfig), config: BorderElementConfig) -> ^BorderElementConfig ---
|
||||||
}
|
}
|
||||||
|
|
||||||
MinMemorySize :: proc() -> c.uint32_t {
|
MinMemorySize :: proc() -> c.uint32_t {
|
||||||
@ -257,7 +273,7 @@ BeginLayout :: proc(screenWidth: c.int, screenHeight: c.int) {
|
|||||||
Clay_BeginLayout(screenWidth, screenHeight)
|
Clay_BeginLayout(screenWidth, screenHeight)
|
||||||
}
|
}
|
||||||
|
|
||||||
EndLayout :: proc(screenWidth: c.int, screenHeight: c.int) -> RenderCommandArray {
|
EndLayout :: proc(screenWidth: c.int, screenHeight: c.int) -> ClayArray(RenderCommand) {
|
||||||
return Clay_EndLayout(screenWidth, screenHeight)
|
return Clay_EndLayout(screenWidth, screenHeight)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,13 +285,13 @@ GetScrollContainerData :: proc(id: c.uint32_t) -> ScrollContainerData {
|
|||||||
return Clay_GetScrollContainerData(id)
|
return Clay_GetScrollContainerData(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
@(deferred_none = Clay__CloseContainerElement)
|
@(deferred_none = Clay__CloseElementWithChildren)
|
||||||
Container :: proc(id: c.uint32_t, layoutConfig: ^LayoutConfig) -> bool {
|
Container :: proc(id: c.uint32_t, layoutConfig: ^LayoutConfig) -> bool {
|
||||||
Clay__OpenContainerElement(id, layoutConfig)
|
Clay__OpenContainerElement(id, layoutConfig)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@(deferred_none = Clay__CloseContainerElement)
|
@(deferred_none = Clay__CloseElementWithChildren)
|
||||||
Rectangle :: proc(
|
Rectangle :: proc(
|
||||||
id: c.uint32_t,
|
id: c.uint32_t,
|
||||||
layoutConfig: ^LayoutConfig,
|
layoutConfig: ^LayoutConfig,
|
||||||
@ -290,47 +306,47 @@ Text :: proc(id: c.uint32_t, text: String, textConfig: ^TextElementConfig) -> bo
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@(deferred_none = Clay__CloseContainerElement)
|
@(deferred_none = Clay__CloseElementWithChildren)
|
||||||
Image :: proc(
|
Image :: proc(
|
||||||
id: c.uint32_t,
|
id: c.uint32_t,
|
||||||
layoutConfig: ^LayoutConfig,
|
layoutConfig: ^LayoutConfig,
|
||||||
imageConfig: ^ImageElementConfig,
|
imageConfig: ^ImageElementConfig,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
Clay__OpenImageContainerElement(id, layoutConfig, imageConfig)
|
Clay__OpenImageElement(id, layoutConfig, imageConfig)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@(deferred_none = Clay__CloseContainerElement)
|
@(deferred_none = Clay__CloseScrollElement)
|
||||||
Scroll :: proc(
|
Scroll :: proc(
|
||||||
id: c.uint32_t,
|
id: c.uint32_t,
|
||||||
layoutConfig: ^LayoutConfig,
|
layoutConfig: ^LayoutConfig,
|
||||||
scrollConfig: ^ScrollElementConfig,
|
scrollConfig: ^ScrollElementConfig,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
Clay__OpenScrollContainerElement(id, layoutConfig, scrollConfig)
|
Clay__OpenScrollElement(id, layoutConfig, scrollConfig)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@(deferred_none = Clay__CloseFloatingContainerElement)
|
@(deferred_none = Clay__CloseFloatingElement)
|
||||||
Floating :: proc(
|
Floating :: proc(
|
||||||
id: c.uint32_t,
|
id: c.uint32_t,
|
||||||
layoutConfig: ^LayoutConfig,
|
layoutConfig: ^LayoutConfig,
|
||||||
floatingConfig: ^FloatingElementConfig,
|
floatingConfig: ^FloatingElementConfig,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
Clay__OpenFloatingContainerElement(id, layoutConfig, floatingConfig)
|
Clay__OpenFloatingElement(id, layoutConfig, floatingConfig)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@(deferred_none = Clay__CloseContainerElement)
|
@(deferred_none = Clay__CloseElementWithChildren)
|
||||||
Border :: proc(
|
Border :: proc(
|
||||||
id: c.uint32_t,
|
id: c.uint32_t,
|
||||||
layoutConfig: ^LayoutConfig,
|
layoutConfig: ^LayoutConfig,
|
||||||
borderConfig: ^BorderElementConfig,
|
borderConfig: ^BorderElementConfig,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
Clay__OpenBorderContainerElement(id, layoutConfig, borderConfig)
|
Clay__OpenBorderElement(id, layoutConfig, borderConfig)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@(deferred_none = Clay__CloseContainerElement)
|
@(deferred_none = Clay__CloseElementWithChildren)
|
||||||
Custom :: proc(
|
Custom :: proc(
|
||||||
id: c.uint32_t,
|
id: c.uint32_t,
|
||||||
layoutConfig: ^LayoutConfig,
|
layoutConfig: ^LayoutConfig,
|
||||||
@ -339,3 +355,71 @@ Custom :: proc(
|
|||||||
Clay__OpenCustomElement(id, layoutConfig, customConfig)
|
Clay__OpenCustomElement(id, layoutConfig, customConfig)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Layout :: proc(config: LayoutConfig) -> ^LayoutConfig {
|
||||||
|
return Clay__LayoutConfigArray_Add(&Clay__layoutConfigs, config)
|
||||||
|
}
|
||||||
|
|
||||||
|
RectangleConfig :: proc(config: RectangleElementConfig) -> ^RectangleElementConfig {
|
||||||
|
return Clay__RectangleElementConfigArray_Add(&Clay__rectangleElementConfigs, config)
|
||||||
|
}
|
||||||
|
|
||||||
|
TextConfig :: proc(config: TextElementConfig) -> ^TextElementConfig {
|
||||||
|
return Clay__TextElementConfigArray_Add(&Clay__textElementConfigs, config)
|
||||||
|
}
|
||||||
|
|
||||||
|
ImageConfig :: proc(config: ImageElementConfig) -> ^ImageElementConfig {
|
||||||
|
return Clay__ImageElementConfigArray_Add(&Clay__imageElementConfigs, config)
|
||||||
|
}
|
||||||
|
|
||||||
|
FloatingConfig :: proc(config: FloatingElementConfig) -> ^FloatingElementConfig {
|
||||||
|
return Clay__FloatingElementConfigArray_Add(&Clay__floatingElementConfigs, config)
|
||||||
|
}
|
||||||
|
|
||||||
|
Custom_elementConfig :: proc(config: CustomElementConfig) -> ^CustomElementConfig {
|
||||||
|
return Clay__CustomElementConfigArray_Add(&Clay__customElementConfigs, config)
|
||||||
|
}
|
||||||
|
|
||||||
|
ScrollConfig :: proc(config: ScrollElementConfig) -> ^ScrollElementConfig {
|
||||||
|
return Clay__ScrollElementConfigArray_Add(&Clay__scrollElementConfigs, config)
|
||||||
|
}
|
||||||
|
|
||||||
|
BorderConfig :: proc(config: BorderElementConfig) -> ^BorderElementConfig {
|
||||||
|
return Clay__BorderElementConfigArray_Add(&Clay__borderElementConfigs, config)
|
||||||
|
}
|
||||||
|
|
||||||
|
BorderConfigOutside :: proc(outsideBorders: BorderData) -> ^BorderElementConfig {
|
||||||
|
return Clay__BorderElementConfigArray_Add(
|
||||||
|
&Clay__borderElementConfigs,
|
||||||
|
(BorderElementConfig) {
|
||||||
|
left = outsideBorders,
|
||||||
|
right = outsideBorders,
|
||||||
|
top = outsideBorders,
|
||||||
|
bottom = outsideBorders,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// BorderConfig_outside_radius :: proc(width, color, radius) Clay_BorderElementConfigArray_Add(&Clay__borderElementConfigs, (Clay_BorderElementConfig ) { .left = { width, color }, .right = { width, color }, .top = { width, color }, .bottom = { width, color }, .cornerRadius = { radius, radius, radius, radius } })) -> CLAY_BORDER_CONFIG_OUTSIDE_RADIUS
|
||||||
|
|
||||||
|
// BorderConfig_all :: proc(...) Clay_BorderElementConfigArray_Add(&Clay__borderElementConfigs, (Clay_BorderElementConfig ) { .left = { __VA_ARGS__ }, .right = { __VA_ARGS__ }, .top = { __VA_ARGS__ }, .bottom = { __VA_ARGS__ }, .betweenChildren = { __VA_ARGS__ } })) -> CLAY_BORDER_CONFIG_ALL
|
||||||
|
|
||||||
|
// BorderConfig_all_radius :: proc(width, color, radius) Clay_BorderElementConfigArray_Add(&Clay__borderElementConfigs, (Clay_BorderElementConfig ) { .left = { __VA_ARGS__ }, .right = { __VA_ARGS__ }, .top = { __VA_ARGS__ }, .bottom = { __VA_ARGS__ }, .betweenChildren = { __VA_ARGS__ }, .cornerRadius = { radius, radius, radius, radius }})) -> CLAY_BORDER_CONFIG_ALL_RADIUS
|
||||||
|
|
||||||
|
// Corner_radius :: proc(radius) (Clay_CornerRadius) { radius, radius, radius, radius }) -> CLAY_CORNER_RADIUS
|
||||||
|
|
||||||
|
// Sizing_fit :: proc(...) (Clay_SizingAxis) { .type = CLAY__SIZING_TYPE_FIT, .sizeMinMax = (Clay_SizingMinMax) {__VA_ARGS__} }) -> CLAY_SIZING_FIT
|
||||||
|
|
||||||
|
// Sizing_grow :: proc(...) (Clay_SizingAxis) { .type = CLAY__SIZING_TYPE_GROW, .sizeMinMax = (Clay_SizingMinMax) {__VA_ARGS__} }) -> CLAY_SIZING_GROW
|
||||||
|
|
||||||
|
// Sizing_fixed :: proc(fixedSize) (Clay_SizingAxis) { .type = CLAY__SIZING_TYPE_GROW, .sizeMinMax = { fixedSize, fixedSize } }) -> CLAY_SIZING_FIXED
|
||||||
|
|
||||||
|
// Sizing_percent :: proc(percentOfParent) (Clay_SizingAxis) { .type = CLAY__SIZING_TYPE_PERCENT, .sizePercent = percentOfParent }) -> CLAY_SIZING_PERCENT
|
||||||
|
|
||||||
|
// Id :: proc(label) Clay__HashString(CLAY_STRING(label), 0)) -> CLAY_ID
|
||||||
|
|
||||||
|
// Idi :: proc(label, index) Clay__HashString(CLAY_STRING(label), index)) -> CLAY_IDI
|
||||||
|
|
||||||
|
// _string_length :: proc(s) ((sizeof(s) / sizeof(s[0])) - sizeof(s[0]))) -> CLAY__STRING_LENGTH
|
||||||
|
|
||||||
|
// String :: proc(string) (Clay_String) { .length = CLAY__STRING_LENGTH(string), .chars = string }) -> CLAY_STRING
|
||||||
|
@ -4,6 +4,10 @@ import clay "clay-odin"
|
|||||||
import "core:c"
|
import "core:c"
|
||||||
import "core:fmt"
|
import "core:fmt"
|
||||||
|
|
||||||
|
measureText :: proc(text: [^]clay.String, config: [^]clay.TextElementConfig) -> clay.Dimensions {
|
||||||
|
return clay.Dimensions{20, 20}
|
||||||
|
}
|
||||||
|
|
||||||
main :: proc() {
|
main :: proc() {
|
||||||
minMemorySize: c.uint32_t = clay.MinMemorySize()
|
minMemorySize: c.uint32_t = clay.MinMemorySize()
|
||||||
memory := make([^]u8, minMemorySize)
|
memory := make([^]u8, minMemorySize)
|
||||||
@ -14,15 +18,28 @@ main :: proc() {
|
|||||||
sizing = {width = {type = clay.SizingType.GROW}, height = {type = clay.SizingType.GROW}},
|
sizing = {width = {type = clay.SizingType.GROW}, height = {type = clay.SizingType.GROW}},
|
||||||
padding = {16, 16},
|
padding = {16, 16},
|
||||||
}
|
}
|
||||||
rectangleConfig: clay.ImageElementConfig = clay.ImageElementConfig {
|
rectangleConfig: clay.RectangleElementConfig = clay.RectangleElementConfig {
|
||||||
cornerRadius = {topLeft = 5},
|
cornerRadius = {topLeft = 5},
|
||||||
}
|
}
|
||||||
|
|
||||||
if clay.Rectangle(1, &layoutConfig, &rectangleConfig) {
|
if clay.Rectangle(
|
||||||
|
1,
|
||||||
|
clay.Layout(
|
||||||
|
{
|
||||||
|
sizing = {
|
||||||
|
width = {type = clay.SizingType.GROW},
|
||||||
|
height = {type = clay.SizingType.GROW},
|
||||||
|
},
|
||||||
|
padding = {16, 16},
|
||||||
|
},
|
||||||
|
),
|
||||||
|
clay.RectangleConfig({cornerRadius = {topLeft = 5}}),
|
||||||
|
) {
|
||||||
if clay.Rectangle(1, &layoutConfig, &rectangleConfig) {
|
if clay.Rectangle(1, &layoutConfig, &rectangleConfig) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
renderCommands: clay.RenderCommandArray = clay.EndLayout(1024, 768)
|
renderCommands: clay.ClayArray(clay.RenderCommand) = clay.EndLayout(1024, 768)
|
||||||
|
x: int = 5
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user