mirror of
https://github.com/nicbarker/clay.git
synced 2026-02-06 12:48:49 +00:00
Added in some missing Clay macros and moved re-used config declarations out of global scope into main for video-example.c3
This commit is contained in:
parent
afe52f946b
commit
c133e07096
2 changed files with 321 additions and 103 deletions
|
|
@ -68,18 +68,6 @@ const Document[*] ALL_DOCUMENTS = {
|
|||
|
||||
uint selectedDocumentIndex = 0;
|
||||
|
||||
RectangleElementConfig contentBackgroundConfig = {
|
||||
{ 90, 90, 90, 255 },
|
||||
clay::@cornerRadiusUniCT(8)
|
||||
};
|
||||
|
||||
Sizing layoutExpand = Sizing{ clay::sizingGrow(), clay::sizingGrow() };
|
||||
|
||||
LayoutConfig sidebarButtonLayout = LayoutConfig{
|
||||
.sizing = { .width = clay::sizingGrow() },
|
||||
.padding = clay::paddingCT(16, 16, 16, 16)
|
||||
};
|
||||
|
||||
bool isDebugModeEnabled = false;
|
||||
|
||||
fn void main() @public
|
||||
|
|
@ -104,6 +92,21 @@ fn void main() @public
|
|||
TextureFilter.BILINEAR
|
||||
);
|
||||
|
||||
// ==============================================
|
||||
// ===== predeclarations of re-used configs =====
|
||||
// ==============================================
|
||||
RectangleElementConfig contentBackgroundConfig = {
|
||||
{ 90, 90, 90, 255 },
|
||||
clay::@cornerRadiusUniCT(8)
|
||||
};
|
||||
|
||||
Sizing layoutExpand = Sizing{ clay::sizingGrow(), clay::sizingGrow() };
|
||||
|
||||
LayoutConfig sidebarButtonLayout = LayoutConfig{
|
||||
.sizing = { .width = clay::sizingGrow() },
|
||||
.padding = clay::paddingCT(16, 16, 16, 16)
|
||||
};
|
||||
|
||||
while (!rl::windowShouldClose()) {
|
||||
clay::setLayoutDimensions({rl::getScreenWidth(), rl::getScreenHeight()});
|
||||
Vector2 mouse_position = rl::getMousePosition();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue