diff options
Diffstat (limited to 'pixel-client/src/ui.rs')
-rw-r--r-- | pixel-client/src/ui.rs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/pixel-client/src/ui.rs b/pixel-client/src/ui.rs index 6410630f..684fb5b3 100644 --- a/pixel-client/src/ui.rs +++ b/pixel-client/src/ui.rs @@ -122,13 +122,19 @@ impl FocusDevice { impl<'a, 'b> Ui<'a, 'b> { pub fn text(&mut self, text: &str) { let margin = Vec2::splat(2.); - let size = margin + self.renderer.draw_text(self.cursor + margin, text) + margin; + let size = margin + + self + .renderer + .draw_text(self.cursor + margin, text, 1., None) + + margin; self.advance(size); } pub fn button(&mut self, w: f32, label: &str) -> bool { let c = self.cursor; let margin = Vec2::splat(4.); - let text_size = self.renderer.draw_text(self.cursor + margin, label); + let text_size = self + .renderer + .draw_text(self.cursor + margin, label, 1., None); let size = margin + Vec2::new(w, text_size.y) + margin; self.index += 1; @@ -170,7 +176,9 @@ impl<'a, 'b> Ui<'a, 'b> { pub fn textedit(&mut self, w: f32, content: &mut String) { let c = self.cursor; let margin = Vec2::splat(4.); - let text_size = self.renderer.draw_text(self.cursor + margin, &content); + let text_size = self + .renderer + .draw_text(self.cursor + margin, &content, 1., None); let size = margin + Vec2::new(w, text_size.y) + margin; self.index += 1; |