Add a second line of a text

This commit is contained in:
maddiebaka 2023-06-21 22:14:54 -04:00
parent 09f39c84fa
commit 6c3b96d013
1 changed files with 12 additions and 1 deletions

View File

@ -44,8 +44,18 @@ pub fn main() {
let texture = texture_creator
.create_texture_from_surface(&surface)
.map_err(|e| e.to_string()).unwrap();
let surface2 = font
.render("TEROK NOR")
.blended(Color::RGBA(220, 220, 220, 255))
.map_err(|e| e.to_string()).unwrap();
let target = rect!(110, 20, 260, 24);
let texture2 = texture_creator
.create_texture_from_surface(&surface2)
.map_err(|e| e.to_string()).unwrap();
let target = rect!(90, 58, 300, 32);
let target2 = rect!(110, 20, 260, 32);
canvas.set_draw_color(Color::RGB(0, 255, 255));
canvas.clear();
@ -57,6 +67,7 @@ pub fn main() {
canvas.set_draw_color(Color::RGB(48, 39, 49));
canvas.clear();
canvas.copy(&texture, None, Some(target)).unwrap();
canvas.copy(&texture2, None, Some(target2)).unwrap();
for event in event_pump.poll_iter() {
match event {
Event::Quit {..} |