Struct RustConsole

Source
pub struct RustConsole { /* private fields */ }

Implementations§

Source§

impl RustConsole

Source

pub const FG_BLACK: u16 = 0u16

Source

pub const FG_DARK_BLUE: u16 = 1u16

Source

pub const FG_DARK_GREEN: u16 = 2u16

Source

pub const FG_DARK_CYAN: u16 = 3u16

Source

pub const FG_DARK_RED: u16 = 4u16

Source

pub const FG_DARK_MAGENTA: u16 = 5u16

Source

pub const FG_DARK_YELLOW: u16 = 6u16

Source

pub const FG_GREY: u16 = 7u16

Source

pub const FG_DARK_GREY: u16 = 8u16

Source

pub const FG_BLUE: u16 = 9u16

Source

pub const FG_GREEN: u16 = 10u16

Source

pub const FG_CYAN: u16 = 11u16

Source

pub const FG_RED: u16 = 12u16

Source

pub const FG_MAGENTA: u16 = 13u16

Source

pub const FG_YELLOW: u16 = 14u16

Source

pub const FG_WHITE: u16 = 15u16

Source

pub const BG_BLACK: u16 = 0u16

Source

pub const BG_DARK_BLUE: u16 = 16u16

Source

pub const BG_DARK_GREEN: u16 = 32u16

Source

pub const BG_DARK_CYAN: u16 = 48u16

Source

pub const BG_DARK_RED: u16 = 64u16

Source

pub const BG_DARK_MAGENTA: u16 = 80u16

Source

pub const BG_DARK_YELLOW: u16 = 96u16

Source

pub const BG_GREY: u16 = 112u16

Source

pub const BG_DARK_GREY: u16 = 128u16

Source

pub const BG_BLUE: u16 = 144u16

Source

pub const BG_GREEN: u16 = 160u16

Source

pub const BG_CYAN: u16 = 176u16

Source

pub const BG_RED: u16 = 192u16

Source

pub const BG_MAGENTA: u16 = 208u16

Source

pub const BG_YELLOW: u16 = 224u16

Source

pub const BG_WHITE: u16 = 240u16

Source

pub const PIXEL_SOLID: char = '█'

Source

pub const PIXEL_THREEQUARTER: char = '▓'

Source

pub const PIXEL_HALF: char = '▒'

Source

pub const PIXEL_QUARTER: char = '░'

Source

pub const VK_UP: u32 = 38u32

Source

pub const VK_DOWN: u32 = 40u32

Source

pub const VK_LEFT: u32 = 37u32

Source

pub const VK_RIGHT: u32 = 39u32

Source

pub fn width(&self) -> usize

Source

pub fn height(&self) -> usize

Source

pub fn font_width(&self) -> i16

Source

pub fn font_height(&self) -> i16

Source

pub fn key(&self, v_key: usize) -> KeyState

Source

pub fn set_title(&self, _title: String)

Source

pub fn resize( &mut self, new_width: usize, new_height: usize, new_font_width: i16, new_font_height: i16, )

Source

pub fn clear(&mut self)

Source

pub fn draw(&mut self, _x: usize, _y: usize, _c: char, _col: u16)

Source

pub fn fill( &mut self, x1: usize, y1: usize, x2: usize, y2: usize, c: char, col: u16, )

Source

pub fn draw_string(&mut self, _x: usize, _y: usize, _s: &str, _col: u16)

Source

pub fn draw_string_alpha(&mut self, _x: usize, _y: usize, _s: &str, _col: u16)

Source

pub fn draw_line( &mut self, x1: usize, y1: usize, x2: usize, y2: usize, c: char, col: u16, )

Source

pub fn draw_triangle( &mut self, x1: usize, y1: usize, x2: usize, y2: usize, x3: usize, y3: usize, c: char, col: u16, )

Source

pub fn fill_triangle( &mut self, x1: usize, y1: usize, x2: usize, y2: usize, x3: usize, y3: usize, c: char, col: u16, )

Source

pub fn draw_circle(&mut self, xc: usize, yc: usize, r: usize, c: char, col: u16)

Source

pub fn fill_circle(&mut self, xc: usize, yc: usize, r: usize, c: char, col: u16)

Source

pub fn draw_sprite(&mut self, x: usize, y: usize, sprite: &RustConsoleSprite)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.