Benjamin Adamson
0c483e9d44
Use Into<ImVec2> instead of ImVec2 directly
2017-07-08 16:14:19 -07:00
Benjamin Adamson
03c1cccec6
Removed duplicated line from merge
2017-07-08 12:20:48 -07:00
Benjamin Adamson
da0b616f3c
Merge branch 'master' into color-var
2017-07-08 12:03:04 -07:00
Benjamin Adamson
2c53c9ed59
Merge branch 'master' into child-frame
2017-07-08 03:50:41 -07:00
Benjamin Adamson
d71612376c
Implemented feedback.
...
Switch color to using Into idiom.
Updated interface of with_color_vars() per suggestion.
2017-07-08 02:26:27 -07:00
Benjamin Adamson
0f52e197c0
Inline functions on the private functions, not public API.
2017-07-08 02:20:51 -07:00
Benjamin Adamson
23de1746f4
Feedback implemented
2017-07-08 02:15:59 -07:00
Benjamin Adamson
f5ed221b4e
Expose color variable stack to user.
...
In order to have colored and wrapped text, I needed to use this
functionality in my game. This PR implements a version similar to
with_style_var().
From my testing it is safe to use a Vec4 for all the variants of the
enumeration, so I didn't bother putting an enumeration in imgui-rs, I
just reused the enumeration defined in imgui-sys directly.
Let me know if you have any feedback on this.
2017-07-08 02:04:13 -07:00
Benjamin Adamson
6cb0b54539
Expose more functionality from imgui.
...
Implement new_line(), calc_text_size(), and with_style_var_pushed_*()
methods I needed while making a demo.
I'm pretty new to Rust, but ran into this issue and thought I could
maybe solve it while I was learning the library.
https://github.com/Gekkio/imgui-rs/issues/39
I'm curious on your thoughts on these additions. Please LMK if you would
prefer a different direction, I'm pretty new to both Rust and this
library so please let me know if you have any suggestions!
I'm hoping to contribute to this library moving forward, as I work on
my game's UI.
2017-07-08 01:51:11 -07:00
Benjamin Adamson
2f1cc2e9a8
Initial idea for supporting child frame's for windows.
...
Imgui allows the user to create child frame's, and render into them.
This isn't exposed currently, this is my first idea at how rust can
support child frame's.
Presently it's not the easiest to use, to have a window with a child
frame supported, internally the imgui library must have called
beginWindow() for the parent window, before beginChild() is ever called
for the child frame. Doing this without causing unneeded
allocations/complexity, and making the API ergonomic is something I hope
to work on next / get some feedback on.
2017-07-07 02:30:34 -07:00
Joonas Javanainen
ace021b94a
Let's use encode_utf8
2017-05-12 23:35:43 +03:00
Joonas Javanainen
c6343d207b
ImString/ImStr fixes
2017-05-12 23:25:17 +03:00
ostrosco
3dc807473b
- fixing discrepency in pointer type between ARM and other architectures
2017-05-07 00:07:51 -06:00
Joonas Javanainen
cfd887d2ab
Add capacity_with_nul to ImString
2017-04-25 23:26:19 +03:00
Joonas Javanainen
cf587e4de4
Split ImStr to ImStr and ImString
...
It might be better to use the utf8-cstr crate, but it doesn't have the
owned<->borrowed duality, so it would be used as an implementation
detail only.
2017-04-25 23:26:19 +03:00
Joonas Javanainen
eb53a3a3cd
Merge pull request #48 from mulimoen/clippy_warnings
...
Rustfmt and clippy-lints fixes
2017-04-25 22:32:49 +03:00
Magnus Ulimoen
26667ce6ee
Rustfmt and clippy-lints fixes
...
Clippy-lints reveals multiple unnecessary transmutes
2017-04-25 18:20:33 +02:00
Magnus Ulimoen
301b4939f1
Add multi-sliders
2017-04-25 18:00:33 +02:00
Joonas Javanainen
b807b8755e
Basic i32 ID stack manipulation
2017-03-17 21:09:37 +02:00
Joonas Javanainen
ef6cb15c61
Some docs for the item width stuff
2017-03-17 21:06:55 +02:00
andystanton
c1ca4aafe5
Add push/pop item width and convenience function that calls push and pop either side of a closure
2017-03-17 17:29:46 +00:00
Joonas Javanainen
87b31d6601
Reorganize glium support and renderer
2017-02-18 20:54:29 +02:00
Maurice Gilden
fa2ba7f69c
Fixed compile error in example.
2017-02-18 14:40:49 +01:00
Maurice Gilden
e685037314
Formatted with rustfmt.
2017-02-18 11:49:30 +01:00
Maurice Gilden
f98f11fabb
Added support for progress bar.
2017-02-18 11:28:24 +01:00
Joonas Javanainen
aeea0612ac
Reformat with cargo fmt
2017-02-15 20:43:20 +02:00
Joonas Javanainen
373801b9be
Remove deprecated functions
2017-02-15 20:30:36 +02:00
Joonas Javanainen
ca5c6ac2f8
Replace libc dependency with std::os::raw
2017-02-14 20:22:52 +02:00
Joonas Javanainen
61e531fc80
Provide an upgrade path for functions that had a typo
2017-02-14 20:03:26 +02:00
Cameron Hart
bb0d712cac
Exposed button function.
...
Size must be specified versus using the builder pattern.
2016-12-30 16:29:12 +11:00
Cameron Hart
cbe8df8174
Exposed close_current_popup function.
2016-12-30 16:28:35 +11:00
Joonas Haapala
d816b97442
Fix typos in function names
2016-12-10 21:37:57 +02:00
Joonas Javanainen
9c56e48140
Use in-place mutation in builders
...
Since we consume self anyway, this style is much more readable
and might have better performance in non-optimized builds.
2016-08-07 20:01:20 +03:00
Brendan Zabarauskas
3548542ca5
Make hidpi implementation consistent with upstream
2016-06-13 22:22:47 +10:00
Brendan Zabarauskas
ce45b81e8e
Pass Ui struct to render closure instead of raw hidpi factor
2016-06-13 20:20:14 +10:00
Brendan Zabarauskas
f075dde395
Move hidpi_factor into ImGui struct
2016-06-13 14:43:51 +10:00
Brendan Zabarauskas
734eda2d57
Add hidpi support
2016-06-13 14:31:49 +10:00
Joonas Javanainen
b903f65def
Upgrade to imgui/cimgui 1.49
2016-06-12 01:32:19 +03:00
Joonas Javanainen
56f1cb964d
Add rustfmt configuration and reformat
2016-06-10 22:58:50 +03:00
orhanbalci
e89c3b3186
blank lines removed
2016-06-09 14:14:39 +03:00
orhanbalci
63a6184729
plothistogram api wrapper added
2016-06-09 14:13:00 +03:00
Joonas Javanainen
3d3709bd73
Merge pull request #15 from bitshifter/input
...
Exposed more input functionality
2016-06-09 09:14:34 +03:00
Cameron Hart
bbb46c7446
Removed i32 and f32 variants of input and slider.
2016-06-09 08:12:40 +10:00
orhanbalci
2f2fc759c2
typo fixed ofset -> offset
...
stride parameter removed from struct
values_offset type updated to usize
2016-06-08 22:05:10 +03:00
Cameron Hart
27bbe10107
Expose parameters to igSelectable.
2016-06-05 09:51:49 +10:00
Cameron Hart
2a82d19eff
Merge branch 'upstream' into input
2016-06-04 10:44:33 +10:00
orhanbalci
0119c50169
plotlines api added
2016-06-03 21:36:47 +03:00
Joonas Javanainen
2be842968e
Merge pull request #25 from orhanbalci/master
...
combo and list_box api wrapper
2016-05-29 22:47:44 +03:00
Miguel Michelson
7a7de21135
rename args on columns methods in order to be consitent with ig* arg methods
2016-05-28 20:36:47 -03:00
Miguel Michelson
a4dba71d1a
more on formatting
2016-05-28 20:09:05 -03:00