fix(UserSidebar): Fixed height and top offset
This commit is contained in:
parent
f2c1660007
commit
b468eb7549
@ -5,11 +5,12 @@ namespace big
|
||||
{
|
||||
void window::render_user_sidebar()
|
||||
{
|
||||
ImGui::SetNextWindowSize({ 350.f, (float)y }, ImGuiCond_Always);
|
||||
ImGui::SetNextWindowPos({ x - 350.f, 28.f }, ImGuiCond_Always);
|
||||
static const float height_correction = 28.f;
|
||||
ImGui::SetNextWindowSize({ 350.f, (float)y - height_correction }, ImGuiCond_Always);
|
||||
ImGui::SetNextWindowPos({ x - 350.f, height_correction }, ImGuiCond_Always);
|
||||
if (ImGui::Begin("###player_menu", NULL, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoNav))
|
||||
{
|
||||
auto vecButtonWidth = ImVec2(ImGui::GetWindowSize().x, 0.0f);
|
||||
auto vecButtonWidth = ImVec2(ImGui::GetWindowSize().x - 30.f, 0.0f);
|
||||
|
||||
ImGui::TextColored({ 255,255,255,255 }, "YOU:");
|
||||
|
||||
@ -29,6 +30,8 @@ namespace big
|
||||
|
||||
if (ImGui::TreeNode("Friends"))
|
||||
{
|
||||
ImGui::Unindent();
|
||||
|
||||
bool friendInLobby = false;
|
||||
|
||||
for (int i = 0; i < 32; i++)
|
||||
@ -52,12 +55,15 @@ namespace big
|
||||
ImGui::TextColored({ 180,180,180,255 }, " No friends in current lobby.");
|
||||
}
|
||||
|
||||
ImGui::Indent();
|
||||
ImGui::TreePop();
|
||||
ImGui::Separator();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Players"))
|
||||
{
|
||||
ImGui::Unindent();
|
||||
|
||||
for (int i = 0; i < 32; i++)
|
||||
{
|
||||
player player = g_players[i];
|
||||
@ -72,6 +78,7 @@ namespace big
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::Indent();
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user