raekna-ui 0.2.1

This crate contains functionality to draw a plain text calculator using wgpu.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use winit::event::ModifiersState;

#[derive(Copy, Clone, Debug, Default)]
pub struct ActiveModifiers {
    pub shift: bool,
    pub ctrl: bool,
}

impl ActiveModifiers {
    pub fn update(&mut self, state: &ModifiersState) {
        self.shift = state.shift();
        self.ctrl = state.ctrl();
    }
}