1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 13:50:04 -04:00

Rename Egui to egui

Also update iamges in README.md
This commit is contained in:
Emil Ernerfeldt
2021-01-17 14:48:59 +01:00
parent 9dba63fa3f
commit 31b7eda51e
55 changed files with 173 additions and 172 deletions

View File

@@ -57,7 +57,7 @@ impl ColorTest {
ui: &mut Ui,
mut tex_allocator: &mut Option<&mut dyn epi::TextureAllocator>,
) {
ui.label("This is made to test that the Egui painter backend is set up correctly, so that all colors are interpolated and blended in linear space with premultiplied alpha.");
ui.label("This is made to test that the egui painter backend is set up correctly, so that all colors are interpolated and blended in linear space with premultiplied alpha.");
ui.label("If everything is set up correctly, all groups of gradients will look uniform");
ui.checkbox(&mut self.vertex_gradients, "Vertex gradients");

View File

@@ -1,4 +1,4 @@
/// Demonstrates how to make an app using Egui.
/// Demonstrates how to make an app using egui.
///
/// Implements `epi::App` so it can be used with
/// [`egui_glium`](https://crates.io/crates/egui_glium) and [`egui_web`](https://crates.io/crates/egui_web).
@@ -11,7 +11,7 @@ pub struct DemoApp {
impl epi::App for DemoApp {
fn name(&self) -> &str {
" Egui Demo"
"✨ Demos"
}
#[cfg(feature = "persistence")]

View File

@@ -132,7 +132,7 @@ impl ColorWidgets {
fn ui(&mut self, ui: &mut Ui) {
egui::reset_button(ui, self);
ui.label("Egui lets you edit colors stored as either sRGBA or linear RGBA and with or without premultiplied alpha");
ui.label("egui lets you edit colors stored as either sRGBA or linear RGBA and with or without premultiplied alpha");
let Self {
srgba_unmul,

View File

@@ -64,17 +64,17 @@ impl DemoWindows {
/// `sidebar_ui` can be used to optionally show some things in the sidebar
pub fn ui(&mut self, ctx: &CtxRef) {
egui::SidePanel::left("side_panel", 200.0).show(ctx, |ui| {
ui.heading("Egui Demo");
ui.heading("egui demos");
ui.separator();
ScrollArea::auto_sized().show(ui, |ui| {
ui.label("Egui is an immediate mode GUI library written in Rust.");
ui.label("egui is an immediate mode GUI library written in Rust.");
ui.add(
egui::Hyperlink::new("https://github.com/emilk/egui").text("Egui home page"),
egui::Hyperlink::new("https://github.com/emilk/egui").text("egui home page"),
);
ui.label("Egui can be run on the web, or natively on 🐧");
ui.label("egui can be run on the web, or natively on 🐧");
ui.separator();
@@ -237,7 +237,7 @@ impl OpenWindows {
memory,
resize,
} = self;
ui.label("Egui:");
ui.label("egui:");
ui.checkbox(settings, "🔧 Settings");
ui.checkbox(inspection, "🔍 Inspection");
ui.checkbox(memory, "📝 Memory");
@@ -259,7 +259,7 @@ fn show_menu_bar(ui: &mut Ui) {
ui.ctx().memory().reset_areas();
}
if ui
.button("Clear Egui memory")
.button("Clear egui memory")
.on_hover_text("Forget scroll, collapsing headers etc")
.clicked
{

View File

@@ -107,7 +107,7 @@ impl super::Demo for DragAndDropDemo {
impl super::View for DragAndDropDemo {
fn ui(&mut self, ui: &mut Ui) {
ui.label("This is a proof-of-concept of drag-and-drop in Egui");
ui.label("This is a proof-of-concept of drag-and-drop in egui");
ui.label("Drag items between columns.");
let mut source_col_row = None;

View File

@@ -58,7 +58,7 @@ impl super::View for FontBook {
use super::font_contents_ubuntu::UBUNTU_FONT_CHARACTERS;
ui.label(format!(
"Egui supports {} standard characters and {} emojis.\nClick on a character to copy it.",
"egui supports {} standard characters and {} emojis.\nClick on a character to copy it.",
UBUNTU_FONT_CHARACTERS.len(),
FULL_EMOJI_LIST.len(),
));

View File

@@ -1529,7 +1529,7 @@ pub const NOTO_EMOJI_LIST: &[(u32, char, &str)] = &[
(0xFE837, '󾠷', "digit zero in square"),
];
/// All emojis supported by Egui.
/// All emojis supported by egui.
/// The union of `emoji-icon-font.ttf` and `NotoEmoji-Regular.ttf`.
#[rustfmt::skip]
pub const FULL_EMOJI_LIST: &[(u32, char, &str)] = &[

View File

@@ -1,4 +1,4 @@
//! Demo-code for showing how Egui is used.
//! Demo-code for showing how egui is used.
//!
//! The demo-code is also used in benchmarks and tests.

View File

@@ -32,8 +32,8 @@ pub fn toggle(ui: &mut egui::Ui, on: &mut bool) -> egui::Response {
}
// 4. Paint!
// First let's ask for a simple animation from Egui.
// Egui keeps track of changes in the boolean associated with the id and
// First let's ask for a simple animation from egui.
// egui keeps track of changes in the boolean associated with the id and
// returns an animated value in the 0-1 range for how much "on" we are.
let how_on = ui.ctx().animate_bool(response.id, *on);
// We will follow the current style by asking

View File

@@ -62,7 +62,7 @@ impl super::View for WidgetGallery {
ui.end_row();
ui.label("Hyperlink:");
ui.add(egui::Hyperlink::new("https://github.com/emilk/egui").text("Egui home page"));
ui.add(egui::Hyperlink::new("https://github.com/emilk/egui").text("egui home page"));
ui.end_row();
ui.label("Text Input:");

View File

@@ -43,7 +43,7 @@ impl FrameHistory {
1e3 * self.mean_frame_time()
))
.on_hover_text(
"Includes Egui layout and tessellation time.\n\
"Includes egui layout and tessellation time.\n\
Does not include GPU usage, nor overhead for sending data to GPU.",
);
egui::warn_if_debug_build(ui);
@@ -59,7 +59,7 @@ impl FrameHistory {
use egui::*;
let graph_top_cpu_usage = 0.010;
ui.label("Egui CPU usage history");
ui.label("egui CPU usage history");
let history = &self.frame_times;

View File

@@ -1,4 +1,4 @@
//! Demo-code for showing how Egui is used.
//! Demo-code for showing how egui is used.
//!
//! The demo-code is also used in benchmarks and tests.

View File

@@ -35,7 +35,7 @@ pub struct WrapApp {
impl epi::App for WrapApp {
fn name(&self) -> &str {
"Egui Demo Apps"
"egui demo apps"
}
#[cfg(feature = "persistence")]
@@ -135,7 +135,7 @@ fn clock_button(ui: &mut egui::Ui, seconds_since_midnight: f64) -> egui::Respons
enum RunMode {
/// This is the default for the demo.
///
/// If this is selected, Egui is only updated if are input events
/// If this is selected, egui is only updated if are input events
/// (like mouse movements) or there are some animations in the GUI.
///
/// Reactive mode saves CPU.
@@ -151,13 +151,13 @@ enum RunMode {
/// This will call `egui::Context::request_repaint()` at the end of each frame
/// to request the backend to repaint as soon as possible.
///
/// On most platforms this will mean that Egui will run at the display refresh rate of e.g. 60 Hz.
/// On most platforms this will mean that egui will run at the display refresh rate of e.g. 60 Hz.
///
/// For this demo it is not any reason to do so except to
/// demonstrate how quickly Egui runs.
/// demonstrate how quickly egui runs.
///
/// For games or other interactive apps, this is probably what you want to do.
/// It will guarantee that Egui is always up-to-date.
/// It will guarantee that egui is always up-to-date.
Continuous,
}
@@ -221,7 +221,7 @@ impl BackendPanel {
ui.separator();
if frame.is_web() {
ui.label("Egui is an immediate mode GUI written in Rust, compiled to WebAssembly, rendered with WebGL.");
ui.label("egui is an immediate mode GUI written in Rust, compiled to WebAssembly, rendered with WebGL.");
ui.label(
"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.");