Replace every ... with … like some sort of crazy person

Also fix some small typos

Closes https://github.com/emilk/egui/pull/736
This commit is contained in:
Emil Ernerfeldt 2021-10-13 11:52:34 +02:00
parent 85941033e8
commit 6f699b3391
21 changed files with 35 additions and 35 deletions

View file

@ -14,9 +14,9 @@ Please make sure there is not already a similar bug report!
**To Reproduce** **To Reproduce**
Steps to reproduce the behavior: Steps to reproduce the behavior:
1. <!-- Go to '...' --> 1. <!-- Go to '' -->
2. <!-- Click on '....' --> 2. <!-- Click on '' -->
3. <!-- Scroll down to '....' --> 3. <!-- Scroll down to '' -->
4. <!-- See error --> 4. <!-- See error -->
**Expected behavior** **Expected behavior**

View file

@ -10,7 +10,7 @@ assignees: ''
Please make sure there is not already a similar issue! Please make sure there is not already a similar issue!
**Is your feature request related to a problem? Please describe.** **Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --> <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [] -->
**Describe the solution you'd like** **Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. --> <!-- A clear and concise description of what you want to happen. -->

View file

@ -301,7 +301,7 @@ NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui_w
### Added ⭐ ### Added ⭐
* Turn off `Window` title bars with `window.title_bar(false)`. * Turn off `Window` title bars with `window.title_bar(false)`.
* `ImageButton` - `ui.add(ImageButton::new(...))`. * `ImageButton` - `ui.add(ImageButton::new())`.
* `ui.vertical_centered` and `ui.vertical_centered_justified`. * `ui.vertical_centered` and `ui.vertical_centered_justified`.
* `ui.allocate_painter` helper. * `ui.allocate_painter` helper.
* Mouse-over explanation to duplicate ID warning. * Mouse-over explanation to duplicate ID warning.
@ -343,11 +343,11 @@ NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui_w
### Added ⭐ ### Added ⭐
* Emoji support: 1216 different emojis that work in any text. * Emoji support: 1216 different emojis that work in any text.
* The Demo app comes with a Font Book to explore the available glyphs. * The Demo app comes with a Font Book to explore the available glyphs.
* `ui.horizontal_wrapped(|ui| ...)`: Add widgets on a row but wrap at `max_size`. * `ui.horizontal_wrapped(|ui| )`: Add widgets on a row but wrap at `max_size`.
* `ui.horizontal_wrapped_for_text`: Like `ui.horizontal_wrapped`, but with spacing made for embedding text. * `ui.horizontal_wrapped_for_text`: Like `ui.horizontal_wrapped`, but with spacing made for embedding text.
* `ui.horizontal_for_text`: Like `ui.horizontal`, but with spacing made for embedding text. * `ui.horizontal_for_text`: Like `ui.horizontal`, but with spacing made for embedding text.
* `egui::Layout` now supports justified layouts where contents is _also_ centered, right-aligned, etc. * `egui::Layout` now supports justified layouts where contents is _also_ centered, right-aligned, etc.
* `ui.allocate_ui(size, |ui| ...)`: Easily create a child-`Ui` of a given size. * `ui.allocate_ui(size, |ui| )`: Easily create a child-`Ui` of a given size.
* `SelectableLabel` (`ui.selectable_label` and `ui.selectable_value`): A text-button that can be selected. * `SelectableLabel` (`ui.selectable_label` and `ui.selectable_value`): A text-button that can be selected.
* `ui.small_button`: A smaller button that looks good embedded in text. * `ui.small_button`: A smaller button that looks good embedded in text.
* `ui.drag_angle_tau`: For those who want to specify angles as fractions of τ (a full turn). * `ui.drag_angle_tau`: For those who want to specify angles as fractions of τ (a full turn).
@ -399,7 +399,7 @@ NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui_w
* The demo app now has a slider to scale all of egui. * The demo app now has a slider to scale all of egui.
### Changed 🔧 ### Changed 🔧
* `ui.horizontal(...)` etc returns `Response`. * `ui.horizontal()` etc returns `Response`.
* Refactored the interface for `egui::app::App`. * Refactored the interface for `egui::app::App`.
* Windows are now constrained to the screen. * Windows are now constrained to the screen.
* `Context::begin_frame()` no longer returns a `Ui`. Instead put your widgets into a `SidePanel`, `TopPanel`, `CentralPanel`, `Window` or `Area`. * `Context::begin_frame()` no longer returns a `Ui`. Instead put your widgets into a `SidePanel`, `TopPanel`, `CentralPanel`, `Window` or `Area`.

