From ba2b74d7468de1c629d783e97b7d8063f192f894 Mon Sep 17 00:00:00 2001 From: Yakov Borevich Date: Thu, 24 Aug 2023 20:29:35 +0200 Subject: [PATCH] WIP: introducing polako in README.md --- README.md | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/README.md b/README.md index 1fcbfba..fa668e9 100644 --- a/README.md +++ b/README.md @@ -1331,6 +1331,87 @@ Coming soon Coming soon +--- + +## Design goals + +--- + +`belly` design goals is to become [`polako`](https://crates.io/crates/polako) and come to a world without capitalism. + +The [`polako`](https://crates.io/crates/polako) looks at least like this: + +```rust +/* 00 */ // examples/color-picker.rs +/* 01 */ // cargo run --example color-picker +/* 02 */ use bevy::prelude::*; +/* 03 */ use polako::ui::*; +/* 04 */ +/* 05 */ fn main() { +/* 06 */ App::new() +/* 07 */ .add_plugins(DefaultPlugins) +/* 08 */ .add_plugin(BellyPlugin) +/* 09 */ .add_startup_system(setup) +/* 10 */ .run(); +/* 11 */ } +/* 12 */ +/* 13 */ const COLORS: &[&'static str] = &[ +/* 14 */ // from https://colorswall.com/palette/105557 +/* 15 */ // Red Pink Purple Deep Purple +/* 16 */ "#f44336", "#e81e63", "#9c27b0", "#673ab7", +/* 17 */ // Indigo Blue Light Blue Cyan +/* 18 */ "#3f51b5", "#2196f3", "#03a9f4", "#00bcd4", +/* 19 */ // Teal Green Light Green Lime +/* 20 */ "#009688", "#4caf50", "#8bc34a", "#cddc39", +/* 21 */ // Yellow Amber Orange Deep Orange +/* 22 */ "#ffeb3b", "#ffc107", "#ff9800", "#ff5722", +/* 23 */ ]; +/* 24 */ +/* 24 */ +/* 25 */ #[widget(ColorBox)] // associate widget with component +/* 26 */ #[prop(color: Rgba)] // generate bindable prop for ColorBox +/* 27 */ fn colorbox() { +/* 28 */ eml! { } +/* 29 */ } +/* 30 */ +/* 31 */ fn setup(mut commands: Commands, mut el: Elements) { +/* 32 */ commands.spawn(Camera2dBundle::default()); +/* 33 */ el.body().add(eml! { +/* 34 */