From ebd2c859ac1aa14de46b48d699a3d4268d4fe261 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Mon, 18 Oct 2021 21:00:25 +0200 Subject: [PATCH] Make multi-touch demo a bit nicer looking --- egui/src/ui.rs | 17 ++++ egui_demo_lib/src/apps/demo/multi_touch.rs | 94 +++++++++++----------- 2 files changed, 66 insertions(+), 45 deletions(-) diff --git a/egui/src/ui.rs b/egui/src/ui.rs index c7fc56ab..bc43728b 100644 --- a/egui/src/ui.rs +++ b/egui/src/ui.rs @@ -997,6 +997,8 @@ impl Ui { self.placer.advance_cursor(amount); } + /// Show some text. + /// /// Shortcut for `add(Label::new(text))` /// /// See also [`Label`]. @@ -1005,6 +1007,8 @@ impl Ui { label.into().ui(self) } + /// Show colored text. + /// /// Shortcut for `add(Label::new(text).text_color(color))` pub fn colored_label( &mut self, @@ -1014,11 +1018,15 @@ impl Ui { label.into().text_color(color).ui(self) } + /// Show large text. + /// /// Shortcut for `add(Label::new(text).heading())` pub fn heading(&mut self, label: impl Into