going to just use the ol update and click routine

This commit is contained in:
2019-07-07 02:53:37 -07:00
parent 35b4907d5d
commit cc5b2a346e
2 changed files with 14 additions and 6 deletions

View File

@@ -36,8 +36,8 @@ impl<'s> Button<'s> {
self.text.set_position(position);
}
pub fn set_callback(&mut self, callback: &'s FnMut(i32)){
self.callback = Some(callback);
pub fn is_within(point: Vector2f, button: &Button) -> bool {
button.body.local_bounds().contains(point)
}
}