events are coming in. But my dual box thingy is not gonna be the way to go here. I guess it copied the data and they no longer link. Bummer
This commit is contained in:
@@ -4,6 +4,7 @@ use crate::canvas::managed::handles::{CanvasFontHandle, CanvasImageHandle, Canva
|
||||
use crate::canvas::canvas_frame::{Drawable, Eventable, Updatable};
|
||||
use crate::util::vertex::{VertexTypeContainer, TextureVertex3D, Vertex3D};
|
||||
use winit::event::{DeviceEvent, MouseButton, ElementState, Event, WindowEvent};
|
||||
use crate::util::tr_event::{TrEvent, TrWindowEvent};
|
||||
|
||||
///
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -85,9 +86,9 @@ impl Drawable for Sprite {
|
||||
}
|
||||
|
||||
impl<T> Eventable<T> for Sprite {
|
||||
fn notify(&mut self, event: &Event<T>) -> () {
|
||||
fn notify(&mut self, event: &TrEvent<T>) -> () {
|
||||
match event {
|
||||
Event::WindowEvent { event: WindowEvent::MouseInput { device_id, state, button, modifiers }, .. } => {
|
||||
TrEvent::WindowEvent { event: TrWindowEvent::MouseInput { device_id, state, button, modifiers }, .. } => {
|
||||
match button {
|
||||
MouseButton::Left => {
|
||||
if *state == ElementState::Pressed {
|
||||
|
||||
Reference in New Issue
Block a user