Various spelling fixes, docs improvements and code cleanup

This commit is contained in:
Emil Ernerfeldt
2021-03-31 23:12:42 +02:00
parent 1f965d16a2
commit f6770f0183
13 changed files with 36 additions and 34 deletions
+5 -4
View File
@@ -16,13 +16,14 @@ impl super::Demo for CursorTest {
impl super::View for CursorTest {
fn ui(&mut self, ui: &mut egui::Ui) {
ui.heading("Hover to switch cursor icon:");
ui.vertical_centered_justified(|ui| {
ui.heading("Hover to switch cursor icon:");
for &cursor_icon in &egui::CursorIcon::ALL {
let _ = ui
.button(format!("{:?}", cursor_icon))
.on_hover_cursor(cursor_icon);
}
ui.add(crate::__egui_github_link_file!());
});
}
}
@@ -295,14 +296,14 @@ impl super::View for InputTest {
egui::PointerButton::Middle,
] {
if response.clicked_by(button) {
new_info += &format!("Clicked by {:?}\n", button);
new_info += &format!("Clicked by {:?} button\n", button);
}
if response.double_clicked_by(button) {
new_info += &format!("Double-clicked by {:?}\n", button);
new_info += &format!("Double-clicked by {:?} button\n", button);
}
if response.dragged_by(button) {
new_info += &format!(
"Dragged by {:?}, delta: {:?}\n",
"Dragged by {:?} button, delta: {:?}\n",
button,
response.drag_delta()
);