View file

@ -158,7 +158,7 @@ egui is build to be easy to integrate into any existing game engine or platform
egui itself doesn't know or care on what OS it is running or how to render things to the screen - that is the job of the egui integration. egui itself doesn't know or care on what OS it is running or how to render things to the screen - that is the job of the egui integration.
The integration needs to do two things: The integration needs to do two things:
* **IO**: Supply egui with input (mouse position, keyboard presses, ...) and handle egui output (cursor changes, copy-paste integration, ...). * **IO**: Supply egui with input (mouse position, keyboard presses, …) and handle egui output (cursor changes, copy-paste integration, …).
* **Painting**: Render the textured triangles that egui outputs. * **Painting**: Render the textured triangles that egui outputs.
### Official ### Official

View file

@ -539,7 +539,7 @@ fn open_url(_url: &str) {
} }
} }
/// Glium sends special keys (backspace, delete, F1, ...) as characters. /// Winit sends special keys (backspace, delete, F1, …) as characters.
/// Ignore those. /// Ignore those.
/// We also ignore '\r', '\n', '\t'. /// We also ignore '\r', '\n', '\t'.
/// Newlines are handled by the `Key::Enter` event. /// Newlines are handled by the `Key::Enter` event.

View file

@ -37,7 +37,7 @@
//! //!
//! Second, count and reset all instances of a type in [`serializable::IdAnyMap`] could return an incorrect value for the same reason. //! Second, count and reset all instances of a type in [`serializable::IdAnyMap`] could return an incorrect value for the same reason.
//! //!
//! Deserialization errors of loaded elements of these storages can be determined only when you call `get_...` functions, they not logged and not provided to a user, on this errors value is just replaced with `or_insert()`/default value. //! Deserialization errors of loaded elements of these storages can be determined only when you call `get_` functions, they not logged and not provided to a user, on this errors value is just replaced with `or_insert()`/default value.
//! //!
//! # When not to use this //! # When not to use this
//! //!

View file

