feat(Player): Added info tab
This commit is contained in:
parent
0ab4092d40
commit
24e2db3d0d
12
BigBaseV2/src/gui/window/player/player_tabs.hpp
Normal file
12
BigBaseV2/src/gui/window/player/player_tabs.hpp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "common.hpp"
|
||||||
|
#include "imgui.h"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
class tab_player
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static void tab_info();
|
||||||
|
};
|
||||||
|
}
|
14
BigBaseV2/src/gui/window/player/tab_info.cpp
Normal file
14
BigBaseV2/src/gui/window/player/tab_info.cpp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#include "player_tabs.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
void tab_player::tab_info()
|
||||||
|
{
|
||||||
|
if (ImGui::BeginTabItem("Info"))
|
||||||
|
{
|
||||||
|
ImGui::Checkbox("Spectate", &g.player.spectating);
|
||||||
|
|
||||||
|
ImGui::EndTabItem();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +1,4 @@
|
|||||||
|
#include "player/player_tabs.hpp"
|
||||||
#include "gui/window.hpp"
|
#include "gui/window.hpp"
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
|
|
||||||
@ -15,11 +16,9 @@ namespace big
|
|||||||
ImGui::SetNextWindowSize({ 350.f, 300.f }, ImGuiCond_FirstUseEver);
|
ImGui::SetNextWindowSize({ 350.f, 300.f }, ImGuiCond_FirstUseEver);
|
||||||
if (g.window.player && ImGui::Begin(title, &g.window.player))
|
if (g.window.player && ImGui::Begin(title, &g.window.player))
|
||||||
{
|
{
|
||||||
/*ImGui::BeginTabBar("tabbar_player");
|
ImGui::BeginTabBar("tabbar_player");
|
||||||
|
tab_player::tab_info();
|
||||||
ImGui::EndTabBar();*/
|
ImGui::EndTabBar();
|
||||||
|
|
||||||
ImGui::Checkbox("Spectate", &g.player.spectating);
|
|
||||||
|
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user