Would someone please help me with this tiny little nit?
Lately, almost no matter what crate I try to use there seems to usually be some silly little show-stopper like simply setting the position of a window.
I'm using the imgui-rs crate at https://github.com/Gekkio/imgui-rs/tree/master/imgui-examples/examples.
The main window setting takes place in mod.rs.
I've looked at the docs to no avail.
Here is the code that creates the main window, and I can't use it to position the window with WindowBuilder::new() :
use glium::glutin;
use glium::glutin::event::{Event, WindowEvent};
use glium::glutin::event_loop::{ControlFlow, EventLoop};
use glium::glutin::window::WindowBuilder;
use glium::{Display, Surface};
use imgui::{Context, FontConfig, FontGlyphRanges, FontSource, Ui};
use imgui_glium_renderer::Renderer;
use imgui_winit_support::{HiDpiMode, WinitPlatform};
use std::time::Instant;
mod clipboard;
pub struct System {
pub event_loop: EventLoop<()>,
pub display: glium::Display,
pub imgui: Context,
pub platform: WinitPlatform,
pub renderer: Renderer,
pub font_size: f32,
}
pub fn init(title: &str) -> System {
let title = match title.rfind('/') {
Some(idx) => title.split_at(idx + 1).1,
None => title,
};
let event_loop = EventLoop::new();
let context = glutin::ContextBuilder::new().with_vsync(true);
// let mon = winit::MonitorId::get_name();
let builder = WindowBuilder::new()
.with_title(title.to_owned())
// .window
// .set_position(glutin::dpi::LogicalPosition::new(50f64, 50f64)) // https://docs.rs/glium/0.22.0/glium/glutin/struct.Window.html FAIL
.with_inner_size(glutin::dpi::LogicalSize::new(1024f64, 768f64)); // 1024f64, 768f64
... ...
}