Closed immmdreza closed 5 months ago
Added style: ContentStyle to the canvas's block to store style for each block.
style: ContentStyle
Methods draw_styled_char and draw_styled_line are now available in Canvas.
draw_styled_char
draw_styled_line
Canvas
Here is how you can add style to a char (or line).
sc.draw_styled_char(self, 'E', ContentStyle::new().red().into()); self.canvas .draw_styled_line(2, format!(" Score: {} ", self.player.score), ContentStyle::new().black().on_white().into())
A super thank. Now we can call this project a true rust program :D
Added
style: ContentStyle
to the canvas's block to store style for each block.Methods
draw_styled_char
anddraw_styled_line
are now available inCanvas
.Here is how you can add style to a char (or line).