Add deprecation warning for each renamed variant.
However, it will just fail to compile if the deprecated variant is used
inside a match statement. It is not possible to make aliases of variants
in Rust.
There is no way I know of to make a deprecation warning in such a case.
Code that uses ImDrawList_AddPolyline or ImDrawList_AddConvexPolyFilled will
break.
This commit does not include deprecation warning.
Indeed, defining a `ImGuiTextBuffer_append` function with a deprecation
warning would require to write a variadic function in rust. However,
this is impossible, and the FFI rust doc says so:
https://doc.rust-lang.org/book/first-edition/ffi.html#variadic-functions
Dear ImGui did not deprecate `append()`, they simply renamed it too.
There is a small change of behaviour: previous height value is not
preserved when igSetNextWindowContentWidth is used. There is no way
around it unless we mess with imgui's internals.
Official Dear ImGui chose this easy solution as well:
static inline void SetNextWindowContentWidth(float w) { SetNextWindowContentSize(ImVec2(w, 0.0f)); }
429f48bb4f/imgui.h (L1132)
Update struct for ImGuiHoveredFlags.
NB: igIsWindowHovered, and thus igIsRootWindowOrAnyChildHovered, are
broken now because of a bug.
The fix is commited upstream, but not released yet.
baebcfcfaf
I guess nothing can be done but wait for the next cimgui release.
Update cimgui, fixing #97 and #88.
As a side note, the previous version has some compiler warning showing
up during build:
warning: third-party/cimgui/imgui/imgui.cpp: In function ‘void ImGui::RenderTriangle(ImVec2, ImGuiDir, float)’:
warning: third-party/cimgui/imgui/imgui.cpp:3136:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
warning: r = -r; // ...fall through, no break!
warning: ~~^~~~
The new version has no warning.
This patch uses bitflags to set the whether the corners are rounded.
Hence the `ImDrawCornerFlags` struct is defined, but only used
internally.
Externally, the valule of the flags can be changed with methods on the
`Rect` structure such as `round_top_right` or `round_bot_left`.
This patch wraps both ImDrawList_AddRectFilled and ImDrawList_AddRect.
ImDrawList_AddRectFilled is seen as a particular case of `add_rect`
where `filled` is set to `true`.