pub struct BTermBuilder { /* private fields */ }
Expand description

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.

Implementations

Provides a new, unconfigured, starting point for an BTerm session. You’ll have to specify everything manually.

Provides an 80x50 console in the baked-in 8x8 terminal font as your starting point.

Provides an 8x8 terminal font simple console, with the specified dimensions as your starting point.

Provides an 80x50 terminal, in the VGA font as your starting point.

Provides a VGA-font simple terminal with the specified dimensions as your starting point.

Adds width/height dimensions to the BTerm builder.

Overrides the default assumption for tile sizes. Needed for a raw initialization. If you have lots of fonts, the library will pick one (generally the first) to try and determine what dimensions you want to use when figuring out your window size. This method is used to override that assumption. It’s a great idea to use this when using multiple layers and fonts.

Adds a window title to the BTerm builder.

Adds a resource path to the BTerm builder. You only need to specify this if you aren’t embedding your resources.

Adds a font registration to the BTerm builder.

Adds a font registration to the BTerm builder.

Adds a simple console layer to the BTerm builder.

Adds a simple console layer to the BTerm builder, with no background.

Adds a simple console, hard-coded to the baked-in 8x8 terminal font. This does NOT register the font.

Adds a sparse console layer to the BTerm builder.

Adds a sparse console with no bg rendering layer to the BTerm builder.

Adds a fancy (supporting per-glyph offsets, rotation, etc.) console. OpenGL only for now.

Adds a sprite console

Enables you to override the vsync default for native rendering.

Enables you to override the full screen setting for native rendering.

Enables you to auto adjust the window to fit the screen.

Push platform-specific initialization hints to the builder. THIS REMOVES CROSS-PLATFORM COMPATIBILITY

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.

Enables input event queue

Enable resize changing console size, rather than scaling. Native OpenGL only.

Register a sprite sheet

Request a pixel gutter around the rendered area. The gutter is applied with half at each side of the screen, centering it. If you want a 4 pixel gutter on every side, request a gutter size of 8.

Combine all of the builder parameters, and return an BTerm context ready to go.

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.