optozorax / egui-macroquad

egui bindings for macroquad
https://optozorax.github.io/egui-macroquad/
Apache License 2.0
89 stars 72 forks source link

Compiler error when building demo examples #22

Closed EvoTeamDevelop closed 1 year ago

EvoTeamDevelop commented 2 years ago

Hi guys! Tried to build demo example using on MacOs 12.4, but it fails with 3 errors:

error[E0277]: expected a FnOnce<(&egui::Context,)> closure, found F --> src/lib.rs:81:37 81 self.0.run(gl.quad_context, f); --- ^ expected an FnOnce<(&egui::Context,)> closure, found F
required by a bound introduced by this call
= note: expected a closure taking 2 arguments, but one taking 1 argument was given

note: required by a bound in EguiMq::run --> /Users/*/.cargo/registry/src/github.com-1ecc6299db9ec823/egui-miniquad-0.11.0/src/lib.rs:145:66 | 145 | pub fn run(&mut self, mq_ctx: &mut mq::Context, run_ui: impl FnOnce(&egui::Context)) { | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in EguiMq::run

error[E0061]: this function takes 3 arguments but 2 arguments were supplied --> src/lib.rs:113:16 113 self.0.mouse_motion_event(x, y); ^^^^^^^^^^^^^^^^^^ - - supplied 2 arguments
expected 3 arguments

note: associated function defined here --> /Users/*/.cargo/registry/src/github.com-1ecc6299db9ec823/egui-miniquad-0.11.0/src/lib.rs:204:12 | 204 | pub fn mouse_motion_event(&mut self, ctx: &mut mq::Context, x: f32, y: f32) { | ^^^^^^^^^^^^^^^^^^

error[E0061]: this function takes 3 arguments but 2 arguments were supplied --> src/lib.rs:117:16 117 self.0.mouse_wheel_event(dx, dy); ^^^^^^^^^^^^^^^^^ -- -- supplied 2 arguments
expected 3 arguments

note: associated function defined here --> /Users/*/.cargo/registry/src/github.com-1ecc6299db9ec823/egui-miniquad-0.11.0/src/lib.rs:210:12 | 210 | pub fn mouse_wheel_event(&mut self, _ctx: &mut mq::Context, dx: f32, dy: f32) { | ^^^^^^^^^^^^^^^^^

Some errors have detailed explanations: E0061, E0277. For more information about an error, try rustc --explain E0061. error: could not compile egui-macroquad due to 3 previous errors

optozorax commented 2 years ago

Hi, it seems like you trying to use egui v0.19 with the latest released egui-macroquad. Please wait for the new version of egui-macroquad, currently it's blocked by https://github.com/not-fl3/macroquad/issues/475.

EvoTeamDevelop commented 2 years ago

thanks for such a quick reply, great to hear that there will be a 0.19 support. Quickly rechecked, I just cloned the repo with 0.18 egui usage

optozorax commented 1 year ago

Hi, sorry for the suspend, life is hard these days. New version is published.