Proper color handling
This commit is contained in:
+3
-3
@@ -223,17 +223,17 @@ export fn main() void = {
|
||||
const x = ev.motion.x / scale: f32;
|
||||
const y = ev.motion.y / scale: f32;
|
||||
uxn::set_mouse_motion(x: u16,y: u16,state);
|
||||
uxn::uxn_eval(state.mouse_vector,state)!;
|
||||
if(state.mouse_vector != 0 ) uxn::uxn_eval(state.mouse_vector,state)!;
|
||||
case sdl3::EventType::MOUSE_BUTTON_DOWN =>
|
||||
// fmt::printfln("Mouse Down: 0x{:x}", ev.button.button: u8 )!;
|
||||
const b = 1 << (ev.button.button: u8 - 1);
|
||||
uxn::set_mouse_down(b,state);
|
||||
uxn::uxn_eval(state.mouse_vector,state)!;
|
||||
if(state.mouse_vector != 0 ) uxn::uxn_eval(state.mouse_vector,state)!;
|
||||
case sdl3::EventType::MOUSE_BUTTON_UP =>
|
||||
// fmt::printfln("Mouse Up: 0x{:x}", ev.button.button: u8 )!;
|
||||
const b = 1 << (ev.button.button: u8 - 1);
|
||||
uxn::set_mouse_up(b,state);
|
||||
uxn::uxn_eval(state.mouse_vector,state)!;
|
||||
if(state.mouse_vector != 0 ) uxn::uxn_eval(state.mouse_vector,state)!;
|
||||
case sdl3::EventType::MOUSE_WHEEL =>
|
||||
fmt::printfln("Mouse Wheel!")!;
|
||||
case sdl3::EventType::WINDOW_EXPOSED =>
|
||||
|
||||
Reference in New Issue
Block a user