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]]
|
[[package]]
|
||||||
name = "leanshot"
|
name = "leanshot"
|
||||||
version = "0.3.0"
|
version = "0.3.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"gl 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
|
@ -87,9 +87,9 @@ impl GUI {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
use gl;
|
use gl;
|
||||||
use glutin::{self,
|
use glutin::{
|
||||||
dpi::LogicalSize, ElementState, Event, EventsLoop, GlContext, GlWindow, KeyboardInput,
|
self, dpi::LogicalSize, ElementState, Event, EventsLoop, GlContext, GlWindow,
|
||||||
MouseButton, VirtualKeyCode, WindowBuilder, WindowEvent,
|
KeyboardInput, MouseButton, MouseCursor, VirtualKeyCode, WindowBuilder, WindowEvent,
|
||||||
};
|
};
|
||||||
use nanovg::{self, Color, Image, ImagePattern, PathOptions, StrokeOptions};
|
use nanovg::{self, Color, Image, ImagePattern, PathOptions, StrokeOptions};
|
||||||
use std::{f32::consts, slice};
|
use std::{f32::consts, slice};
|
||||||
|
@ -116,6 +116,7 @@ impl GUI {
|
||||||
.with_multisampling(4)
|
.with_multisampling(4)
|
||||||
.with_srgb(true);
|
.with_srgb(true);
|
||||||
let win = GlWindow::new(wb, ctx, &evl).expect("couldn't make window");
|
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;
|
let f = win.get_hidpi_factor() as f64;
|
||||||
unsafe {
|
unsafe {
|
||||||
win.make_current().expect("couldn't make window");
|
win.make_current().expect("couldn't make window");
|
||||||
|
|
|
@ -11,8 +11,8 @@ extern crate nanovg;
|
||||||
extern crate png;
|
extern crate png;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate structopt;
|
extern crate structopt;
|
||||||
extern crate time;
|
|
||||||
extern crate leanshot_xlib as xlib;
|
extern crate leanshot_xlib as xlib;
|
||||||
|
extern crate time;
|
||||||
|
|
||||||
mod capture;
|
mod capture;
|
||||||
mod errors;
|
mod errors;
|
||||||
|
|
Loading…
Reference in a new issue