@ -79,14 +79,14 @@ impl<'open> Window<'open> {
self self
} }
/// Usage: `Window::new(...).mutate(|w| w.resize = w.resize.auto_expand_width(true))` /// Usage: `Window::new().mutate(|w| w.resize = w.resize.auto_expand_width(true))`
/// Not sure this is a good interface for this. /// Not sure this is a good interface for this.
pub fn mutate(mut self, mutate: impl Fn(&mut Self)) -> Self { pub fn mutate(mut self, mutate: impl Fn(&mut Self)) -> Self {
mutate(&mut self); mutate(&mut self);
self self
} }
/// Usage: `Window::new(...).resize(|r| r.auto_expand_width(true))` /// Usage: `Window::new().resize(|r| r.auto_expand_width(true))`
/// Not sure this is a good interface for this. /// Not sure this is a good interface for this.
pub fn resize(mut self, mutate: impl Fn(Resize) -> Resize) -> Self { pub fn resize(mut self, mutate: impl Fn(Resize) -> Resize) -> Self {
self.resize = mutate(self.resize); self.resize = mutate(self.resize);

View file

@ -389,7 +389,7 @@ impl RawInput {
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
pub struct TouchDeviceId(pub u64); pub struct TouchDeviceId(pub u64);
/// Unique identification of a touch occurrence (finger or pen or ...). /// Unique identification of a touch occurrence (finger or pen or ).
/// A Touch ID is valid until the finger is lifted. /// A Touch ID is valid until the finger is lifted.
/// A new ID is used for the next touch. /// A new ID is used for the next touch.
#[derive(Clone, Copy, Debug, Eq, PartialEq, PartialOrd, Ord)] #[derive(Clone, Copy, Debug, Eq, PartialEq, PartialOrd, Ord)]
@ -403,7 +403,7 @@ pub enum TouchPhase {
/// User just placed a touch point on the touch surface /// User just placed a touch point on the touch surface
Start, Start,
/// User moves a touch point along the surface. This event is also sent when /// User moves a touch point along the surface. This event is also sent when
/// any attributes (position, force, ...) of the touch point change. /// any attributes (position, force, ) of the touch point change.
Move, Move,
/// User lifted the finger or pen from the surface, or slid off the edge of /// User lifted the finger or pen from the surface, or slid off the edge of
/// the surface /// the surface

View file

@ -8,7 +8,7 @@
//! menu::bar(ui, |ui| { //! menu::bar(ui, |ui| {
//! menu::menu(ui, "File", |ui| { //! menu::menu(ui, "File", |ui| {
//! if ui.button("Open").clicked() { //! if ui.button("Open").clicked() {
//! // ... //! //
//! } //! }
//! }); //! });
//! }); //! });

View file

@ -2,10 +2,10 @@
#[derive(Clone, Copy, Debug, Eq, PartialEq)] #[derive(Clone, Copy, Debug, Eq, PartialEq)]
// #[cfg_attr(feature = "serde", derive(serde::Serialize))] // #[cfg_attr(feature = "serde", derive(serde::Serialize))]
pub struct Sense { pub struct Sense {
/// buttons, sliders, windows ... /// buttons, sliders, windows, …
pub click: bool, pub click: bool,
/// sliders, windows, scroll bars, scroll areas ... /// sliders, windows, scroll bars, scroll areas, …
pub drag: bool, pub drag: bool,
/// this widgets want focus. /// this widgets want focus.

View file

@ -326,7 +326,7 @@ pub struct WidgetVisuals {
/// Button frames etc. /// Button frames etc.
pub corner_radius: f32, pub corner_radius: f32,
/// Stroke and text color of the interactive part of a component (button text, slider grab, check-mark, ...). /// Stroke and text color of the interactive part of a component (button text, slider grab, check-mark, ).
pub fg_stroke: Stroke, pub fg_stroke: Stroke,
/// Make the frame this much larger. /// Make the frame this much larger.

View file

@ -2,7 +2,7 @@
//! //!
//! Example widget uses: //! Example widget uses:
//! * `ui.add(Label::new("Text").text_color(color::red));` //! * `ui.add(Label::new("Text").text_color(color::red));`
//! * `if ui.add(Button::new("Click me")).clicked() { ... }` //! * `if ui.add(Button::new("Click me")).clicked() { }`
use crate::*; use crate::*;

View file

@ -391,7 +391,7 @@ impl<'t> TextEdit<'t> {
} }
/// Set to 0.0 to keep as small as possible. /// Set to 0.0 to keep as small as possible.
/// Set to [`f32::INFINITY`] to take up all available space. /// Set to [`f32::INFINITY`] to take up all available space (i.e. disable automatic word wrap).
pub fn desired_width(mut self, desired_width: f32) -> Self { pub fn desired_width(mut self, desired_width: f32) -> Self {
self.desired_width = Some(desired_width); self.desired_width = Some(desired_width);
self self

View file

@ -163,7 +163,7 @@ impl Widgets {
ui.heading("The name of the tooltip"); ui.heading("The name of the tooltip");
ui.horizontal(|ui| { ui.horizontal(|ui| {
ui.label("This tooltip was created with"); ui.label("This tooltip was created with");
ui.monospace(".on_hover_ui(...)"); ui.monospace(".on_hover_ui()");
}); });
let _ = ui.button("A button you can never press"); let _ = ui.button("A button you can never press");
}; };

View file

@ -54,11 +54,11 @@ pub fn password_ui(ui: &mut egui::Ui, text: &mut String) -> egui::Response {
ui.memory().id_data_temp.insert(id, plaintext); ui.memory().id_data_temp.insert(id, plaintext);
// All done! Return the interaction response so the user can check what happened // All done! Return the interaction response so the user can check what happened
// (hovered, clicked, ...) and maybe show a tooltip: // (hovered, clicked, ) and maybe show a tooltip:
result.response result.response
} }
// A wrapper that allows the more idiomatic usage pattern: `ui.add(...)` // A wrapper that allows the more idiomatic usage pattern: `ui.add()`
/// Password entry field with ability to toggle character hiding. /// Password entry field with ability to toggle character hiding.
/// ///
/// ## Example: /// ## Example:

View file

@ -155,7 +155,7 @@ impl BackendPanel {
ui.label( ui.label(
"Everything you see is rendered as textured triangles. There is no DOM. There are no HTML elements. \ "Everything you see is rendered as textured triangles. There is no DOM. There are no HTML elements. \
This is not JavaScript. This is Rust, running at 60 FPS. This is the web page, reinvented with game tech."); This is not JavaScript. This is Rust, running at 60 FPS. This is the web page, reinvented with game tech.");
ui.label("This is also work in progress, and not ready for production... yet :)"); ui.label("This is also work in progress, and not ready for production yet :)");
ui.horizontal_wrapped(|ui| { ui.horizontal_wrapped(|ui| {
ui.label("Project home page:"); ui.label("Project home page:");
ui.hyperlink("https://github.com/emilk/egui"); ui.hyperlink("https://github.com/emilk/egui");

View file

@ -37,17 +37,17 @@ static AGENT_ID: &str = "egui_text_agent";
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Helpers to hide some of the verbosity of web_sys // Helpers to hide some of the verbosity of web_sys
/// Log some text to the developer console (`console.log(...)` in JS) /// Log some text to the developer console (`console.log()` in JS)
pub fn console_log(s: impl Into<JsValue>) { pub fn console_log(s: impl Into<JsValue>) {
web_sys::console::log_1(&s.into()); web_sys::console::log_1(&s.into());
} }
/// Log a warning to the developer console (`console.warn(...)` in JS) /// Log a warning to the developer console (`console.warn()` in JS)
pub fn console_warn(s: impl Into<JsValue>) { pub fn console_warn(s: impl Into<JsValue>) {
web_sys::console::warn_1(&s.into()); web_sys::console::warn_1(&s.into());
} }
/// Log an error to the developer console (`console.error(...)` in JS) /// Log an error to the developer console (`console.error()` in JS)
pub fn console_error(s: impl Into<JsValue>) { pub fn console_error(s: impl Into<JsValue>) {
web_sys::console::error_1(&s.into()); web_sys::console::error_1(&s.into());
} }

View file

@ -14,7 +14,7 @@ pub struct Shadow {
} }
impl Shadow { impl Shadow {
/// Tooltips, menus, ... /// Tooltips, menus,
pub fn small_dark() -> Self { pub fn small_dark() -> Self {
Self { Self {
extrusion: 16.0, extrusion: 16.0,
@ -22,7 +22,7 @@ impl Shadow {
} }
} }
/// Tooltips, menus, ... /// Tooltips, menus,
pub fn small_light() -> Self { pub fn small_light() -> Self {
Self { Self {
extrusion: 16.0, extrusion: 16.0,

View file

@ -81,7 +81,7 @@ impl Path {
for i in 1..n - 1 { for i in 1..n - 1 {
let mut n1 = (points[i + 1] - points[i]).normalized().rot90(); let mut n1 = (points[i + 1] - points[i]).normalized().rot90();
// Handle duplicated points (but not triplicated...): // Handle duplicated points (but not triplicated):
if n0 == Vec2::ZERO { if n0 == Vec2::ZERO {
n0 = n1; n0 = n1;
} else if n1 == Vec2::ZERO { } else if n1 == Vec2::ZERO {
@ -124,7 +124,7 @@ impl Path {
let next_i = if i + 1 == n { 0 } else { i + 1 }; let next_i = if i + 1 == n { 0 } else { i + 1 };
let mut n1 = (points[next_i] - points[i]).normalized().rot90(); let mut n1 = (points[next_i] - points[i]).normalized().rot90();
// Handle duplicated points (but not triplicated...): // Handle duplicated points (but not triplicated):
if n0 == Vec2::ZERO { if n0 == Vec2::ZERO {
n0 = n1; n0 = n1;
} else if n1 == Vec2::ZERO { } else if n1 == Vec2::ZERO {

View file

@ -8,6 +8,6 @@
`epi` is a backend-agnostic interface for writing apps using `egui` (a platform agnostic GUI library). `epi` is a backend-agnostic interface for writing apps using `egui` (a platform agnostic GUI library).
This crate provides a common interface for programming an app using egui, which can then be easily plugged into [`eframe`](https://github.com/emilk/egui/tree/master/eframe) (which in a wrapper over [`egui_web`](https://crates.io/crates/egui_web) and/or [`egui_glium`](https://crates.io/crates/egui_glium)). This crate provides a common interface for programming an app using egui, which can then be easily plugged into [`eframe`](https://github.com/emilk/egui/tree/master/eframe) (which is a wrapper over [`egui_web`](https://crates.io/crates/egui_web) and/or [`egui_glium`](https://crates.io/crates/egui_glium)).
This crate is only for those that want to write an app that can be compiled both natively and for the web. This crate is only for those that want to write an app that can be compiled both natively and for the web.

View file

@ -6,10 +6,10 @@ cd "$script_path/.."
# Starts a local web-server that serves the contents of the `doc/` folder, # Starts a local web-server that serves the contents of the `doc/` folder,
# i.e. the web-version of `egui_demo_app`. # i.e. the web-version of `egui_demo_app`.
echo "ensuring basic-http-server is installed..." echo "ensuring basic-http-server is installed"
cargo install basic-http-server cargo install basic-http-server
echo "staritng server..." echo "starting server…"
echo "serving at http://localhost:8888" echo "serving at http://localhost:8888"
(cd docs && basic-http-server --addr 127.0.0.1:8888 .) (cd docs && basic-http-server --addr 127.0.0.1:8888 .)