180 Commits

Author SHA1 Message Date
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
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
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
785f773966 imgui: Add method to set/get mouse cursor
Include some documentation as well.
2018-03-26 14:04:00 +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
Jingkai Mao
bef6702a8f Use $crate instead of ::imgui. 2017-12-13 14:57:53 +08:00
Joonas Javanainen
6a363840ec
Upgrade to imgui/cimgui 1.52 2017-11-12 23:32:44 +02:00
Joonas Javanainen
a67f190cd2
Add tooltip functionality and is_item_hovered 2017-11-07 20:04:27 +02:00
Joonas Javanainen
d634c1a1ad
Remove various deprecations 2017-11-07 19:00:32 +02:00
Joonas Javanainen
a7581e73c0
Small updates to test_window_impl 2017-11-06 22:53:37 +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
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
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
Joonas Javanainen
3b87845d6b
Restore color_edit functionality 2017-11-02 23:12:04 +02:00
Joonas Javanainen
f54fae81f1
Deprecate Window::bg_alpha in preparation for 1.52 2017-11-02 22:06:14 +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
3116430f07
Update cimgui to the latest version 2017-11-02 21:32:19 +02:00
Joonas Javanainen
332ef93633
Adapt to 1.51 changes 2017-11-02 21:01:01 +02:00
Joonas Javanainen
8a27431133
Remove deprecated string functions 2017-10-25 21:50:51 +03:00
Joonas Javanainen
0061a209b6
Concat NUL terminator to dynamic strings before format 2017-10-25 20:08:24 +03:00
Joonas Javanainen
5b0bbc011a
Simplify im_str macro 2017-10-24 20:38:15 +03:00
Joonas Javanainen
b609b6fa70 Merge pull request #75 from onelson/master
expose a method to set font_global_scale
2017-09-05 22:36:57 +03:00
Owen Nelson
29bd647f4d expose a method to set font_global_scale 2017-09-04 12:45:25 -07:00
Nick Palmer
bce412d625
Fixed doc tests 2017-09-02 21:54:15 +01:00
Nick Palmer
f5e9382fbe
Removed explicit returns in favour of the rustier implicit style 2017-09-02 20:09:47 +01:00
Nick Palmer
206056fc9f
Return the bool for pressed from the underlying functions and added
comments documenting example use.
2017-09-02 19:59:14 +01:00
Nick Palmer
5dd0079880
Added functions in lib for radios 2017-08-31 23:05:04 +01:00