83 Commits

Author SHA1 Message Date
Malik Olivier Boussejra
4f360b8edf [examples] test_window_impl: Add "Close" button to stacked modals
The "Close" button was forgotten in previous commits.
2018-09-28 13:36:15 +09:00
Malik Olivier Boussejra
ae9a79bd50 [examples] test_window_impl: Add "stacked modals" example 2018-09-26 09:50:19 +09:00
Malik Olivier Boussejra
68b1d331b0 [examples] test_window_impl: Add buttons to close modal 2018-09-26 09:50:13 +09:00
Malik Olivier Boussejra
2bec5ae4ed [examples] test_window_impl: Add part of "modals" example 2018-09-26 09:50:10 +09:00
Joonas Javanainen
cc17c0097d
Bump version to 0.0.21-pre 2018-08-13 23:00:40 +03:00
Joonas Javanainen
7824984543
Release: 0.0.20 2018-08-13 22:57:37 +03:00
Joonas Javanainen
c22035250a
Restrict DPI factor to integers in support code
The library still supports fractional DPI factors, but it seems like a
good idea to use integer factors in examples to avoid blurry fonts and
other issues which might give the wrong impression.
2018-08-13 19:00:31 +03:00
Joonas Javanainen
21d85afee0
Remove deprecated things 2018-08-12 20:25:43 +03:00
Joonas Javanainen
2677cb0cb7
Bump version to 0.0.20-pre 2018-08-12 20:21:11 +03:00
Joonas Javanainen
af2171f93a
Release: 0.0.19 2018-08-12 20:17:56 +03:00
Joonas Javanainen
da9ee9302b
Fixes recommended by clippy 2018-08-12 19:20:14 +03:00
Joonas Javanainen
4ad173da3b
Upgrade example project dependencies 2018-08-12 18:59:17 +03:00
Joonas Javanainen
705b913a5d
Add simple font scaling to support code 2018-08-12 14:37:10 +03:00
Joonas Javanainen
319f7aa4c6
Reformat everything 2018-08-12 14:16:56 +03:00
Joonas Javanainen
558e5efe1c
Apply font oversampling in support code
Makes fonts slighty better with HiDPI, but it's not yet the full
solution.
2018-08-12 14:16:21 +03:00
Joonas Javanainen
aa4ae70054
Make HiDPI rendering better
+ use linear filtering in both renderers. Nearest just won't work
  anymore if we have a non-integer scaling factor (which winit can give
  us on 1440p screens for example)
+ pass around FrameSize which has the necessary info with full f64
  precision
+ extra care with conversions to/from f32 and u32 and rounding
2018-08-12 14:16:21 +03:00
Malik Olivier Boussejra
10438c6000 [examples] hello_gfx: Remove dependency on sys crate
Before this commit, hello_gfx was dependent on sys, while it only uses
sys::ImVec4, which is a type that is anyway re-exported by imgui.
2018-08-12 10:50:00 +09:00
Malik Olivier Boussejra
2272fbe5e4 [examples] support_gfx: Remove unused label on loop
This loop is not nested, so the label has no use whatsoever.
2018-08-12 10:44:07 +09:00
Malik Olivier Boussejra
7f6e3ad286 [examples] support: Fix scale bug
The new version of glutin apparently changed the behaviour regarding
HDIPI.
Thanks to the patch submitted by semtexzv [1], this commit fixes the
issue.

[1] b6f5b27883
2018-08-10 14:35:13 +09:00
shockham
b1ebd720e7 Update gfx_window_glutin to 0.25, glium to 0.22 and glutin to 0.17 in imgui-examples and fix errors 2018-07-30 17:44:28 +01:00
OKAMURA, Yasunobu
8c5fc8242e fix typo 2018-07-11 20:02:34 +09:00
OKAMURA, Yasunobu
72ef7f681e fix conflict 2018-06-22 21:28:37 +09:00
Max Bernstein
d24ae372b2
Fix small typo 2018-06-02 22:28:07 -07:00
OKAMURA, Yasunobu
9b283bbad0 Add input_text_multiline 2018-04-30 15:14:31 +09:00
Malik Olivier Boussejra
49ab5c524a [cimgui 1.53.1] test_window_impl: Add "No close" window option
Here is the original commit in Dear ImGui implementating the "No close"
button:

https://github.com/ocornut/imgui/commit/20ba79aa5
2018-04-30 12:13:58 +09:00
Malik Olivier Boussejra
112d21133b [cimgui 1.53.1] Remove ImGuiWindowFlags::ShowBorders 2018-04-30 11:56:10 +09:00
Malik Olivier Boussejra
cf15d49e36 [cimgui 1.53.1] Rename Ui::show_test_window to Ui::show_demo_window 2018-04-29 23:49:26 +09:00
Joonas Javanainen
99aeb18299
Merge pull request #116 from michaelfairley/master
Add drag widgets
2018-04-29 11:57:15 +03:00
Joonas Javanainen
544d7de930
Merge pull request #111 from malikolivier/draw-api
Wraps the dear ImGui custom drawing API
2018-04-29 11:35:23 +03:00
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
Michael Fairley
90c096183c Add drag widgets 2018-04-24 15:22:08 -05:00
Malik Olivier Boussejra
9a9484ff21 ChannelsSplit: Rename channels_set_current to set_current
Fancier API
2018-04-24 13:23:08 +09:00
Malik Olivier Boussejra
95577a0d8c ui: Rename to with_window_draw_list ot get_window_draw_list 2018-04-16 15:14:04 +09:00
Malik Olivier Boussejra
2312f4121a test_drawing_channels_split: Add an example for channels_split
As channels_split may be difficult to understand, this commit adds a simple
example of its usage.
2018-04-16 15:14:04 +09:00
Malik Olivier Boussejra
c27748852d test_window_impl: show_example_app_custom_rendering: Include drawing canvas
Include drawing canvas example into show_example_app_custom_rendering.
The example contains now everything included in the original C++ example
provided with dear imgui.
2018-04-16 15:14:04 +09:00
Malik Olivier Boussejra
ab908106d3 test_window_impl.rs: Add first part half of show_example_app_custom_rendering
show_example_app_custom_rendering is implemented exactly as it is in the
original Dear ImGui in C++. The result should be the same.

The only difference is that `DragFloat`, used to control the size of the
drawings, is not implement as of now.

This example demonstrates how the custom drawing API can be used.
2018-04-16 15:14:04 +09:00
Joonas Javanainen
b6e5086eb2
Merge pull request #112 from Lymia/master
Implement custom fonts.
2018-04-16 08:51:02 +03:00
Edward Barnard
f815daefd3 Update glium to 0.21 2018-04-14 22:38:34 +01:00
Lymia Aluysia
5b2c1f0861
Implement custom fonts. 2018-04-07 20:30:47 -05: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
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
shockham
081b0e7bf4 Update glium to 0.20 in imgui-examples 2018-01-30 12:56:44 +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
O01eg
822ed103f8
Update glium to 0.19. 2017-12-12 15:03:16 +03: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
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