FyroxEngine / Fyrox

3D and 2D game engine written in Rust

Home Page:https://fyrox.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Button not triggering `on_ui_message`

bocksdin opened this issue · comments

commented

Title.

Followed this piece of code, as well as the comment in the Button.rs engine file: https://fyrox-book.github.io/fyrox/ui/button.html

on_ui_message never triggers.

My code: https://github.com/RoryLetteney/crab-clicker/blob/main/game/src/lib.rs

Engine version 0.30.0

Hi! You need to put this block of code https://github.com/RoryLetteney/crab-clicker/blob/main/game/src/lib.rs#L120-L138 into this https://github.com/RoryLetteney/crab-clicker/blob/main/game/src/lib.rs#L194 method. Now you have just a standalone method that is never called, I'm pretty sure that the compiler warns you about this.

commented

Ah, don't know how I didn't see that in the Plugin.
I'll open a PR to fix the Fyrox Book then. Thank you.