lgui-core 0.2.0

Platform-neutral runtime and UI primitives for LGUI
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::*;

#[test]
fn reactive_changes_do_not_implicitly_request_a_global_frame() {
    let mut context = UiEventContext::new(
        ApplicationContext::empty(crate::memory::test_memory_options()),
        WindowId::new("reactive-change"),
    );

    context.mark_changed(true);

    assert!(context.flags().changed);
    assert!(context.flags().route_changed);
    assert!(!context.flags().needs_frame);

    context.request_frame();
    assert!(context.flags().needs_frame);
}