Skip to main content

RustConsole

Struct RustConsole 

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

Implementations§

Source§

impl RustConsole

Source

pub const FG_BLACK: u16 = 0x0000

Source

pub const FG_DARK_BLUE: u16 = 0x0001

Source

pub const FG_DARK_GREEN: u16 = 0x0002

Source

pub const FG_DARK_CYAN: u16 = 0x0003

Source

pub const FG_DARK_RED: u16 = 0x0004

Source

pub const FG_DARK_MAGENTA: u16 = 0x0005

Source

pub const FG_DARK_YELLOW: u16 = 0x0006

Source

pub const FG_GREY: u16 = 0x0007

Source

pub const FG_DARK_GREY: u16 = 0x0008

Source

pub const FG_BLUE: u16 = 0x0009

Source

pub const FG_GREEN: u16 = 0x000a

Source

pub const FG_CYAN: u16 = 0x000b

Source

pub const FG_RED: u16 = 0x000c

Source

pub const FG_MAGENTA: u16 = 0x000d

Source

pub const FG_YELLOW: u16 = 0x000e

Source

pub const FG_WHITE: u16 = 0x000f

Source

pub const BG_BLACK: u16 = 0x0000

Source

pub const BG_DARK_BLUE: u16 = 0x0010

Source

pub const BG_DARK_GREEN: u16 = 0x0020

Source

pub const BG_DARK_CYAN: u16 = 0x0030

Source

pub const BG_DARK_RED: u16 = 0x0040

Source

pub const BG_DARK_MAGENTA: u16 = 0x0050

Source

pub const BG_DARK_YELLOW: u16 = 0x0060

Source

pub const BG_GREY: u16 = 0x0070

Source

pub const BG_DARK_GREY: u16 = 0x0080

Source

pub const BG_BLUE: u16 = 0x0090

Source

pub const BG_GREEN: u16 = 0x00a0

Source

pub const BG_CYAN: u16 = 0x00b0

Source

pub const BG_RED: u16 = 0x00c0

Source

pub const BG_MAGENTA: u16 = 0x00d0

Source

pub const BG_YELLOW: u16 = 0x00e0

Source

pub const BG_WHITE: u16 = 0x00f0

Source

pub const PIXEL_SOLID: char = '\u{2588}'

Source

pub const PIXEL_THREEQUARTER: char = '\u{2593}'

Source

pub const PIXEL_HALF: char = '\u{2592}'

Source

pub const PIXEL_QUARTER: char = '\u{2591}'

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.