mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-17 14:57:27 +08:00
fix(TopBar): Show logged in player
This commit is contained in:
parent
15fab4e78c
commit
b201f761e3
@ -8,14 +8,22 @@
|
|||||||
|
|
||||||
namespace big
|
namespace big
|
||||||
{
|
{
|
||||||
|
static char* player_name = "";
|
||||||
|
|
||||||
void gui::render_top_bar()
|
void gui::render_top_bar()
|
||||||
{
|
{
|
||||||
if (ImGui::BeginMainMenuBar())
|
if (ImGui::BeginMainMenuBar())
|
||||||
{
|
{
|
||||||
if (ImGui::BeginMenu("Info"))
|
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("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?"))
|
if (ImGui::MenuItem("Am I lobby host?"))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user