fix(TopBar): Show logged in player

This commit is contained in:
Yimura 2021-01-15 22:30:57 +01:00
parent d2692544de
commit 21820555dc
No known key found for this signature in database
GPG Key ID: 54EFAD29393A6E78

View File

@ -8,14 +8,22 @@
namespace big
{
static char* player_name = "";
void gui::render_top_bar()
{
if (ImGui::BeginMainMenuBar())
{
if (ImGui::BeginMenu("Info"))
{
if (strlen(player_name) == 0)
QUEUE_JOB_BEGIN_CLAUSE(&)
{
player_name = (char*)PLAYER::GET_PLAYER_NAME(g_playerId);
}QUEUE_JOB_END_CLAUSE
ImGui::MenuItem("Logged in as:", NULL, false, false);
ImGui::MenuItem(g_players[g_playerId].name, NULL, false, false);
ImGui::MenuItem(player_name, NULL, false, false);
if (ImGui::MenuItem("Am I lobby host?"))
{