mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-14 06:58:35 +00:00
[cimgui 1.53.1] Rename ChildWindowRounding to ChildRounding
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.
This commit is contained in:
parent
d4eb0fd33a
commit
3b231d9838
@ -17,6 +17,8 @@
|
||||
- Rename `sys::ImGuiTextBuffer_append()` helper to `appendf()`.
|
||||
- Remove `anti_aliased: bool` final parameter of `sys::ImDrawList_AddPolyline`
|
||||
and `sys::ImDrawList_AddConvexPolyFilled`.
|
||||
- Rename `ImGuiStyleVar::ChildWindowRounding` to `ImGuiStyleVar::ChildRounding`.
|
||||
- Rename `StyleVar::ChildWindowRounding` to `StyleVar::ChildRounding`.
|
||||
|
||||
|
||||
## [0.0.18] - 2017-12-23
|
||||
|
||||
@ -146,7 +146,7 @@ pub enum ImGuiStyleVar {
|
||||
WindowPadding,
|
||||
WindowRounding,
|
||||
WindowMinSize,
|
||||
ChildWindowRounding,
|
||||
ChildRounding,
|
||||
FramePadding,
|
||||
FrameRounding,
|
||||
ItemSpacing,
|
||||
@ -157,6 +157,11 @@ pub enum ImGuiStyleVar {
|
||||
}
|
||||
pub const ImGuiStyleVar_COUNT: usize = 12;
|
||||
|
||||
impl ImGuiStyleVar {
|
||||
#[deprecated(since = "0.0.19", note = "please use ChildRounding instead")]
|
||||
pub const ChildWindowRounding: ImGuiStyleVar = ImGuiStyleVar::ChildRounding;
|
||||
}
|
||||
|
||||
/// A key identifier (ImGui-side enum)
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
|
||||
@ -1203,8 +1203,8 @@ impl<'ui> Ui<'ui> {
|
||||
WindowPadding(v) => unsafe { igPushStyleVarVec(ImGuiStyleVar::WindowPadding, v) },
|
||||
WindowRounding(v) => unsafe { igPushStyleVar(ImGuiStyleVar::WindowRounding, v) },
|
||||
WindowMinSize(v) => unsafe { igPushStyleVarVec(ImGuiStyleVar::WindowMinSize, v) },
|
||||
ChildWindowRounding(v) => unsafe {
|
||||
igPushStyleVar(ImGuiStyleVar::ChildWindowRounding, v)
|
||||
ChildRounding(v) => unsafe {
|
||||
igPushStyleVar(ImGuiStyleVar::ChildRounding, v)
|
||||
},
|
||||
FramePadding(v) => unsafe { igPushStyleVarVec(ImGuiStyleVar::FramePadding, v) },
|
||||
FrameRounding(v) => unsafe { igPushStyleVar(ImGuiStyleVar::FrameRounding, v) },
|
||||
|
||||
10
src/style.rs
10
src/style.rs
@ -6,7 +6,7 @@ pub enum StyleVar {
|
||||
WindowPadding(ImVec2),
|
||||
WindowRounding(f32),
|
||||
WindowMinSize(ImVec2),
|
||||
ChildWindowRounding(f32),
|
||||
ChildRounding(f32),
|
||||
FramePadding(ImVec2),
|
||||
FrameRounding(f32),
|
||||
ItemSpacing(ImVec2),
|
||||
@ -15,3 +15,11 @@ pub enum StyleVar {
|
||||
GrabMinSize(f32),
|
||||
ButtonTextAlign(ImVec2),
|
||||
}
|
||||
|
||||
impl StyleVar {
|
||||
#[allow(non_snake_case)]
|
||||
#[deprecated(since = "0.0.19", note = "please use ChildRounding instead")]
|
||||
pub fn ChildWindowRounding(value: f32) -> Self {
|
||||
StyleVar::ChildRounding(value)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user