mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
code cleanup: Pos2::new -> pos2, Vec2::new -> vec2
This commit is contained in:
@@ -10,7 +10,7 @@ fn main() {
|
||||
|
||||
let png_data = include_bytes!("../../examples/retained_image/src/rust-logo-256x256.png");
|
||||
let image = load_glium_image(png_data);
|
||||
let image_size = egui::Vec2::new(image.width as f32, image.height as f32);
|
||||
let image_size = egui::vec2(image.width as f32, image.height as f32);
|
||||
// Load to gpu memory
|
||||
let glium_texture = glium::texture::SrgbTexture2d::new(&display, image).unwrap();
|
||||
// Allow us to share the texture with egui:
|
||||
@@ -18,7 +18,7 @@ fn main() {
|
||||
// Allocate egui's texture id for GL texture
|
||||
let texture_id = egui_glium.painter.register_native_texture(glium_texture);
|
||||
// Setup button image size for reasonable image size for button container.
|
||||
let button_image_size = egui::Vec2::new(32_f32, 32_f32);
|
||||
let button_image_size = egui::vec2(32_f32, 32_f32);
|
||||
|
||||
event_loop.run(move |event, _, control_flow| {
|
||||
let mut redraw = || {
|
||||
|
||||
Reference in New Issue
Block a user