egui_drag_value_expr

Crates.ioegui_drag_value_expr
lib.rsegui_drag_value_expr
version0.1.1
sourcesrc
created_at2024-06-02 02:25:06.627949
updated_at2024-06-02 02:30:41.531682
descriptionAn egui DragValue widget modified to accept a math expression as input.
homepage
repositoryhttps://github.com/cvhammond/egui_drag_value_expr
max_upload_size
id1258978
size110,442
Claire V. Hammond (cvhammond)

documentation

README

egui_drag_value_expr

Crates.io

An egui DragValue widget that accepts expression-based values.

Usage

A rhai::Scope can be passed to the DragValueExpr widget to allow the user to enter expressions that reference variables in the scope.

With a scope:

let mut scope = rhai::Scope::new();
scope.push("ten", 10.);
ui.add(DragValueExpr::new(&mut self.value, Some(&scope)));

Without a scope:

ui.add(DragValueExpr::new(&mut self.value, None));

Contributing

PRs, feature requests, and issues are welcome!

Commit count: 8

cargo fmt