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.
- 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
Since there are no mutable borrows in the WindowDrawList API, we can remove all
draw functions from ChannelsSplit and just use the same `draw_list' all
the time, as shown in the `WindowDrawList::channels_split` example.
This approach makes the `DrawAPI` trait pointless so it can be removed, and
ChannelsSplit is reduced to a type with just one function:
`set_current`.