Struct agb::display::font::TextRenderer
source · pub struct TextRenderer<'a> { /* private fields */ }
Expand description
Keeps track of the cursor and manages rendered tiles.
Implementations§
source§impl<'a, 'b> TextRenderer<'b>
impl<'a, 'b> TextRenderer<'b>
pub fn writer( &'a mut self, foreground_colour: u8, background_colour: u8, bg: &'a mut RegularMap, vram_manager: &'a mut VRamManager ) -> TextWriter<'a, 'b>
sourcepub fn commit(&self, bg: &'a mut RegularMap, vram_manager: &'a mut VRamManager)
pub fn commit(&self, bg: &'a mut RegularMap, vram_manager: &'a mut VRamManager)
Commit the dynamic tiles that contain the text to the background.
sourcepub fn write_char(
&mut self,
c: char,
vram_manager: &mut VRamManager,
foreground_colour: u8,
background_colour: u8
)
pub fn write_char( &mut self, c: char, vram_manager: &mut VRamManager, foreground_colour: u8, background_colour: u8 )
Write another char into the text, moving the cursor as appropriate.
sourcepub fn clear(&mut self, vram_manager: &mut VRamManager)
pub fn clear(&mut self, vram_manager: &mut VRamManager)
Clear the text, removing the tiles from vram and resetting the cursor.