403 Commits

Author SHA1 Message Date
Jay Oster
96b6f6b59c Fix color scheme with gfx
- gfx uses an sRGB framebuffer, which means it expects all vertex colors to be in linear space
- imgui provides vertex colors in sRGB space! This causes the appearance of washed out colors
- Fix the color space conflict by converting the imgui colors to linear space
2018-04-26 20:04:40 -07:00
Jay Oster
1d64e4e185 Update gfx
- Fixes the screen resolution and mouse coordinates on macOS
- Fixes the blurry font by using linear filtering on the texture sampler
2018-04-26 20:01:54 -07:00
Joonas Javanainen
b6e5086eb2
Merge pull request #112 from Lymia/master
Implement custom fonts.
2018-04-16 08:51:02 +03:00
Joonas Javanainen
a662155972
Merge pull request #110 from malikolivier/add-miscellaneous-wrappers
Add some helper functions: mouse_delta, get_window_size, is_item_active
2018-04-16 08:49:12 +03:00
Joonas Javanainen
282c5dfd2d
Merge pull request #114 from ebarnard/update-glium
Update glium to 0.21
2018-04-16 08:45:55 +03:00
Edward Barnard
f815daefd3 Update glium to 0.21 2018-04-14 22:38:34 +01:00
Malik Olivier Boussejra
1a1fe3bad5 Wrap get_text_line_height_with_spacing && get_item_rect_size 2018-04-13 14:27:22 +00:00
Malik Olivier Boussejra
43ea9a9693 Wrap BeginGroup / EndGroup 2018-04-13 14:19:37 +00:00
Malik Olivier Boussejra
6515779000 Wrap utilities to get and set Ui's cursor
This utilities are set_cursor_screen_pos, set_cursor_pos, get_cursor_screen_pos
and get_cursor_pos.
2018-04-13 14:12:29 +00:00
Malik Olivier Boussejra
435eeaf892 imgui: Add with_style_and_color_vars convenient function
Wraps with_style_vars and with_color_vars inside a single call.
2018-04-13 13:49:06 +00:00
Malik Olivier Boussejra
4ccae8bc10 Revert "imgui: Add get_window_width, get_window_height helper functions"
This reverts commit 0d10358942409cf8fad6fcb730dbedfbd7149df7.

`get_window_size` already exists and it's very easy to get just one
of the dimentions. As a result, delete get_window_width and
get_window_height.
2018-04-13 13:46:27 +00:00
Lymia Aluysia
c5775ef53c
Adjust custom font functions to use Into with ImVec2. 2018-04-13 04:26:16 -05:00
Lymia Aluysia
228192bb9b
Use f32 instead of f64 for font sizes/etc for consistancy with imgui. 2018-04-13 04:21:01 -05:00
Lymia Aluysia
5b2c1f0861
Implement custom fonts. 2018-04-07 20:30:47 -05:00
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
0d10358942 imgui: Add get_window_width, get_window_height helper functions 2018-03-26 17:21:27 +09:00
Malik Olivier Boussejra
d6897b1556 ImGui: Add safe wrapper around igGetWindowSize 2018-03-26 17:17:46 +09:00
Malik Olivier Boussejra
72ddc788b1 imgui: Ui: Add is_item_active 2018-03-26 17:17:02 +09:00
Malik Olivier Boussejra
abbbfdfa79 imgui: Add mouse_delta 2018-03-26 17:17:02 +09: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