0.1.0-0-pre.11-fix.4
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/engines/engine-v1-sdl/unit_tests/swipe.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
fn pointer(x: f32, y: f32) -> engine_v1_common::PointerState {
|
||||
return engine_v1_common::PointerState::normalized(true, x, y);
|
||||
@@ -25,3 +25,10 @@ fn vertical_swipe_uses_dominant_axis() {
|
||||
let input = super::apply_swipe_direction(engine_v1_common::InputState::none(), Some(pointer(0.5, 0.8)), pointer(0.55, 0.2));
|
||||
assert!(input.is_active(engine_v1_common::GameAction::Up));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn quit_control_hit_is_limited_to_top_right_region() {
|
||||
assert!(super::quit_control_hit(pointer(0.92, 0.05)));
|
||||
assert!(!super::quit_control_hit(pointer(0.50, 0.05)));
|
||||
assert!(!super::quit_control_hit(pointer(0.92, 0.50)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user