385 Commits

Author SHA1 Message Date
Joonas Javanainen
65ac8d1aa8
Merge pull request #109 from malikolivier/update_mouse_cursor
Allow mouse cursor to be updated
2018-03-26 19:11:03 +02:00
Malik Olivier Boussejra
813365e6a8 examples: Add support for changing mouse cursor
If ImGui's mouse_draw_cursor is set to `true`, then ImGui draws the
cursor by itself, so this commits hids the OS cursor.

If ImGui's mouse_draw_cursor is set to `false`, then this commits
updates the OS cursor to the value set by the `set_mouse_cursor`
function provided by the ImGui instance.

For our use case, it seems safe to unwrap the result of the call to
glutin::Window::set_cursor_state, as an error can only potentially when
the `Grab` cursor state is used [1]. In ImGui's use case, the `Grab` state
is never used.

[1] https://docs.rs/crate/winit/0.11.2/source/src/platform/linux/x11/window.rs
2018-03-26 17:11:34 +09:00
Malik Olivier Boussejra
785f773966 imgui: Add method to set/get mouse cursor
Include some documentation as well.
2018-03-26 14:04:00 +09:00
Joonas Javanainen
e90a92c582
Merge pull request #106 from malikolivier/master
lib.rs: Add function to know whever Ctrl, Alt or Shift are pressed
2018-03-15 21:17:57 +02:00
Joonas Javanainen
d3261f17bf
Merge pull request #107 from malikolivier/fix-winit-warning
examples: Fix winit deprecation warnings
2018-03-15 21:17:35 +02:00
Malik Olivier Boussejra
e86cd8838d examples: Fix winit deprecation warnings
Since the following pull request
https://github.com/tomaka/winit/pull/319, `winit` has deprecated
`get_inner_size_points()` and `get_inner_size_pixels()`.

We replace the deprecated API by `get_inner_size()` and
`hidpi_factor()`. The size in points in computed from the returned
hidpi_factor.
2018-03-15 21:25:02 +09:00
Malik Olivier Boussejra
42be8d69ed lib.rs: Add function to know whever Ctrl, Alt or Shift are pressed 2018-03-15 14:57:58 +09:00
Joonas Javanainen
bafe886ebb
Merge pull request #99 from shockham/master
Update glium to 0.20
2018-01-31 09:23:41 +02:00
shockham
081b0e7bf4 Update glium to 0.20 in imgui-examples 2018-01-30 12:56:44 +00:00
shockham
4f3ef1cc26 Update glium to 0.20 2018-01-30 12:36:03 +00:00
Joonas Javanainen
e9fecb3c41
Bump version to 0.0.19-pre 2017-12-23 14:25:43 +02:00
Joonas Javanainen
1fc53dbbdb
Release: 0.0.18 2017-12-23 14:14:35 +02:00
Joonas Javanainen
b4ff8411f7
Merge pull request #95 from shawnscode/macro
Use $crate instead of ::imgui.
2017-12-13 12:13:39 +02:00
Joonas Javanainen
8f4440947e
Merge pull request #93 from o01eg/upd-glium
Update glium to 0.19.
2017-12-13 12:13:14 +02:00
Jingkai Mao
bef6702a8f Use $crate instead of ::imgui. 2017-12-13 14:57:53 +08:00
O01eg
822ed103f8
Update glium to 0.19. 2017-12-12 15:03:16 +03:00
Joonas Javanainen
a74a6c05f2
Fix docs.rs badge 2017-11-24 01:03:56 +02:00
Joonas Javanainen
45f3683053
Add docs.rs badge 2017-11-23 22:06:54 +02:00
Joonas Javanainen
6a363840ec
Upgrade to imgui/cimgui 1.52 2017-11-12 23:32:44 +02:00
Joonas Javanainen
3d81002202
Update test_window_impl 2017-11-07 20:43:55 +02:00
Joonas Javanainen
a67f190cd2
Add tooltip functionality and is_item_hovered 2017-11-07 20:04:27 +02:00
Joonas Javanainen
5dda36edc8
Oops, bg_alpha isn't gone yet 2017-11-07 19:09:04 +02:00
Joonas Javanainen
a01a4222f0
Fix changelog links 2017-11-07 19:08:07 +02:00
Joonas Javanainen
d634c1a1ad
Remove various deprecations 2017-11-07 19:00:32 +02:00
Joonas Javanainen
5cfd1e742e
Bump version to 0.0.18-pre 2017-11-07 18:56:22 +02:00
Joonas Javanainen
f6fa2e00f0
Release: 0.0.17 2017-11-07 18:52:58 +02:00
Joonas Javanainen
bafb7e42c6
Fix Rust 1.20 compatibility 2017-11-06 23:08:33 +02:00
Joonas Javanainen
a7581e73c0
Small updates to test_window_impl 2017-11-06 22:53:37 +02:00
Joonas Javanainen
d7e9e17aa3
Clippy fixes 2017-11-06 20:10:39 +02:00
Joonas Javanainen
85f18abeee
Revert "Move hello_gfx example under the gfx renderer crate"
This reverts commit 9b257b9ab60f7f844df6ad219d6d54bfa1047e6e.
2017-11-05 23:17:53 +02:00
Joonas Javanainen
9b257b9ab6
Move hello_gfx example under the gfx renderer crate 2017-11-05 23:06:22 +02:00
Joonas Javanainen
01607f6fca
Upgrade some dependencies 2017-11-05 22:35:52 +02:00
Joonas Javanainen
47a171089e
Add some whitespace 2017-11-05 21:58:53 +02:00
Joonas Javanainen
6f1e29fad9
Use latest cimgui 2017-11-05 21:54:56 +02:00
Joonas Javanainen
947a4e2dbe
Add a color button example 2017-11-05 21:54:56 +02:00
Joonas Javanainen
6695f613df
Color button doesn't use ColorFormat :/ 2017-11-05 21:42:55 +02:00
Joonas Javanainen
ad6a5ada1b
Rename enums EditableColor* -> Color* 2017-11-05 21:42:30 +02:00
Joonas Javanainen
c718bce60d
Add set_color_edit_options 2017-11-04 12:18:09 +02:00
Joonas Javanainen
97fa401fa4
Add ColorButton 2017-11-04 12:14:47 +02:00
Joonas Javanainen
129306c5ba
Update changelog 2017-11-04 11:28:15 +02:00
Joonas Javanainen
76f2089b06
Reformat 2017-11-04 11:17:13 +02:00
Joonas Javanainen
c12d543514
Re-export imgui_sys as sys 2017-11-04 11:14:58 +02:00
Joonas Javanainen
9d47482a11
Add docs, export all config enums 2017-11-04 11:14:44 +02:00
Joonas Javanainen
42150784cb
Fix formatting 2017-11-04 10:44:52 +02:00
Joonas Javanainen
6ac40b1100
Take ref_color by reference 2017-11-04 10:44:16 +02:00
Joonas Javanainen
484e413dda
Use latest cimgui 2017-11-04 10:08:22 +02:00
Joonas Javanainen
c9e5db5aa5
Add ColorPicker widget 2017-11-04 10:08:06 +02:00
Joonas Javanainen
b9e0de93b0
Various ImStr/ImString updates 2017-11-04 09:05:43 +02:00
Joonas Javanainen
b31f649c19
Use igTextUnformatted in Ui::text
We already have a slice so this is faster.
2017-11-02 23:57:35 +02:00
Joonas Javanainen
63ceb71d44
Use an enum instead of two booleans 2017-11-02 23:48:36 +02:00