[−]Struct rltk::BTermBuilder
Provides a builder mechanism for initializing BTerm. You can chain builders together,
and and with a call to .build()
. This allows you to provide settings if you want to,
or just use a simple initializer if you are in a hurry.
Methods
impl BTermBuilder
pub fn new() -> BTermBuilder
Provides a new, unconfigured, starting point for an BTerm session. You'll have to specify everything manually.
pub fn simple80x50() -> BTermBuilder
Provides an 80x50 console in the baked-in 8x8 terminal font as your starting point.
pub fn simple<T>(width: T, height: T) -> BTermBuilder where
T: TryInto<u32>,
T: TryInto<u32>,
Provides an 8x8 terminal font simple console, with the specified dimensions as your starting point.
pub fn vga80x50() -> BTermBuilder
Provides an 80x50 terminal, in the VGA font as your starting point.
pub fn vga<T>(width: T, height: T) -> BTermBuilder where
T: TryInto<u32>,
T: TryInto<u32>,
Provides a VGA-font simple terminal with the specified dimensions as your starting point.
pub fn with_dimensions<T>(self, width: T, height: T) -> BTermBuilder where
T: TryInto<u32>,
T: TryInto<u32>,
Adds width/height dimensions to the BTerm builder.
pub fn with_tile_dimensions<T>(self, width: T, height: T) -> BTermBuilder where
T: TryInto<u32>,
T: TryInto<u32>,
Overrides the default assumption for tile sizes. Needed for a raw initialization.
pub fn with_title<S>(self, title: S) -> BTermBuilder where
S: ToString,
S: ToString,
Adds a window title to the BTerm builder.
pub fn with_resource_path<S>(self, path: S) -> BTermBuilder where
S: ToString,
S: ToString,
Adds a resource path to the BTerm builder. You only need to specify this if you aren't embedding your resources.
pub fn with_font<S, T>(self, font_path: S, width: T, height: T) -> BTermBuilder where
S: ToString,
T: TryInto<u32>,
S: ToString,
T: TryInto<u32>,
Adds a font registration to the BTerm builder.
pub fn with_simple_console<S, T>(
self,
width: T,
height: T,
font: S
) -> BTermBuilder where
S: ToString,
T: TryInto<u32>,
self,
width: T,
height: T,
font: S
) -> BTermBuilder where
S: ToString,
T: TryInto<u32>,
Adds a simple console layer to the BTerm builder.
pub fn with_simple8x8(self) -> BTermBuilder
Adds a simple console, hard-coded to the baked-in 8x8 terminal font. This does NOT register the font.
pub fn with_sparse_console<S, T>(
self,
width: T,
height: T,
font: S
) -> BTermBuilder where
S: ToString,
T: TryInto<u32>,
self,
width: T,
height: T,
font: S
) -> BTermBuilder where
S: ToString,
T: TryInto<u32>,
Adds a sparse console layer to the BTerm builder.
pub fn with_sparse_console_no_bg<S, T>(
self,
width: T,
height: T,
font: S
) -> BTermBuilder where
S: ToString,
T: TryInto<u32>,
self,
width: T,
height: T,
font: S
) -> BTermBuilder where
S: ToString,
T: TryInto<u32>,
Adds a sparse console with no bg rendering layer to the BTerm builder.
pub fn with_vsync(self, vsync: bool) -> BTermBuilder
Enables you to override the vsync default for native rendering.
pub fn with_fullscreen(self, fullscreen: bool) -> BTermBuilder
Enables you to override the full screen setting for native rendering.
pub fn with_platform_specific(self, hints: InitHints) -> BTermBuilder
Push platform-specific initialization hints to the builder. THIS REMOVES CROSS-PLATFORM COMPATIBILITY
pub fn with_fps_cap(self, fps: f32) -> BTermBuilder
Instructs the back-end (not all of them honor it; WASM and Amethyst do their own thing) to try to limit frame-rate and CPU utilization.
pub fn build(self) -> BTerm
Combine all of the builder parameters, and return an BTerm context ready to go.
Auto Trait Implementations
impl RefUnwindSafe for BTermBuilder
impl Send for BTermBuilder
impl Sync for BTermBuilder
impl Unpin for BTermBuilder
impl UnwindSafe for BTermBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,