mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-25 12:28:35 +00:00
Merge pull request #158 from malikolivier/patch-wrap-get_window_pos
Wrap igGetWindowPos and update CHANGELOG
This commit is contained in:
commit
b98e57d055
@ -5,6 +5,10 @@
|
|||||||
### Added
|
### Added
|
||||||
|
|
||||||
- `ImGui::mouse_down`
|
- `ImGui::mouse_down`
|
||||||
|
- `Ui::get_window_pos`
|
||||||
|
- `Ui::is_window_focused`
|
||||||
|
- `Ui::is_root_window_focused`
|
||||||
|
- `Ui::is_child_window_focused`
|
||||||
- `imgui-glutin-support` crate
|
- `imgui-glutin-support` crate
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@ -604,6 +604,14 @@ impl<'ui> Ui<'ui> {
|
|||||||
}
|
}
|
||||||
(out.x, out.y)
|
(out.x, out.y)
|
||||||
}
|
}
|
||||||
|
/// Get current window's position in pixels
|
||||||
|
pub fn get_window_pos(&self) -> (f32, f32) {
|
||||||
|
let mut out = ImVec2::new(0.0, 0.0);
|
||||||
|
unsafe {
|
||||||
|
sys::igGetWindowPos(&mut out);
|
||||||
|
}
|
||||||
|
(out.x, out.y)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Layout
|
// Layout
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user