41 lines
789 B
Rust
41 lines
789 B
Rust
pub mod blueprint;
|
|
pub mod board;
|
|
pub mod config;
|
|
pub mod editor;
|
|
pub mod input;
|
|
pub mod level;
|
|
pub mod marble_engine;
|
|
pub mod solution;
|
|
pub mod theme;
|
|
pub mod ui;
|
|
pub mod util;
|
|
|
|
use arboard::Clipboard;
|
|
use config::Config;
|
|
use input::ActionId;
|
|
use raylib::RaylibHandle;
|
|
// use util::MouseInput;
|
|
|
|
pub struct Globals {
|
|
pub clipboard: Option<Clipboard>,
|
|
pub config: Config,
|
|
// pub mouse: MouseInput,
|
|
}
|
|
|
|
impl Globals {
|
|
pub fn update(&mut self, rl: &RaylibHandle) {
|
|
self.config.input.update(rl);
|
|
}
|
|
|
|
pub fn is_pressed(&self, action: ActionId) -> bool {
|
|
self.config.input.is_pressed(action)
|
|
}
|
|
|
|
pub fn is_held(&self, action: ActionId) -> bool {
|
|
self.config.input.is_held(action)
|
|
}
|
|
|
|
pub fn is_released(&self, action: ActionId) -> bool {
|
|
self.config.input.is_released(action)
|
|
}
|
|
}
|