Kayak UI is a declarative UI that can be used to make user interfaces in Rust primarily targeting games. It's free and open-source!
Kayak UI is a declarative UI that can be used to make user interfaces in Rust primarily targeting games. It's free and open-source!
## WARNING
## WARNING
Kayak UI is in the very early stages of development. Important features are missing and documentation is non-existent. There are a few weird oddities because of how the rsx proc macro works, but these could be fixed in the future. Currently kayak is built to be used inside of bevy and as such the existing renderer is built with that in mind, however Kayak UI is render agnostic and could be rendered using any modern rendering API.
Kayak UI is in the very early stages of development. Important features are missing and documentation is non-existent. Kayak UI is designed to only work with Bevy.
## Features
## Features
- Easy to use declarative syntax using a custom proc macro
- Easy to use declarative syntax using a custom proc macro
...
@@ -23,8 +23,7 @@ Kayak UI is in the very early stages of development. Important features are miss
...
@@ -23,8 +23,7 @@ Kayak UI is in the very early stages of development. Important features are miss
- A few default widgets (check out Kayak's [built-in widgets](./src/widgets)!)
- A few default widgets (check out Kayak's [built-in widgets](./src/widgets)!)
- Style system built to kind of mimic CSS styles.
- Style system built to kind of mimic CSS styles.
- Image and Nine patch rendering.
- Image and Nine patch rendering.
- Vec widgets see vec_widget example!
- Vec widgets see vec example!
- Removal of widgets.
## Bevy Renderer Features
## Bevy Renderer Features
- Image and NinePatch renderer
- Image and NinePatch renderer
...
@@ -35,7 +34,6 @@ Kayak UI is in the very early stages of development. Important features are miss
...
@@ -35,7 +34,6 @@ Kayak UI is in the very early stages of development. Important features are miss
- Dpi Scaling
- Dpi Scaling
## Missing features
## Missing features
- Widget prop diffing see issue: https://github.com/StarArawn/kayak_ui/issues/1
- More default widgets.
- More default widgets.
- More events
- More events
...
@@ -43,109 +41,12 @@ Kayak UI is in the very early stages of development. Important features are miss
...
@@ -43,109 +41,12 @@ Kayak UI is in the very early stages of development. Important features are miss
Kayak UI makes it painless to build out complex UI's using custom or pre-built widgets. Custom widgets are layed out in a XML like syntax that allows you to more easily visualize the widget tree. Here's an example of that syntax:
[Kayak UI Book](./book/src/SUMMARY.md)
```rust
\ No newline at end of file
rsx!{
<App>
<Buttonstyles={Some(play_button_styles)}>
<Text
size={30.0}
content={"Hello World!".to_string()}
/>
</Button>
</App>
}
```
You can easily declare your own custom widgets:
```rust
#[widget]
pubfnMyCustomWidget(props:MyCustomWidgetProps){
letchildren=props.get_children();
rsx!{
<>
{children}
</>
}
}
```
## Widget State
Widget's can create their own state and will re-render when that state changes.
The `bevy_kayak_ui` renderer uses MSDF fonts in order to render crisp and accurate fonts at different scales without needing to re-rasterize the font. In order to generate custom fonts you need to use the following tool:
Where font_name is the name of your font. You can play around with the different parameters that are provided but keep in mind that some of the font stuff is currently hardcoded and might result in graphical glitches if you change the settings too much. You should also try to use a decent size for the `minsize` parameter. The smaller the size the more artifacts will appear in the text.