Skip to content

Commit

Permalink
Add readme for hello_egui and rename crates
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmerlin committed Aug 18, 2023
1 parent 032e17b commit 9071d53
Show file tree
Hide file tree
Showing 26 changed files with 74 additions and 30 deletions.
38 changes: 18 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Hello Egui!
This projects contains a collection of egui tools I've created during
development of the native app for https://hellopaint.io (still unreleased, stay tuned!).

The crates have varying levels of maturity, some are ready for use in production
while others are highly experimental.
If you're interested in using one of the experimental crates, open an issue, and I'll try to
release it on crates.io.

## Example app
An example using most of the crates is available [here](https://lucasmerlin.github.io/egui_dnd/).
Source code in [fancy-example](fancy-example).

## **Mature** Crates
- [egui_dnd](crates/egui_dnd)
- Drag & drop sorting library for egui
- released on [crates.io](https://crates.io/crates/egui_dnd)

## **Experimental** Crates

- [egui_virtual_list](crates/egui_virtual_list)
- Flexible virtual scroll widget for egui with support for dynamic heights and complex layouts
- Compatible with [egui_dnd](crates/egui_dnd) (let me know if you need an example)
- Experimental, unreleased

- [egui_infinite_scroll](crates/egui_infinite_scroll)
- Infinite scroll based on [egui_virtual_list](crates/egui_virtual_list)
- Experimental, unreleased

- [egui_animation](crates/egui_animation)
- Animation utilities for egui
- Experimental, used internally by [egui_dnd](crates/egui_dnd)

- [egui_taffy](crates/egui_taffy)
- Adds flexbox layout to egui using [taffy](https://github.com/DioxusLabs/taffy)
- Highly experimental, unreleased

- [egui_inbox](crates/egui_inbox)
- Simple utility for sending messages to egui uis from other threads / async functions

- [hello_egui_utils](crates/hello_egui_utils)
- Collection of utilities used by the other crates
2 changes: 1 addition & 1 deletion crates/egui_animation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"

[dependencies]
egui = { version = "0.22.0", default-features = false }
egui_goodies_utils = { path = "../egui_goodies_utils" }
hello_egui_utils = { path = "../hello_egui_utils" }
simple-easing = "1"


Expand Down
10 changes: 8 additions & 2 deletions crates/egui_animation/examples/animations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use eframe::egui;
use eframe::emath::Align;
use egui::{CentralPanel, ComboBox, Layout, ScrollArea, Vec2};
use egui_animation::{animate_ui_translation, Collapse};
use egui_goodies_utils::measure_text;
use hello_egui_utils::measure_text;
use rand::seq::SliceRandom;

const EASINGS: [(fn(f32) -> f32, &str); 31] = [
Expand Down Expand Up @@ -61,7 +61,13 @@ pub fn main() -> eframe::Result<()> {
CentralPanel::default().show(ctx, |ui| {
ui.horizontal_wrapped(|ui| {
ComboBox::new("easing", "Select Easing")
.selected_text(EASINGS.iter().find(|(val, _name)| *val == easing).unwrap().1)
.selected_text(
EASINGS
.iter()
.find(|(val, _name)| *val == easing)
.unwrap()
.1,
)
.width(200.0)
.show_ui(ui, |ui| {
EASINGS.iter().for_each(|(easing_fn, name)| {
Expand Down
File renamed without changes.
4 changes: 1 addition & 3 deletions crates/egui-dnd/Cargo.toml → crates/egui_dnd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ web-time = "0.2.0"

[dev-dependencies]
egui_infinite_scroll = { path = "../egui_infinite_scroll" }
egui_goodies_utils = { path = "../egui_goodies_utils" }
egui-taffy = { path = "../egui-taffy" }
hello_egui_utils = { path = "../hello_egui_utils" }

egui_extras = ">=0.22"
color-hex = "0.2.0"
egui = { version = ">=0.22", features = ["color-hex"] }
eframe = ">=0.22"

taffy = "0.3"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use eframe::egui;

use egui::{CentralPanel, Frame, Id, ScrollArea, Ui, Vec2};
use egui_dnd::dnd;
use egui_goodies_utils::measure_text;
use hello_egui_utils::measure_text;

pub fn dnd_ui(ui: &mut Ui, items: &mut [(usize, String)]) {
ui.horizontal_wrapped(|ui| {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "egui-taffy"
name = "egui_taffy"
version = "0.1.0"
edition = "2021"

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "egui_goodies_utils"
name = "hello_egui_utils"
version = "0.1.0"
edition = "2021"

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion fancy-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
publish = false

[dependencies]
egui_dnd = { path = "../crates/egui-dnd" }
egui_dnd = { path = "../crates/egui_dnd" }
egui_infinite_scroll = { path = "../crates/egui_infinite_scroll" }

eframe = "0.22"
Expand Down

0 comments on commit 9071d53

Please sign in to comment.