dbr
879b9d35af
Add back "_index" versions of all the keyboard related methods
...
Allows accessing the state of any key defined by the IO backend, not just those neatly listed in imgui::Key
Closes #455
2021-03-09 19:53:14 +11:00
dbr
107133c799
Fix functional conflicts
...
- `ui.same_line()` no longer needs the default value specified \o/
- Doctests now actually being run, need to mark a code block as not-Rust
2021-03-09 10:37:32 +11:00
dbr/Ben
965dd87892
Merge branch 'master' into drawimage
2021-03-09 10:27:23 +11:00
Thom Chiovoloni
d0e2be1678
Merge pull request #457 from dbr/imgui-v1.81
2021-03-06 15:49:11 -08:00
Thom Chiovoloni
1c5d8c368c
Actually run doctests in CI, fix failing ones
2021-03-06 07:10:48 -08:00
toyboot4e
9b90f0e9d0
Add doc aliases
2021-03-05 14:00:06 +09:00
dbr
0b5054e939
Remove some Nil suffixes
...
Seems like these are present in the pre-generated bindings but not if calling the generator directly..? Have not looked into closely as to why
2021-03-05 12:06:26 +11:00
Jonathan Spira
8c328001d0
Added ext function variants to the majority of overloaded functions in ImGui
2021-03-04 10:58:30 -08:00
dbr
fbd5353648
Fix up some examples in docs
2021-03-03 15:36:58 +11:00
dbr
507d5d5065
Update to imgui 1.81
...
Changes:
- No more ListBox::calculate_size(...) as this was deprecated upstream
2021-03-03 15:36:28 +11:00
Jonathan Spira
91c8157205
oops inline
2021-02-28 21:29:06 -08:00
Jonathan Spira
468d6c8a33
removed my changelog
2021-02-28 21:29:06 -08:00
Jonathan Spira
0d995a6dfa
Updated changelog and added scare message to the list_clipper.
2021-02-28 21:29:05 -08:00
Jonathan Spira
52b0da64a5
holy god, the suffering
2021-02-28 21:29:05 -08:00
dbr
6b735e9aab
Somehow missed reverting the DrawList prefix from Triangle
2021-02-25 23:08:15 +11:00
dbr
d98e004454
cargo fmt
2021-02-25 21:04:40 +11:00
dbr/Ben
c104e7f104
Merge branch 'master' into drawimage
2021-02-25 13:35:17 +11:00
dbr
caf8c8d95a
Fix doc link to imgui::Image
...
Unsure why but [`imgui::Image`] doesn't work while [`crate::Image`] does
2021-02-24 20:13:07 +11:00
dbr
a4f74624e1
Fix wording in imgui::draw_list docs
2021-02-24 20:07:05 +11:00
dbr
759ed18202
Remove DrawList prefix from widgets
...
The prefix makes things too cluttered and only helps in fairly specific circumstances
2021-02-24 20:06:36 +11:00
dbr
cb742c8a4d
Additional cargo fmt
2021-02-20 20:21:50 +11:00
dbr
6bf75335ed
cargo fmt
2021-02-20 20:21:26 +11:00
dbr
68867ea580
Basic doc onimgui::draw_list module
2021-02-20 20:19:55 +11:00
dbr
20864b53de
Add "DrawList" prefix Line, Rect, Triangle, Circle, BezierCurve
...
Also make their constructers public
For consistency with newly added DrawListImage (which was ambiguous with the Image widget)
2021-02-20 20:03:13 +11:00
dbr
a90989db58
Make draw_list module public
2021-02-20 20:01:26 +11:00
dbr
1a55b4ae24
Add "DrawList" prefix to Image/ImageQuad/ImageRounded
...
Also make their constructions public just in case it leads to neater code in some circumstances
2021-02-20 20:00:53 +11:00
Lukasz Wiklendt
3d3097e222
add input_text hinting
2021-02-18 15:21:30 -08:00
dbr
b3a50e6928
Finally, remove legacy.rs
...
Any use of imgui::ImGuiTreeNodeFlags should be updated to imgui::TreeNodeFlags
2021-02-11 14:33:10 +11:00
dbr
f72e78ddf4
Also move ImGuiInputTextFlags out of legacy.rs as per #445
...
Becomes input_widget::InputTextFlags with Rust-style casing
2021-02-11 14:30:46 +11:00
dbr
714710c681
Move ImDrawCornerFlags out of legacy.rs as per #445
...
Becomes draw_list::CornerFlags with Rust-style casing and documentation as necessary
2021-02-11 14:16:00 +11:00
dbr
74ba0bec36
imgui::legacy::ImGuiDragDropFlags has already been modernised
...
Has been available at imgui::drag_drop::DragDropFlags since implemented
2021-02-11 13:46:26 +11:00
Jonathan Spira
b3f5558557
Oops. Fixed forgotten legacy flags
2021-02-10 17:29:04 -08:00
dbr
e83f71bf82
Fix clippy lint about redundant .into()
2021-02-10 18:24:35 +11:00
dbr
028ebf538f
Make DrawListMut::add_image doc example more concise
...
Longer example code in 'imgui-examples/examples/custom_textures.rs' shows more detailed usage
2021-02-10 17:49:14 +11:00
dbr
eccc537abe
Update link in docs
2021-02-10 14:56:37 +11:00
dbr
00d8180671
Add DrawListMut::add_image and friends
2021-02-10 14:56:26 +11:00
Thom Chiovoloni
34118dce9c
Prep release 0.7.0
2021-02-04 21:04:56 -08:00
Jonathan Spira
6b2983e591
Merge branch 'master' into feat_drag_drop
2021-02-04 00:40:57 -08:00
Jonathan Spira
1983f47941
final
2021-02-04 00:36:47 -08:00
Jonathan Spira
2a1ced631a
Updated
2021-02-03 00:40:10 -08:00
Thom Chiovoloni
d15b97d70f
just ignore all warnings on MouseCursor rather than ignore 4 separate warnings for it
2021-02-01 11:49:44 -08:00
Thom Chiovoloni
aa1cbed2ca
Whoops, rustfmt
2021-02-01 11:49:44 -08:00
Thom Chiovoloni
5be6045cf2
Fix some (nightly-only) clippy lints where they make sense
2021-02-01 11:49:44 -08:00
Thom Chiovoloni
a475ff90e9
rename config_windows_memory_compact_timer => config_memory_compact_timer to match c++
2021-02-01 08:37:31 -08:00
Thom Chiovoloni
f5cb071844
Fix worthwhile tests
2021-02-01 08:37:31 -08:00
Thom Chiovoloni
a359c3940f
Update pointless test
2021-02-01 08:37:31 -08:00
Thom Chiovoloni
53828505ed
Fix compile errors with 1.80 update
2021-02-01 08:37:31 -08:00
Thom Chiovoloni
59970d670e
Constify a large number of fns
2021-02-01 03:00:04 -08:00
Thom Chiovoloni
4f1cde06f2
ImColor changes and improvements:
...
- Renamed to `ImColor32` to avoid confusion with `ImColor` from the C++.
code: https://github.com/ocornut/imgui/blob/9499afdf/imgui.h#L2180
- Eventually I'd probably like to add something mirroring the actual
`ImColor`.
- Now supports construction and access from `const fn` where possible.
- Still impossible for the `f32` APIs
- Now supports `.r`/`.g`/`.b`/.a` field access (read and write), by way
of a new type `imgui::color::ImColor32Fields`, which essentially
exists just to serve this purpose. This is a bit cludgey, but lets us
provide the ability for reading and writing `r/g/b/a` values without
adding many `fn get_r(self) -> u8` and `fn set_r(&mut self, r: u8);`
style functions.
- No longer requires FFI calls to construct from RGB floats.
- This gives much more freedom to the optimizer, as external calls
are impenetrable optimization barriers (It has to pessimistially
assume that they read/write to all globally accessable memory, and
must be called in the exact order that is listed).
- Also, it allows inlining these calls, and avoid computing the same
value twice (if the args are the same).
- Also improves usage from IDEs, debuggers, etc, and avoids a rare
possibility of UB if NaN was passed in (however, this almost
certainly could only cause problems if cross-lang LTO was used,
which I believe we don't support).
- This code is more complex than needed, but was taken from another
project of mine (functions were renamed to line up with imgui's
names), and has good (literally exhaustive) test coverage.
- Unfortunately, float arithmetic in const fn is still not allowed,
so for now these aren't usable `const fn`.
- Added utility constants to mirror the `IM_COL32_WHITE`,
`IM_COL32_BLACK`, `IM_COL32_BLACK_TRANS` constants.
2021-02-01 01:45:39 -08:00
Jonathan Spira
a027c89125
removed bytemuck, made this nice.
2021-01-26 13:53:09 -08:00