mirror of
https://github.com/nicbarker/clay.git
synced 2025-01-24 02:16:03 +00:00
Update README.md
This commit is contained in:
parent
33a76238de
commit
61b67ca967
@ -2,16 +2,16 @@
|
|||||||
|
|
||||||
This directory contains bindings for the [Odin](odin-lang.org) programming language, as well as an example implementation of the [clay website](https://nicbarker.com/clay) in Odin.
|
This directory contains bindings for the [Odin](odin-lang.org) programming language, as well as an example implementation of the [clay website](https://nicbarker.com/clay) in Odin.
|
||||||
|
|
||||||
If you haven't taken a look at the [full documentation for clay](https://github.com/nicbarker/clay/blob/main/README.md), it's recommended that you take a look there first to familiarise yourself with the general concepts. This README is abbreviated and applies to using clay in Odin specifically.
|
|
||||||
|
|
||||||
The **most notable difference** between the C API and the Odin bindings is the use of if statements to create the scope for declaring child elements. When using the equivalent of the [Element Macros](https://github.com/nicbarker/clay/blob/main/README.md#element-macros):
|
|
||||||
|
|
||||||
Special thanks to
|
Special thanks to
|
||||||
|
|
||||||
- [laytan](https://github.com/laytan)
|
- [laytan](https://github.com/laytan)
|
||||||
- [Dudejoe870](https://github.com/Dudejoe870)
|
- [Dudejoe870](https://github.com/Dudejoe870)
|
||||||
- MrStevns from the Odin Discord server
|
- MrStevns from the Odin Discord server
|
||||||
|
|
||||||
|
If you haven't taken a look at the [full documentation for clay](https://github.com/nicbarker/clay/blob/main/README.md), it's recommended that you take a look there first to familiarise yourself with the general concepts. This README is abbreviated and applies to using clay in Odin specifically.
|
||||||
|
|
||||||
|
The **most notable difference** between the C API and the Odin bindings is the use of if statements to create the scope for declaring child elements. When using the equivalent of the [Element Macros](https://github.com/nicbarker/clay/blob/main/README.md#element-macros):
|
||||||
|
|
||||||
```C
|
```C
|
||||||
// C form of element macros
|
// C form of element macros
|
||||||
CLAY_RECTANGLE(CLAY_ID("SideBar"), CLAY_LAYOUT(.layoutDirection = CLAY_TOP_TO_BOTTOM, .sizing = { .width = CLAY_SIZING_FIXED(300), .height = CLAY_SIZING_GROW() }, .padding = {16, 16}), CLAY_RECTANGLE_CONFIG(.color = COLOR_LIGHT), {
|
CLAY_RECTANGLE(CLAY_ID("SideBar"), CLAY_LAYOUT(.layoutDirection = CLAY_TOP_TO_BOTTOM, .sizing = { .width = CLAY_SIZING_FIXED(300), .height = CLAY_SIZING_GROW() }, .padding = {16, 16}), CLAY_RECTANGLE_CONFIG(.color = COLOR_LIGHT), {
|
||||||
|
Loading…
Reference in New Issue
Block a user