Added new flags to ItemHoveredFlags, added documentation to new pub members of io

This commit is contained in:
Robin Quint 2022-12-22 15:41:27 +01:00
parent 1a1ea098c1
commit a8e2fb4fb4
2 changed files with 7 additions and 0 deletions

View File

@ -160,7 +160,9 @@ pub struct Io {
/// When holding a key/button, rate at which it repeats, in seconds
pub key_repeat_rate: f32,
/// Delay on hover before [`ui.is_item_hovered_with_flags(ItemHoveredFlags::DELAY_NORMAL)`](crate::Ui::is_item_hovered_with_flags) returns true
pub hover_delay_normal: f32,
/// Delay on hover before [`ui.is_item_hovered_with_flags(ItemHoveredFlags::DELAY_SHORT)`](crate::Ui::is_item_hovered_with_flags) returns true
pub hover_delay_short: f32,
user_data: *mut c_void,
@ -206,9 +208,12 @@ pub struct Io {
/// * Double-click selects by word instead of selecting the whole text
/// * Multi-selection in lists uses Cmd/Super instead of Ctrl
pub config_mac_os_behaviors: bool,
/// Enable input queue trickling: some types of events submitted during the same frame (e.g. button down + up)
/// will be spread over multiple frames, improving interactions with low framerates.
pub config_input_trickle_event_queue: bool,
/// Set to false to disable blinking cursor
pub config_input_text_cursor_blink: bool,
/// Pressing Enter will keep item active and select contents (single-line only).
pub config_input_text_enter_keep_active: bool,
/// Enable turning DragXXX widgets into text input with a simple mouse
/// click-release (without moving). Not desirable on devices without a

View File

@ -21,6 +21,8 @@ bitflags! {
/// Return true even if the item is disabled
const ALLOW_WHEN_DISABLED = sys::ImGuiHoveredFlags_AllowWhenDisabled;
const RECT_ONLY = sys::ImGuiHoveredFlags_RectOnly;
const DELAY_NORMAL = sys::ImGuiHoveredFlags_DelayNormal;
const DELAY_SHORT = sys::ImGuiHoveredFlags_DelayShort;
}
}