Player UI tweaks (#1489)

* Redesigned Player UI

* Formatting
This commit is contained in:
DayibBaba
2023-06-22 10:11:56 +02:00
committed by GitHub
parent 9201cc363b
commit b96fddd8d0
11 changed files with 306 additions and 234 deletions

View File

@ -6,7 +6,9 @@ namespace big
{
void view::player_kick()
{
if (ImGui::TreeNode("KICK"_T.data()))
ImGui::BeginGroup();
components::sub_title("Kick");
if (ImGui::ListBoxHeader("##kick", get_listbox_dimensions()))
{
auto const is_session_host = [] {
return gta_util::get_network()->m_game_session_ptr->is_host();
@ -14,7 +16,7 @@ namespace big
ImGui::Text("Host/breakup kick require Host");
ImGui::BeginDisabled(!g_player_service->get_self()->is_host());
components::player_command_button<"hostkick">(g_player_service->get_selected());
components::player_command_button<"breakup">(g_player_service->get_selected());
@ -35,7 +37,9 @@ namespace big
ImGui::SameLine();
components::player_command_button<"desync">(g_player_service->get_selected());
ImGui::TreePop();
ImGui::ListBoxFooter();
}
ImGui::EndGroup();
}
}