1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 14:50:03 -04:00

code cleanup: Pos2::new -> pos2, Vec2::new -> vec2

This commit is contained in:
Emil Ernerfeldt
2022-07-29 14:34:26 +02:00
parent 105cb4b8f2
commit 51052c08e9
10 changed files with 63 additions and 67 deletions

View File

@@ -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 = || {