forked from michael/leanshot
crosshair
This commit is contained in:
parent
97da9feff1
commit
eb4ed18c49
3 changed files with 6 additions and 5 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -367,7 +367,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "leanshot"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
dependencies = [
|
||||
"failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gl 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -87,9 +87,9 @@ impl GUI {
|
|||
// }
|
||||
|
||||
use gl;
|
||||
use glutin::{self,
|
||||
dpi::LogicalSize, ElementState, Event, EventsLoop, GlContext, GlWindow, KeyboardInput,
|
||||
MouseButton, VirtualKeyCode, WindowBuilder, WindowEvent,
|
||||
use glutin::{
|
||||
self, dpi::LogicalSize, ElementState, Event, EventsLoop, GlContext, GlWindow,
|
||||
KeyboardInput, MouseButton, MouseCursor, VirtualKeyCode, WindowBuilder, WindowEvent,
|
||||
};
|
||||
use nanovg::{self, Color, Image, ImagePattern, PathOptions, StrokeOptions};
|
||||
use std::{f32::consts, slice};
|
||||
|
@ -116,6 +116,7 @@ impl GUI {
|
|||
.with_multisampling(4)
|
||||
.with_srgb(true);
|
||||
let win = GlWindow::new(wb, ctx, &evl).expect("couldn't make window");
|
||||
win.set_cursor(MouseCursor::Crosshair);
|
||||
let f = win.get_hidpi_factor() as f64;
|
||||
unsafe {
|
||||
win.make_current().expect("couldn't make window");
|
||||
|
|
|
@ -11,8 +11,8 @@ extern crate nanovg;
|
|||
extern crate png;
|
||||
#[macro_use]
|
||||
extern crate structopt;
|
||||
extern crate time;
|
||||
extern crate leanshot_xlib as xlib;
|
||||
extern crate time;
|
||||
|
||||
mod capture;
|
||||
mod errors;
|
||||
|
|
Loading…
Reference in a new issue