mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-26 12:59:00 +00:00
Apply some missing 1.76 changes
This commit is contained in:
parent
89712e1f3d
commit
8fa58fb52c
@ -265,9 +265,9 @@ pub struct Io {
|
|||||||
///
|
///
|
||||||
/// *Important*: You need to clear this flag yourself
|
/// *Important*: You need to clear this flag yourself
|
||||||
pub want_save_ini_settings: bool,
|
pub want_save_ini_settings: bool,
|
||||||
/// Directional navigation is currently allowed
|
/// Keyboard/Gamepad navigation is currently allowed
|
||||||
pub nav_active: bool,
|
pub nav_active: bool,
|
||||||
/// Directional navigation is visible and allowed
|
/// Keyboard/Gamepad navigation is visible and allowed
|
||||||
pub nav_visible: bool,
|
pub nav_visible: bool,
|
||||||
/// Application framerate estimation, in frames per second.
|
/// Application framerate estimation, in frames per second.
|
||||||
///
|
///
|
||||||
|
|||||||
@ -112,6 +112,8 @@ bitflags! {
|
|||||||
const NO_SIDE_PREVIEW = sys::ImGuiColorEditFlags_NoSidePreview;
|
const NO_SIDE_PREVIEW = sys::ImGuiColorEditFlags_NoSidePreview;
|
||||||
/// ColorEdit: disable drag and drop target. ColorButton: disable drag and drop source.
|
/// ColorEdit: disable drag and drop target. ColorButton: disable drag and drop source.
|
||||||
const NO_DRAG_DROP = sys::ImGuiColorEditFlags_NoDragDrop;
|
const NO_DRAG_DROP = sys::ImGuiColorEditFlags_NoDragDrop;
|
||||||
|
/// ColorButton: disable border (which is enforced by default).
|
||||||
|
const NO_BORDER = sys::ImGuiColorEditFlags_NoBorder;
|
||||||
|
|
||||||
/// ColorEdit, ColorPicker: show vertical alpha bar/gradient in picker.
|
/// ColorEdit, ColorPicker: show vertical alpha bar/gradient in picker.
|
||||||
const ALPHA_BAR = sys::ImGuiColorEditFlags_AlphaBar;
|
const ALPHA_BAR = sys::ImGuiColorEditFlags_AlphaBar;
|
||||||
@ -574,10 +576,19 @@ impl<'a> ColorButton<'a> {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
/// Enables/disables using the button as drag&drop source.
|
/// Enables/disables using the button as drag&drop source.
|
||||||
|
///
|
||||||
|
/// Enabled by default.
|
||||||
pub fn drag_drop(mut self, value: bool) -> Self {
|
pub fn drag_drop(mut self, value: bool) -> Self {
|
||||||
self.flags.set(ColorEditFlags::NO_DRAG_DROP, !value);
|
self.flags.set(ColorEditFlags::NO_DRAG_DROP, !value);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
/// Enables/disables the button border.
|
||||||
|
///
|
||||||
|
/// Enabled by default.
|
||||||
|
pub fn border(mut self, value: bool) -> Self {
|
||||||
|
self.flags.set(ColorEditFlags::NO_BORDER, !value);
|
||||||
|
self
|
||||||
|
}
|
||||||
/// Sets the button size.
|
/// Sets the button size.
|
||||||
///
|
///
|
||||||
/// Use 0.0 for width and/or height to use the default size.
|
/// Use 0.0 for width and/or height to use the default size.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user