diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index 9456cf1..5eedb94 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -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 diff --git a/imgui-sys/src/lib.rs b/imgui-sys/src/lib.rs index 030dc01..0997d2f 100644 --- a/imgui-sys/src/lib.rs +++ b/imgui-sys/src/lib.rs @@ -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" {