pub struct Frame<'p, P: Painter> { /* private fields */ }Implementations§
Source§impl<'p, P: Painter> Frame<'p, P>
impl<'p, P: Painter> Frame<'p, P>
pub fn label(&mut self, tx: u32, ty: u32, text: &str, color: impl Into<Rgba>)
pub fn cursor_at(&mut self, tx: u32, ty: u32, color: impl Into<Rgba>)
pub fn cursor_glyph_at( &mut self, tx: u32, ty: u32, glyph: char, color: impl Into<Rgba>, )
Sourcepub fn abs_glyph(
&mut self,
tx: u32,
ty: u32,
glyph: char,
color: impl Into<Rgba>,
)
pub fn abs_glyph( &mut self, tx: u32, ty: u32, glyph: char, color: impl Into<Rgba>, )
Draw a glyph at a screen-absolute tile position. Bypasses the frame origin so the glyph appears at the requested column/row regardless of where the enclosing text_box is placed. Useful for cursors that sit at the border edge of a box (where frame-relative coordinates would be negative and thus inexpressible as u32).
pub fn pixel_rect( &mut self, dx_px: u32, dy_px: u32, w_px: u32, h_px: u32, color: impl Into<Rgba>, )
pub fn sub_text_box<F>( &mut self, rect: TileRect, color: impl Into<Rgba>, body: F, )
pub fn gb_tile( &mut self, tx: u32, ty: u32, tile_id: u8, fallback: &str, color: impl Into<Rgba>, )
Sourcepub fn bracket_box(
&mut self,
rect: TileRect,
sides: BracketSides,
with_arrow: bool,
color: impl Into<Rgba>,
)
pub fn bracket_box( &mut self, rect: TileRect, sides: BracketSides, with_arrow: bool, color: impl Into<Rgba>, )
Draws a partial border (one or more sides) inside the tile rect
rect. Pixel offsets match the interior corner of the GB box-drawing
glyphs (+6 on the right of a tile column, +6 on the bottom of a
tile row), so the bracket aligns exactly with text_box borders.
If with_arrow is true, draws a 4px halfarrow (<) at the
far-left of the bottom edge — matching original DrawLineBox
terminator. Requires sides.bottom = true.
Sourcepub fn vline(
&mut self,
tx: u32,
ty: u32,
length_tiles: u32,
color: impl Into<Rgba>,
)
pub fn vline( &mut self, tx: u32, ty: u32, length_tiles: u32, color: impl Into<Rgba>, )
1-pixel-wide vertical line at the right interior edge of tile column
tx, spanning length_tiles tile rows starting at ty.
Sourcepub fn hline(
&mut self,
tx: u32,
ty: u32,
length_tiles: u32,
color: impl Into<Rgba>,
)
pub fn hline( &mut self, tx: u32, ty: u32, length_tiles: u32, color: impl Into<Rgba>, )
1-pixel-tall horizontal line at the bottom interior edge of tile row
ty, spanning length_tiles tile columns starting at tx.
Sourcepub fn label_value_grid(
&mut self,
tx: u32,
ty: u32,
rows: &[LabelValue<'_>],
value_indent_x: u32,
row_step: u32,
label_color: impl Into<Rgba>,
value_color: impl Into<Rgba>,
)
pub fn label_value_grid( &mut self, tx: u32, ty: u32, rows: &[LabelValue<'_>], value_indent_x: u32, row_step: u32, label_color: impl Into<Rgba>, value_color: impl Into<Rgba>, )
Draws a vertical sequence of label-value pairs starting at tile
(tx, ty). Each pair places label at (tx, row) and value at
(tx + value_indent_x, row + 1), advancing by row_step tile rows.