mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-15 23:48:31 +00:00
[cimgui 1.53.1] Obsolete igSetNextWindowContentWidth
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)
This commit is contained in:
parent
8d3e1a82fc
commit
d2e6d41619
@ -12,6 +12,8 @@
|
||||
`sys::igIsWindowFocused(ImGuiFocusedFlags::RootAndChildWindows)`.
|
||||
- Obsolete `sys::igIsRootWindowOrAnyChildHovered()` in favor of using
|
||||
`sys::igIsWindowHovered(ImGuiHoveredFlags::RootAndChildWindows)`.
|
||||
- Obsolete `sys::SetNextWindowContentWidth()` in favor of using
|
||||
`sys::igSetNextWindowContentSize()`.
|
||||
|
||||
|
||||
## [0.0.18] - 2017-12-23
|
||||
|
||||
@ -930,7 +930,6 @@ extern "C" {
|
||||
custom_callback_data: *mut c_void,
|
||||
);
|
||||
pub fn igSetNextWindowContentSize(size: ImVec2);
|
||||
pub fn igSetNextWindowContentWidth(width: c_float);
|
||||
pub fn igSetNextWindowCollapsed(collapsed: bool, cond: ImGuiCond);
|
||||
pub fn igSetNextWindowFocus();
|
||||
pub fn igSetWindowPos(pos: ImVec2, cond: ImGuiCond);
|
||||
@ -963,6 +962,15 @@ pub unsafe fn igSetNextWindowPosCenter(cond: ImGuiCond) {
|
||||
let pivot = ImVec2::new(0.5, 0.5);
|
||||
igSetNextWindowPos(pos, cond, pivot);
|
||||
}
|
||||
/// Set next window content's width.
|
||||
///
|
||||
/// Original non-deprecated version preserved last Y value set by
|
||||
/// [`igSetNextWindowContentSize`].
|
||||
#[allow(non_snake_case)]
|
||||
#[deprecated(since = "0.0.19", note = "please use igSetNextWindowContentSize instead")]
|
||||
pub unsafe fn igSetNextWindowContentWidth(width: c_float) {
|
||||
igSetNextWindowContentSize(ImVec2 { x: width, y: 0.0 })
|
||||
}
|
||||
|
||||
// Parameter stack (shared)
|
||||
extern "C" {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user