You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version: 1.75
Branch: imgui-rs (Rust binding), version 0.4
Back-end: Custom
My Issue/Question:
I'm attempting to position a stack of windows in the bottom-left corner of the screen. I position the first window with a pivot of [0.0, 1.0] and a condition of Always. I measure that window's height, and then position my second window just above it, with the same pivot and condition.
Expected behaviour: When collapsed, the first window should reposition itself so that the bottom-left corner of its titlebar lines up with the bottom-left corner of the screen.
Observed behaviour: When collapsed, the first window retains its current position, causing it to overlap with the second window.
Example:
const PADDING: f32 = 30.0;
let window1 = Window::new(&ImString::new("Window 1"))
.position([PADDING, screen_height - PADDING], Condition::Always)
.position_pivot([0.0, 1.0])
.movable(false)
.resizable(false)
.begin(&ui);
let mut window1_size = [0.0, 0.0];
if let Some(window1) = window1 {
ui.text("Window 1 Contents");
window1_size = ui.window_size();
window1.end(&ui);
}
let window2 = Window::new(&ImString::new("Window 2"))
.position([PADDING, screen_height - window1_size[1] - PADDING * 2.0], Condition::Always)
.position_pivot([0.0, 1.0])
.movable(false)
.resizable(false)
.begin(&ui);
if let Some(window2) = window2 {
ui.text("Window 2 Contents");
window2.end(&ui);
}
The text was updated successfully, but these errors were encountered:
Version/Branch of Dear ImGui:
Version: 1.75
Branch:
imgui-rs
(Rust binding), version 0.4Back-end: Custom
My Issue/Question:
I'm attempting to position a stack of windows in the bottom-left corner of the screen. I position the first window with a pivot of
[0.0, 1.0]
and a condition ofAlways
. I measure that window's height, and then position my second window just above it, with the same pivot and condition.Expected behaviour: When collapsed, the first window should reposition itself so that the bottom-left corner of its titlebar lines up with the bottom-left corner of the screen.
Observed behaviour: When collapsed, the first window retains its current position, causing it to overlap with the second window.
Example:
The text was updated successfully, but these errors were encountered: