Expand description
§egui_drag_value_expr
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));
Structs§
- Drag
Value Expr - A widget that allows the user to edit a f64 value using a drag slider and a text field. The text field allows the user to enter an expression that will be evaluated by a Rhai expression-only Engine instance.