2022-05-04 19:16:40 +02:00
|
|
|
#include "views/view.hpp"
|
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
|
|
|
void view::heading()
|
|
|
|
{
|
2022-07-06 00:56:32 +08:00
|
|
|
ImGui::SetNextWindowSize({ 300.f, 80.f });
|
2022-05-04 19:16:40 +02:00
|
|
|
ImGui::SetNextWindowPos({ 10.f, 10.f });
|
|
|
|
if (ImGui::Begin("menu_heading", nullptr, window_flags | ImGuiWindowFlags_NoScrollbar))
|
|
|
|
{
|
|
|
|
ImGui::BeginGroup();
|
|
|
|
ImGui::Text("Welcome");
|
|
|
|
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.172f, 0.380f, 0.909f, 1.f));
|
|
|
|
ImGui::Text(g_local_player == nullptr || g_local_player->m_player_info == nullptr ? "unknown" : g_local_player->m_player_info->m_net_player_data.m_name);
|
|
|
|
ImGui::PopStyleColor();
|
|
|
|
ImGui::EndGroup();
|
|
|
|
ImGui::SameLine();
|
2022-07-06 00:56:32 +08:00
|
|
|
ImGui::SetCursorPos({ 300.f - ImGui::CalcTextSize("Unload").x - ImGui::GetStyle().ItemSpacing.x, ImGui::GetStyle().WindowPadding.y / 2 + ImGui::GetStyle().ItemSpacing.y + (ImGui::CalcTextSize("W").y / 2) });
|
2022-05-04 19:16:40 +02:00
|
|
|
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.69f, 0.29f, 0.29f, 1.00f));
|
|
|
|
if (components::nav_button("Unload"))
|
|
|
|
{
|
|
|
|
g_running = false;
|
|
|
|
}
|
|
|
|
ImGui::PopStyleColor();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|