mod border;
mod entity;
mod formatting;
mod renderer;
mod terminal;
mod to_world;
use bevy::prelude::{App, CoreStage, IntoSystemDescriptor, Plugin};
#[cfg(feature = "camera")]
pub use renderer::{AutoCamera, TiledCamera, TiledCameraBundle};
pub use renderer::{code_page_437, TerminalFont, TerminalLayout, TerminalMaterial};
pub use to_world::ToWorld;
pub use sark_grids::{grid::Side, GridPoint, Pivot, Size2d};
pub use crate::renderer::{
TERMINAL_CHANGE_FONT, TERMINAL_INIT, TERMINAL_LAYOUT_CHANGE, TERMINAL_LAYOUT_UPDATE,
TERMINAL_MATERIAL_CHANGE, TERMINAL_RENDER, TERMINAL_UPDATE_TILES,
};
pub use prelude::*;
pub mod prelude {
#[cfg(feature = "camera")]
pub use crate::renderer::{AutoCamera, TileScaling};
pub use crate::{
border::{AlignedStringFormatter, Border, Edge},
entity::ClearAfterRender,
entity::TerminalBundle,
formatting::*,
terminal::{Terminal, Tile},
TerminalPlugin,
};
pub use sark_grids::{grid::Side, GridPoint, Pivot, Size2d};
}
pub struct TerminalPlugin;
impl Plugin for TerminalPlugin {
fn build(&self, app: &mut App) {
app.add_plugin(renderer::TerminalRendererPlugin)
.add_plugin(to_world::ToWorldPlugin)
.add_system_to_stage(
CoreStage::Last,
entity::clear_after_render.after(TERMINAL_RENDER),
);
}
}