]> git.seodisparate.com - LudumDare45_StartWithNothing/commitdiff
Try using font size 20 for "size-less" text draws
authorStephen Seo <seo.disparate@gmail.com>
Thu, 16 Feb 2023 09:05:04 +0000 (18:05 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Thu, 16 Feb 2023 09:05:04 +0000 (18:05 +0900)
src/main.rs

index 75385497ff48a0437a41698bdf65a1e2ee621fd7..28f708bb280ab3d7161e40ec06775955663046b0 100644 (file)
@@ -1880,13 +1880,9 @@ impl GameState {
                     } else {
                         window.get_gi_mut().draw_rect(rect, *c)?;
                     }
-                    window.get_font_mut(&self.font)?.draw(
-                        text,
-                        rect.h.round() as u32,
-                        rect.x,
-                        rect.y,
-                        *text_c,
-                    )?;
+                    window
+                        .get_font_mut(&self.font)?
+                        .draw(text, 20, rect.x, rect.y, *text_c)?;
                 }
                 MenuItemType::AppearingText {
                     text,
@@ -1901,7 +1897,7 @@ impl GameState {
                         } else {
                             text
                         },
-                        text_size.round() as u32,
+                        20,
                         rect.x,
                         rect.y,
                         *text_c,