gui changes: slider size now includes the textbox, combobox size now includes the droparrow, editor gui rearrangement

This commit is contained in:
Turánszki János
2025-05-30 08:50:26 +02:00
parent 0c514a1937
commit 1be929aa8a
38 changed files with 184 additions and 264 deletions
+17 -2
View File
@@ -87,8 +87,23 @@ void MaterialPickerWindow::ResizeLayout()
return;
}
zoomSlider.SetPos(XMFLOAT2(55, 0));
zoomSlider.SetSize(XMFLOAT2(GetWidgetAreaSize().x - 100 - 5, 20));
const float padding = 4;
float width = GetWidgetAreaSize().x - padding * 2;
float y = padding;
float jump = 20;
float x_off = 100;
auto add = [&](wi::gui::Widget& widget) {
if (!widget.IsVisible())
return;
const float margin_left = 55;
widget.SetPos(XMFLOAT2(margin_left, y));
widget.SetSize(XMFLOAT2(width - margin_left - padding, widget.GetScale().y));
y += widget.GetSize().y;
y += padding;
};
add(zoomSlider);
wi::gui::Theme theme;
theme.image.CopyFrom(sprites[wi::gui::IDLE].params);