46 Commits

Author SHA1 Message Date
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
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
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
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
47a171089e
Add some whitespace 2017-11-05 21:58:53 +02:00
Joonas Javanainen
947a4e2dbe
Add a color button example 2017-11-05 21:54:56 +02:00
Joonas Javanainen
ad6a5ada1b
Rename enums EditableColor* -> Color* 2017-11-05 21:42:30 +02:00
Joonas Javanainen
6ac40b1100
Take ref_color by reference 2017-11-04 10:44:16 +02:00
Joonas Javanainen
c9e5db5aa5
Add ColorPicker widget 2017-11-04 10:08:06 +02:00
Joonas Javanainen
9a82e127dc
Add some color_edit sample code 2017-11-02 23:44:53 +02:00
Joonas Javanainen
3b87845d6b
Restore color_edit functionality 2017-11-02 23:12:04 +02:00
Joonas Javanainen
907f9dbdeb
Reformat with rustfmt 0.9.0 2017-11-02 22:01:02 +02:00
Joonas Javanainen
f92e21bf30
Upgrade to bitflags 1.0 and namespacing 2017-11-02 21:52:43 +02:00
Joonas Javanainen
332ef93633
Adapt to 1.51 changes 2017-11-02 21:01:01 +02:00
Nick Palmer
5dd0079880
Added functions in lib for radios 2017-08-31 23:05:04 +01:00
Joonas Javanainen
8621bbf116
Better shaders 2017-08-05 15:45:22 +03:00
Joonas Javanainen
51329d5938
Remove unimplemented resize handler
It doesn't seem to be necessary at all with glium.
2017-07-30 18:47:43 +03:00
Brendan Zabarauskas
f33567a1dc Update glutin and dependencies that rely on it 2017-07-22 17:25:55 +10:00
Joonas Javanainen
68fec8a870
Upgrade to gfx 0.16 2017-06-17 14:23:47 +03:00
Joonas Javanainen
16d19c1855
Update render target after a resize 2017-06-17 13:23:15 +03:00
Joonas Javanainen
719a1a3317
Wrap gfx renderer errors 2017-06-17 13:17:48 +03:00
Joonas Javanainen
4ee27d149c
Initial working but dirty gfx renderer 2017-06-17 13:17:48 +03:00
Joonas Javanainen
ef9b4e2db8
Move the examples once again 2017-04-29 19:46:08 +03:00