1 573
if (Config.CNCTEAMGameInfo) {
auto world = GetWorld();
if (!world || !world->GameState) return;
auto i = world->GameState;
if (i->IsA(ASTExtraGameStateBase::StaticClass())) {
auto InGame = (ASTExtraGameStateBase*)i;
float infoX = glWidth / 2.0f - 700.0f;
float infoY = 500.0f;
float boxW = 260.0f;
float boxH = 190.0f;
float textSize = density / 25.0f; // .Z/G
draw->AddRectFilled(ImVec2(infoX, infoY), ImVec2(infoX + boxW, infoY + boxH),
IM_COL32(0, 0, 0, 200), 8.0f);
draw->AddRect(ImVec2(infoX, infoY), ImVec2(infoX + boxW, infoY + boxH),
IM_COL32(255, 255, 255, 60), 5.0f);
draw->AddText(NULL, textSize + 1.0f, ImVec2(infoX + 10, infoY + 8),
IM_COL32(255, 255, 255, 255), "CNC TEAM - GAME STATUS");
// Dấu gạch ngang (Ngăn cách tiêu đề và thông tin)
draw->AddLine(ImVec2(infoX + 10, infoY + 35), ImVec2(infoX + boxW - 20, infoY + 35),
IM_COL32(255, 255, 255, 80), 1.0f);
auto DrawInfo = [&](const char* label, const std::string& value, float yOffset, ImU32 colorL, ImU32 colorV) {
draw->AddText(NULL, textSize, ImVec2(infoX + 12, infoY + yOffset), colorL, label); // male about
draw->AddText(NULL, textSize, ImVec2(infoX + 145, infoY + yOffset), colorV, value.c_str());
};
DrawInfo("Total Match ID ", std::to_string((int)InGame->GameID), 40, IM_COL32(180,180,180,255), IM_COL32(255,255,255,255));
DrawInfo("Total Team Mode ", std::to_string((int)InGame->PlayerNumPerTeam),60, IM_COL32(180,180,180,255), IM_COL32(0,255,150,255));
DrawInfo("Total Alive Players ", std::to_string((int)InGame->AlivePlayerNum), 80, IM_COL32(180,180,180,255), IM_COL32(0,200,255,255));
DrawInfo("Total Real Players ", std::to_string((int)InGame->PlayerNum), 100,IM_COL32(180,180,180,255), IM_COL32(255,220,220,255));
DrawInfo("Total Teams Rem ", std::to_string((int)InGame->AliveTeamNum), 120,IM_COL32(180,180,180,255), IM_COL32(255,150,0,255));
std::string matchTime = std::to_string((int)InGame->ElapsedTime) + "s | " +
std::to_string((int)InGame->ElapsedTime / 60) + "m";
DrawInfo("Match Time ID ", matchTime, 140,IM_COL32(180,180,180,255), IM_COL32(200,255,150,255));
}
}27 Iyun, 02:40
28 Iyul, ~03:00
