mirror of
https://github.com/nicbarker/clay.git
synced 2025-04-18 20:28:01 +00:00
odin updates
This commit is contained in:
parent
3191ff0384
commit
04d27a5af9
@ -275,6 +275,7 @@ foreign Clay {
|
||||
BeginLayout :: proc() ---
|
||||
EndLayout :: proc() -> ClayArray(RenderCommand) ---
|
||||
PointerOver :: proc(id: ElementId) -> bool ---
|
||||
GetElementId :: proc(id: String) -> ElementId ---
|
||||
GetScrollContainerData :: proc(id: ElementId) -> ScrollContainerData ---
|
||||
SetMeasureTextFunction :: proc(measureTextFunction: proc "c" (text: ^String, config: ^TextElementConfig) -> Dimensions) ---
|
||||
RenderCommandArray_Get :: proc(array: ^ClayArray(RenderCommand), index: i32) -> ^RenderCommand ---
|
||||
|
@ -436,15 +436,13 @@ createLayout :: proc(lerpValue: f32) -> clay.ClayArray(clay.RenderCommand) {
|
||||
clay.Text("Docs", clay.TextConfig({fontId = FONT_ID_BODY_24, fontSize = 24, textColor = {61, 26, 5, 255}}))
|
||||
}
|
||||
}
|
||||
// githubButtonId: clay.ElementId = clay.ID("HeaderButtonGithub")
|
||||
if clay.UI(clay.ID("LinkGithubOuter"), clay.Layout({}), clay.BorderOutsideRadius({2, COLOR_RED}, 10)) {
|
||||
if clay.UI(
|
||||
// githubButtonId,
|
||||
clay.Layout({padding = {16, 6}}),
|
||||
clay.Rectangle({cornerRadius = clay.CornerRadiusAll(10), color = COLOR_LIGHT}),
|
||||
) {
|
||||
clay.Text("Github", clay.TextConfig({fontId = FONT_ID_BODY_24, fontSize = 24, textColor = {61, 26, 5, 255}}))
|
||||
}
|
||||
if clay.UI(
|
||||
clay.ID("LinkGithubOuter"),
|
||||
clay.Layout({padding = {16, 6}}),
|
||||
clay.BorderOutsideRadius({2, COLOR_RED}, 10),
|
||||
clay.Rectangle({cornerRadius = clay.CornerRadiusAll(10), color = clay.PointerOver(clay.GetElementId(clay.MakeString("LinkGithubOuter"))) ? COLOR_LIGHT_HOVER : COLOR_LIGHT})
|
||||
) {
|
||||
clay.Text("Github", clay.TextConfig({fontId = FONT_ID_BODY_24, fontSize = 24, textColor = {61, 26, 5, 255}}))
|
||||
}
|
||||
}
|
||||
if clay.UI(clay.ID("TopBorder1"), clay.Layout({sizing = {clay.SizingGrow({}), clay.SizingFixed(4)}}), clay.Rectangle({color = COLOR_TOP_BORDER_5})) {}
|
||||
|
Loading…
Reference in New Issue
Block a user