MCPcopy Create free account
hub / github.com/17cupsofcoffee/rl / new

Method new

src/console.rs:21–38  ·  view source on GitHub ↗
(font: Texture, width: usize, height: usize)

Source from the content-addressed store, hash-verified

19
20impl Console {
21 pub fn new(font: Texture, width: usize, height: usize) -> Console {
22 let cell_size = (font.width() / 16) as f32;
23
24 Console {
25 font,
26 cells: vec![
27 ConsoleCell {
28 glyph: ' ',
29 foreground: Color::rgb(1.0, 1.0, 1.0),
30 background: Color::rgb(0.0, 0.0, 0.0),
31 };
32 width * height
33 ],
34 cell_size,
35 width,
36 height,
37 }
38 }
39
40 pub fn clear(&mut self) {
41 self.cells = vec![

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected