mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 07:03:14 -04:00
WIP: clip_rect
This commit is contained in:
@@ -46,39 +46,37 @@ impl State {
|
||||
let mut region = region.centered_column(region.available_width().min(480.0));
|
||||
region.set_align(Align::Min);
|
||||
region.add(label!("Emigui!").text_style(TextStyle::Heading));
|
||||
region.add(label!("Emigui is an immediate mode GUI written in Rust, compiled to WebAssembly, rendered with WebGL."));
|
||||
region.add(label!(
|
||||
region.add_label("Emigui is an immediate mode GUI written in Rust, compiled to WebAssembly, rendered with WebGL.");
|
||||
region.add_label(
|
||||
"Everything you see is rendered as textured triangles. There is no DOM. There are no HTML elements."
|
||||
));
|
||||
region.add(label!("This not JavaScript. This is Rust code, running at 60 Hz. This is the web page, reinvented with game tech."));
|
||||
region.add(label!(
|
||||
"This is also work in progress, and not ready for production... yet :)"
|
||||
));
|
||||
);
|
||||
region.add_label("This not JavaScript. This is Rust code, running at 60 Hz. This is the web page, reinvented with game tech.");
|
||||
region.add_label("This is also work in progress, and not ready for production... yet :)");
|
||||
region.add(Separator::new());
|
||||
self.example_app.ui(&mut region);
|
||||
self.emigui.ui(&mut region);
|
||||
|
||||
region.set_align(Align::Min);
|
||||
region.add(label!("WebGl painter info:"));
|
||||
region.add_label("WebGl painter info:");
|
||||
region.indent(|region| {
|
||||
region.add(label!(self.webgl_painter.debug_info()));
|
||||
region.add_label(self.webgl_painter.debug_info());
|
||||
});
|
||||
region.add(
|
||||
label!("Everything: {:.1} ms", self.everything_ms).text_style(TextStyle::Monospace),
|
||||
);
|
||||
|
||||
Window::new("Test window").show(region.ctx(), |region| {
|
||||
region.add(label!("Grab the window and move it around!"));
|
||||
// TODO: Make it even simpler to show a window
|
||||
|
||||
region.add(label!(
|
||||
"This window can be reisized, but not smaller than the contents."
|
||||
));
|
||||
Window::new("Test window").show(region.ctx(), |region| {
|
||||
region.add_label("Grab the window and move it around!");
|
||||
|
||||
region.add_label("This window can be reisized, but not smaller than the contents.");
|
||||
});
|
||||
Window::new("Another test window")
|
||||
.default_pos(pos2(400.0, 100.0))
|
||||
.show(region.ctx(), |region| {
|
||||
region.add(label!("This might be on top of the other window?"));
|
||||
region.add(label!("Second line of text"));
|
||||
region.add_label("This might be on top of the other window?");
|
||||
region.add_label("Second line of text");
|
||||
});
|
||||
|
||||
let bg_color = srgba(16, 16, 16, 255);
|
||||
|
||||
Reference in New Issue
Block a user