Galactica/crates/render/src/ui/api/directive.rs
Mark b170f3f53f
Reworked renderer for Directives
Added OwnedTextArea & reworked textarea creation
Added ScrollBox
2024-02-07 15:58:14 -08:00

29 lines
721 B
Rust

use rhai::{plugin::*, Dynamic, Module};
#[export_module]
#[allow(non_snake_case)]
#[allow(non_upper_case_globals)]
pub mod player_directive_module {
use galactica_system::PlayerDirective;
pub const None: PlayerDirective = PlayerDirective::None;
pub const Land: PlayerDirective = PlayerDirective::Land;
pub const UnLand: PlayerDirective = PlayerDirective::UnLand;
pub fn Engine(state: bool) -> PlayerDirective {
PlayerDirective::Engine(state)
}
pub fn TurnLeft(state: bool) -> PlayerDirective {
PlayerDirective::TurnLeft(state)
}
pub fn TurnRight(state: bool) -> PlayerDirective {
PlayerDirective::TurnRight(state)
}
pub fn Guns(state: bool) -> PlayerDirective {
PlayerDirective::Guns(state)
}
}