1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 23:00:04 -04:00
This commit is contained in:
Konkitoman
2023-11-08 07:44:28 +02:00
parent f174467d42
commit 37e42d1608
2 changed files with 6 additions and 6 deletions

View File

@@ -392,7 +392,7 @@ impl ContextImpl {
/// // Game loop: /// // Game loop:
/// loop { /// loop {
/// let raw_input = egui::RawInput::default(); /// let raw_input = egui::RawInput::default();
/// let full_output = ctx.run(raw_input, egui::ViewportIdPair::ROOT, |ctx| { /// let full_output = ctx.run(raw_input, |ctx| {
/// egui::CentralPanel::default().show(&ctx, |ui| { /// egui::CentralPanel::default().show(&ctx, |ui| {
/// ui.label("Hello world!"); /// ui.label("Hello world!");
/// if ui.button("Click me").clicked() { /// if ui.button("Click me").clicked() {
@@ -401,7 +401,7 @@ impl ContextImpl {
/// }); /// });
/// }); /// });
/// handle_platform_output(full_output.platform_output); /// handle_platform_output(full_output.platform_output);
/// let clipped_primitives = ctx.tessellate(full_output.shapes, egui::ViewportId::ROOT); // create triangles to paint /// let clipped_primitives = ctx.tessellate(full_output.shapes); // create triangles to paint
/// paint(full_output.textures_delta, clipped_primitives); /// paint(full_output.textures_delta, clipped_primitives);
/// } /// }
/// ``` /// ```
@@ -458,7 +458,7 @@ impl Context {
/// ///
/// // Each frame: /// // Each frame:
/// let input = egui::RawInput::default(); /// let input = egui::RawInput::default();
/// let full_output = ctx.run(input, egui::ViewportIdPair::ROOT, |ctx| { /// let full_output = ctx.run(input, |ctx| {
/// egui::CentralPanel::default().show(&ctx, |ui| { /// egui::CentralPanel::default().show(&ctx, |ui| {
/// ui.label("Hello egui!"); /// ui.label("Hello egui!");
/// }); /// });
@@ -482,7 +482,7 @@ impl Context {
/// ///
/// // Each frame: /// // Each frame:
/// let input = egui::RawInput::default(); /// let input = egui::RawInput::default();
/// ctx.begin_frame(input, egui::ViewportIdPair::ROOT); /// ctx.begin_frame(input);
/// ///
/// egui::CentralPanel::default().show(&ctx, |ui| { /// egui::CentralPanel::default().show(&ctx, |ui| {
/// ui.label("Hello egui!"); /// ui.label("Hello egui!");

View File

@@ -125,7 +125,7 @@
//! loop { //! loop {
//! let raw_input: egui::RawInput = gather_input(); //! let raw_input: egui::RawInput = gather_input();
//! //!
//! let full_output = ctx.run(raw_input, egui::ViewportIdPair::ROOT, |ctx| { //! let full_output = ctx.run(raw_input, |ctx| {
//! egui::CentralPanel::default().show(&ctx, |ui| { //! egui::CentralPanel::default().show(&ctx, |ui| {
//! ui.label("Hello world!"); //! ui.label("Hello world!");
//! if ui.button("Click me").clicked() { //! if ui.button("Click me").clicked() {
@@ -134,7 +134,7 @@
//! }); //! });
//! }); //! });
//! handle_platform_output(full_output.platform_output); //! handle_platform_output(full_output.platform_output);
//! let clipped_primitives = ctx.tessellate(full_output.shapes, egui::ViewportId::ROOT); // create triangles to paint //! let clipped_primitives = ctx.tessellate(full_output.shapes); // create triangles to paint
//! paint(full_output.textures_delta, clipped_primitives); //! paint(full_output.textures_delta, clipped_primitives);
//! } //! }
//! ``` //! ```