1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 06:40:06 -04:00

Avoid deadlocks by using lambdas for context lock (#2625)

ctx.input().key_pressed(Key::A) -> ctx.input(|i| i.key_pressed(Key::A))
This commit is contained in:
Emil Ernerfeldt
2023-01-25 10:24:23 +01:00
committed by GitHub
parent eee4cf6a82
commit 8ce0e1c520
77 changed files with 1445 additions and 1123 deletions

View File

@@ -30,7 +30,7 @@ impl super::View for DancingStrings {
Frame::canvas(ui.style()).show(ui, |ui| {
ui.ctx().request_repaint();
let time = ui.input().time;
let time = ui.input(|i| i.time);
let desired_size = ui.available_width() * vec2(1.0, 0.35);
let (_id, rect) = ui.allocate_space(desired_size);