41 constexpr float left = 133.0f;
42 constexpr float tabHeight = 16.0f;
44 auto& players = panels[
Players];
45 const float rowWidth = left + panels[
Biometer].width + 3.0f + chat.width +
47 chat.width = std::floor((std::max)(minimumChatWidth, chat.width - (std::max)(0.0f, rowWidth - width)));
49 float x = left, rowTop = 0, rowHeight = 0;
50 const auto place = [&](
int id,
float groupWidth,
float topInset)
52 auto& panel = panels[id];
53 if (x > left && x + groupWidth > width)
56 rowTop += rowHeight + 8.0f;
59 panel.x =
Fit(x, groupWidth, width);
60 panel.y = rowTop + topInset;
61 rowHeight = (std::max)(rowHeight, topInset + panel.height);
62 x = panel.x + groupWidth;
69 players.x = chat.x + chat.width;
70 players.y = chat.y + tabHeight;
71 rowHeight = (std::max)(rowHeight, tabHeight + players.height);
77 auto& people = panels[
People];
79 people.y = height - (
ReferenceHeight - 1018.0f - 184.0f) - people.height;
85 configuration.x = 136.0f;
86 configuration.y = (height - configuration.height) * (317.0f / (
ReferenceHeight - 568.0f));
88 information.x = (width - information.width) * (712.0f / (
ReferenceWidth - 256.0f));
89 information.y = (height - information.height) * (429.0f / (
ReferenceHeight - 232.0f));
91 for (
auto& panel : panels)
93 panel.x =
Fit(panel.x, panel.width, width);
94 panel.y =
Fit(panel.y, panel.height, height);
97 chat.y =
Fit(chat.y, (std::max)(chat.height, tabHeight + players.height), height);
98 players.y = chat.y + tabHeight;