slight menu redesign + ui changes

some misc menu fixes
-this may change further in the future if it's possible to erase elements in imgui
This commit is contained in:
rei-2 committed 2024-10-27 02:30:31 -04:00
1 parent 36ac6d183b
commit ee5c860f6e
21 files changed
+2540 -2314

No files matched your search

+1 -1
View File
@@ -461,7 +461,7 @@ bool CConfigs::LoadConfig(const std::string& configName, bool bNotify)
}
}
H::Fonts.Reload(Vars::Menu::DPI.Map[DEFAULT_BIND]);
H::Fonts.Reload(Vars::Menu::Scale.Map[DEFAULT_BIND]);
sCurrentConfig = configName; sCurrentVisuals = "";
if (bNotify)
+19 -19
View File
@@ -437,14 +437,14 @@ void CCritHack::Draw(CTFPlayer* pLocal)
const auto& fFont = H::Fonts.GetFont(FONT_INDICATORS);
EAlign align = ALIGN_TOP;
if (x <= (100 + 50 * Vars::Menu::DPI.Value))
if (x <= (100 + 50 * Vars::Menu::Scale.Value))
{
x -= 42 * Vars::Menu::DPI.Value;
x -= 42 * Vars::Menu::Scale.Value;
align = ALIGN_TOPLEFT;
}
else if (x >= H::Draw.m_nScreenW - (100 + 50 * Vars::Menu::DPI.Value))
else if (x >= H::Draw.m_nScreenW - (100 + 50 * Vars::Menu::Scale.Value))
{
x += 42 * Vars::Menu::DPI.Value;
x += 42 * Vars::Menu::Scale.Value;
align = ALIGN_TOPRIGHT;
}
@@ -458,11 +458,11 @@ void CCritHack::Draw(CTFPlayer* pLocal)
if (tStorage.m_flDamage > 0)
{
if (pLocal->IsCritBoosted())
H::Draw.String(fFont, x, y, { 100, 255, 255, 255 }, align, "Crit Boosted");
H::Draw.StringOutlined(fFont, x, y, { 100, 255, 255, 255 }, { 0, 0, 0, 255 }, align, "Crit Boosted");
else if (pWeapon->m_flCritTime() > flTickBase)
{
const float flTime = pWeapon->m_flCritTime() - flTickBase;
H::Draw.String(fFont, x, y, { 100, 255, 255, 255 }, align, std::format("Streaming crits {:.1f}s", flTime).c_str());
H::Draw.StringOutlined(fFont, x, y, { 100, 255, 255, 255 }, { 0, 0, 0, 255 }, align, std::format("Streaming crits {:.1f}s", flTime).c_str());
}
else if (!m_bCritBanned)
{
@@ -471,34 +471,34 @@ void CCritHack::Draw(CTFPlayer* pLocal)
if (bRapidFire && flTickBase < pWeapon->m_flLastRapidFireCritCheckTime() + 1.f)
{
const float flTime = pWeapon->m_flLastRapidFireCritCheckTime() + 1.f - flTickBase;
H::Draw.String(fFont, x, y, Vars::Menu::Theme::Active.Value, align, std::format("Wait {:.1f}s", flTime).c_str());
H::Draw.StringOutlined(fFont, x, y, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, std::format("Wait {:.1f}s", flTime).c_str());
}
else
H::Draw.String(fFont, x, y, { 150, 255, 150, 255 }, align, "Crit Ready");
H::Draw.StringOutlined(fFont, x, y, { 150, 255, 150, 255 }, { 0, 0, 0, 255 }, align, "Crit Ready");
}
else
{
const int shots = -tStorage.m_iAvailableCrits;
H::Draw.String(fFont, x, y, { 255, 150, 150, 255 }, align, shots == 1 ? std::format("Crit in {} shot", shots).c_str() : std::format("Crit in {}{} shots", shots, shots == 100 ? "+" : "").c_str());
H::Draw.StringOutlined(fFont, x, y, { 255, 150, 150, 255 }, { 0, 0, 0, 255 }, align, shots == 1 ? std::format("Crit in {} shot", shots).c_str() : std::format("Crit in {}{} shots", shots, shots == 100 ? "+" : "").c_str());
}
}
else
H::Draw.String(fFont, x, y, { 255, 150, 150, 255 }, align, std::format("Deal {} damage", m_iDamageTilUnban).c_str());
H::Draw.StringOutlined(fFont, x, y, { 255, 150, 150, 255 }, { 0, 0, 0, 255 }, align, std::format("Deal {} damage", m_iDamageTilUnban).c_str());
H::Draw.String(fFont, x, y + fFont.m_nTall + 1, Vars::Menu::Theme::Active.Value, align, std::format("{} / {} potential crits", std::max(tStorage.m_iAvailableCrits, 0), tStorage.m_iPotentialCrits).c_str());
H::Draw.StringOutlined(fFont, x, y + fFont.m_nTall + 1, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, std::format("{} / {} potential crits", std::max(tStorage.m_iAvailableCrits, 0), tStorage.m_iPotentialCrits).c_str());
}
else
H::Draw.String(fFont, x, y, Vars::Menu::Theme::Active.Value, align, "Calculating");
H::Draw.StringOutlined(fFont, x, y, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, "Calculating");
if (Vars::Debug::Info.Value)
{
H::Draw.String(fFont, x, y + fFont.m_nTall * 3, {}, align, std::format("AllDamage: {}, CritDamage: {}", m_iAllDamage, m_iCritDamage).c_str());
H::Draw.String(fFont, x, y + fFont.m_nTall * 4, {}, align, std::format("Bucket: {}", pWeapon->m_flCritTokenBucket()).c_str());
H::Draw.String(fFont, x, y + fFont.m_nTall * 5, {}, align, std::format("Damage: {}, Cost: {}", tStorage.m_flDamage, tStorage.m_flCost).c_str());
H::Draw.String(fFont, x, y + fFont.m_nTall * 6, {}, align, std::format("Shots: {}, Crits: {}", pWeapon->m_nCritChecks(), pWeapon->m_nCritSeedRequests()).c_str());
H::Draw.String(fFont, x, y + fFont.m_nTall * 7, {}, align, std::format("CritBanned: {}, DamageTilUnban: {}", m_bCritBanned, m_iDamageTilUnban).c_str());
H::Draw.String(fFont, x, y + fFont.m_nTall * 8, {}, align, std::format("CritChance: {:.2f} ({:.2f})", m_flCritChance, m_flCritChance + 0.1f).c_str());
H::Draw.String(fFont, x, y + fFont.m_nTall * 9, {}, align, std::format("Force: {}, Skip: {}", tStorage.m_vCritCommands.size(), tStorage.m_vSkipCommands.size()).c_str());
H::Draw.StringOutlined(fFont, x, y + fFont.m_nTall * 3, {}, { 0, 0, 0, 255 }, align, std::format("AllDamage: {}, CritDamage: {}", m_iAllDamage, m_iCritDamage).c_str());
H::Draw.StringOutlined(fFont, x, y + fFont.m_nTall * 4, {}, { 0, 0, 0, 255 }, align, std::format("Bucket: {}", pWeapon->m_flCritTokenBucket()).c_str());
H::Draw.StringOutlined(fFont, x, y + fFont.m_nTall * 5, {}, { 0, 0, 0, 255 }, align, std::format("Damage: {}, Cost: {}", tStorage.m_flDamage, tStorage.m_flCost).c_str());
H::Draw.StringOutlined(fFont, x, y + fFont.m_nTall * 6, {}, { 0, 0, 0, 255 }, align, std::format("Shots: {}, Crits: {}", pWeapon->m_nCritChecks(), pWeapon->m_nCritSeedRequests()).c_str());
H::Draw.StringOutlined(fFont, x, y + fFont.m_nTall * 7, {}, { 0, 0, 0, 255 }, align, std::format("CritBanned: {}, DamageTilUnban: {}", m_bCritBanned, m_iDamageTilUnban).c_str());
H::Draw.StringOutlined(fFont, x, y + fFont.m_nTall * 8, {}, { 0, 0, 0, 255 }, align, std::format("CritChance: {:.2f} ({:.2f})", m_flCritChance, m_flCritChance + 0.1f).c_str());
H::Draw.StringOutlined(fFont, x, y + fFont.m_nTall * 9, {}, { 0, 0, 0, 255 }, align, std::format("Force: {}, Skip: {}", tStorage.m_vCritCommands.size(), tStorage.m_vSkipCommands.size()).c_str());
}
}
}
+54 -13
View File
@@ -7,6 +7,14 @@
#include <ImGui/imgui_internal.h>
#include <ImGui/imgui_stdlib.h>
enum FTabs_
{
FTabs_None = 0,
FTabs_Vertical = 1 << 0,
FTabs_HorizontalIcons = 1 << 1,
//FTabs_PageStyle = 1 << 2
};
enum FText_
{
FText_None = 0,
@@ -103,18 +111,32 @@ namespace ImGui
{
vDisabled.push_back(Disabled = bDisabled);
}
inline void PopDisabled()
inline void PopDisabled(int count = 1)
{
vDisabled.pop_back();
int iSize = int(vDisabled.size());
if (iSize < count)
{
IM_ASSERT_USER_ERROR(iSize > count, "Calling PopDisabled() too many times: stack underflow.");
count = iSize;
}
for (int i = 0; i < count; i++)
vDisabled.pop_back();
Disabled = !vDisabled.empty() ? vDisabled.back() : false;
}
inline void PushTransparent(bool bTransparent)
{
vTransparent.push_back(Transparent = bTransparent);
}
inline void PopTransparent()
inline void PopTransparent(int count = 1)
{
vTransparent.pop_back();
int iSize = int(vTransparent.size());
if (iSize < count)
{
IM_ASSERT_USER_ERROR(iSize > count, "Calling PopTransparent() too many times: stack underflow.");
count = iSize;
}
for (int i = 0; i < count; i++)
vTransparent.pop_back();
Transparent = !vTransparent.empty() ? vTransparent.back() : false;
}
@@ -379,7 +401,7 @@ namespace ImGui
}
// widgets
inline bool FTabs(std::vector<const char*> vEntries, int* pVar, const ImVec2 vSize, const ImVec2 vPos, bool bVertical = false, std::vector<const char*> vIcons = {})
inline bool FTabs(std::vector<const char*> vEntries, int* pVar, const ImVec2 vSize, const ImVec2 vPos, int iFlags = FTabs_None, std::vector<const char*> vIcons = {})
{
if (vIcons.size() && vIcons.size() != vEntries.size())
return false;
@@ -387,6 +409,10 @@ namespace ImGui
ImDrawList* pDrawList = GetWindowDrawList();
const int iOriginalTab = pVar ? *pVar : 0;
bool bVertical = iFlags & FTabs_Vertical;
bool bHorizontalIcons = iFlags & FTabs_HorizontalIcons;
//bool bPageStyle = iFlags & FTabs_PageStyle;
for (size_t i = 0; i < vEntries.size(); i++)
{
ImVec2 vNewPos = bVertical ? ImVec2(vPos.x, vPos.y + vSize.y * i) : ImVec2(vPos.x + vSize.x * i, vPos.y);
@@ -414,13 +440,29 @@ namespace ImGui
ImVec2 vOriginalPos = GetCursorPos();
std::string sStripped = StripDoubleHash(vEntries[i]);
ImVec2 vTextSize = CalcTextSize(sStripped.c_str());
ImVec2 vTextPos = { vNewPos.x + (vSize.x - vTextSize.x) / 2, vNewPos.y + (vSize.y - vTextSize.y) / 2 + (vIcons.empty() ? 0 : 10) };
SetCursorPos(vTextPos);
TextUnformatted(sStripped.c_str());
if (!vIcons.empty())
{
SetCursorPos({ vNewPos.x + vSize.x / 2 - 8, vNewPos.y + vSize.x / 2 - 14 });
IconImage(vIcons[i]);
if (!bHorizontalIcons)
{
SetCursorPos({ vNewPos.x + (vSize.x - vTextSize.x) / 2, vNewPos.y + (vSize.y - vTextSize.y) / 2 + 10 });
TextUnformatted(sStripped.c_str());
SetCursorPos({ vNewPos.x + vSize.x / 2 - 8, vNewPos.y + vSize.y / 2 - 18 });
IconImage(vIcons[i]);
}
else
{
SetCursorPos({ vNewPos.x + (vSize.x - vTextSize.x) / 2 + 10, vNewPos.y + (vSize.y - vTextSize.y) / 2 });
TextUnformatted(sStripped.c_str());
SetCursorPos({ vNewPos.x + vSize.x / 2 - vTextSize.x / 2 - 12, vNewPos.y + vSize.y / 2 - 9 });
IconImage(vIcons[i]);
}
}
else
{
SetCursorPos({ vNewPos.x + (vSize.x - vTextSize.x) / 2, vNewPos.y + (vSize.y - vTextSize.y) / 2 });
TextUnformatted(sStripped.c_str());
}
SetCursorPos(vOriginalPos);
@@ -869,7 +911,7 @@ namespace ImGui
{
ImVec2 vOriginalPos2 = GetCursorPos();
SetCursorPos({ vOriginalPos2.x + 16, vOriginalPos2.y - 1 });
if (IconButton(vValues[i] == -1 ? ICON_MD_ADD_CIRCLE : ICON_MD_REMOVE_CIRCLE, false, { 0, 0, 0, 0 }) && pModified)
if (IconButton(vValues[i] == -1 ? ICON_MD_ADD_CIRCLE : ICON_MD_REMOVE_CIRCLE, false, {}) && pModified)
*pModified = vValues[i];
SetCursorPos(vOriginalPos2);
}
@@ -1901,8 +1943,8 @@ namespace ImGui
OpenPopup(var.m_sName.c_str());\
staticVal = val;\
}\
SetNextWindowSize({ 300, 0 });\
PushStyleColor(ImGuiCol_PopupBg, F::Render.Foreground.Value);\
SetNextWindowSize({ 300, 0 });\
bool bPopup = BeginPopup(var.m_sName.c_str());\
PopStyleColor();\
if (bPopup)\
@@ -1933,7 +1975,6 @@ namespace ImGui
PopTransparent();\
EndPopup();\
}\
SetNextWindowSize({ 0, 0 });\
}\
if (pHovered) *pHovered = bHovered;\
return bReturn;\
File diff suppressed because it is too large. Load diff
+1 -12
View File
@@ -13,22 +13,11 @@ class CMenu
void MenuLogs();
void MenuSettings();
void AddDraggable(const char* szTitle, ConfigVar<DragBox_t>& info, bool bShouldDraw);
void AddDraggable(const char* sTitle, ConfigVar<DragBox_t>& info, bool bShouldDraw);
void DrawBinds();
void DrawCameraWindow();
void DrawRadar();
int CurrentTab = 0;
int CurrentAimbotTab = 0;
int CurrentVisualsTab = 0;
int CurrentLogsTab = 0;
int CurrentConfigTab = 0;
int CurrentConfigType = 0;
ImVec2 TabSize = { 65, 72 };
ImVec2 SubTabSize = { 90, 48 };
// material editor stuff
TextEditor TextEditor;
std::string CurrentMaterial;
+4 -6
View File
@@ -44,9 +44,9 @@ void CRender::LoadColors()
Accent = ColorToVec(Vars::Menu::Theme::Accent.Value);
AccentLight = ImColor(Accent.Value.x * 1.1f, Accent.Value.y * 1.1f, Accent.Value.z * 1.1f, Accent.Value.w);
Background = ColorToVec(Vars::Menu::Theme::Background.Value);
Foreground = ColorToVec(Vars::Menu::Theme::Foreground.Value);
Foremost = ColorToVec(Vars::Menu::Theme::Foremost.Value);
Background = ColorToVec(Vars::Menu::Theme::Background.Value.Lerp({ 127, 127, 127, Vars::Menu::Theme::Background.Value.a }, 1.f / 9));
Foreground = ColorToVec(Vars::Menu::Theme::Background.Value);
Foremost = ColorToVec(Vars::Menu::Theme::Background.Value.Lerp({ 127, 127, 127, Vars::Menu::Theme::Background.Value.a }, 2.f / 9));
ForemostLight = ImColor(Foremost.Value.x * 1.1f, Foremost.Value.y * 1.1f, Foremost.Value.z * 1.1f, Foremost.Value.w);
Inactive = ColorToVec(Vars::Menu::Theme::Inactive.Value);
Active = ColorToVec(Vars::Menu::Theme::Active.Value);
@@ -70,7 +70,7 @@ void CRender::LoadColors()
colors[ImGuiCol_SliderGrab] = Accent;
colors[ImGuiCol_SliderGrabActive] = AccentLight;
colors[ImGuiCol_Text] = Active;
colors[ImGuiCol_WindowBg] = Background;
colors[ImGuiCol_WindowBg] = Foreground;
}
void CRender::LoadStyle()
@@ -117,7 +117,6 @@ void CRender::Initialize(IDirect3DDevice9* pDevice)
FontBold = io.Fonts->AddFontFromFileTTF(R"(C:\Windows\Fonts\verdana.ttf)", 13.f, &fontConfig, fontRange);
FontLarge = io.Fonts->AddFontFromFileTTF(R"(C:\Windows\Fonts\verdana.ttf)", 15.f, &fontConfig, fontRange);
FontBlack = io.Fonts->AddFontFromFileTTF(R"(C:\Windows\Fonts\verdana.ttf)", 15.f, &fontConfig, fontRange);
FontTitle = io.Fonts->AddFontFromFileTTF(R"(C:\Windows\Fonts\verdana.ttf)", 20.f, &fontConfig, fontRange);
FontMono = io.Fonts->AddFontFromFileTTF(R"(C:\Windows\Fonts\verdana.ttf)", 15.f, &fontConfig, fontRange);
//FontSmall = io.Fonts->AddFontFromMemoryCompressedTTF(RobotoMedium_compressed_data, RobotoMedium_compressed_size, 11.f, &fontConfig, fontRange);
@@ -125,7 +124,6 @@ void CRender::Initialize(IDirect3DDevice9* pDevice)
//FontBold = io.Fonts->AddFontFromMemoryCompressedTTF(RobotoBold_compressed_data, RobotoBold_compressed_size, 13.f, &fontConfig, fontRange);
//FontLarge = io.Fonts->AddFontFromMemoryCompressedTTF(RobotoMedium_compressed_data, RobotoMedium_compressed_size, 15.f, &fontConfig, fontRange);
//FontBlack = io.Fonts->AddFontFromMemoryCompressedTTF(RobotoBlack_compressed_data, RobotoBlack_compressed_size, 15.f, &fontConfig, fontRange);
//FontTitle = io.Fonts->AddFontFromMemoryCompressedTTF(RobotoMedium_compressed_data, RobotoMedium_compressed_size, 20.f, &fontConfig, fontRange);
//FontMono = io.Fonts->AddFontFromMemoryCompressedTTF(CascadiaMono_compressed_data, CascadiaMono_compressed_size, 15.f, &fontConfig, fontRange);
ImFontConfig iconConfig;
-1
View File
@@ -30,7 +30,6 @@ public:
ImFont* FontBold = nullptr;
ImFont* FontLarge = nullptr;
ImFont* FontBlack = nullptr;
ImFont* FontTitle = nullptr;
ImFont* FontMono = nullptr;
ImFont* IconFontRegular = nullptr;
+85 -85
View File
@@ -67,19 +67,19 @@ void CESP::StorePlayers(CTFPlayer* pLocal)
if (Vars::ESP::Player.Value & Vars::ESP::PlayerEnum::Distance && pPlayer != pLocal)
{
Vec3 vDelta = pPlayer->m_vecOrigin() - pLocal->m_vecOrigin();
tCache.m_vText.push_back({ TextBottom, std::format("[{:.0f}M]", vDelta.Length2D() / 41), Vars::Menu::Theme::Active.Value });
tCache.m_vText.push_back({ TextBottom, std::format("[{:.0f}M]", vDelta.Length2D() / 41), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value });
}
PlayerInfo_t pi{};
if (I::EngineClient->GetPlayerInfo(iIndex, &pi))
{
if (Vars::ESP::Player.Value & Vars::ESP::PlayerEnum::Name)
tCache.m_vText.push_back({ TextTop, F::PlayerUtils.GetPlayerName(iIndex, pi.name), Vars::Menu::Theme::Active.Value });
tCache.m_vText.push_back({ TextTop, F::PlayerUtils.GetPlayerName(iIndex, pi.name), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value });
if (Vars::ESP::Player.Value & Vars::ESP::PlayerEnum::Priority)
{
if (auto pTag = F::PlayerUtils.GetSignificantTag(pi.friendsID, 1))
tCache.m_vText.push_back({ TextTop, pTag->Name, pTag->Color });
tCache.m_vText.push_back({ TextTop, pTag->Name, pTag->Color, H::Draw.IsColorBright(pTag->Color) ? Color_t(0, 0, 0, 255) : Color_t() });
}
if (Vars::ESP::Player.Value & Vars::ESP::PlayerEnum::Labels)
@@ -110,7 +110,7 @@ void CESP::StorePlayers(CTFPlayer* pLocal)
});
for (auto& pTag : vTags)
tCache.m_vText.push_back({ TextRight, pTag->Name, pTag->Color });
tCache.m_vText.push_back({ TextRight, pTag->Name, pTag->Color, H::Draw.IsColorBright(pTag->Color) ? Color_t(0, 0, 0, 255) : Color_t() });
}
}
}
@@ -127,7 +127,7 @@ void CESP::StorePlayers(CTFPlayer* pLocal)
tCache.m_flHealth = std::clamp(flHealth / flMaxHealth, 0.f, 1.f);
}
if (Vars::ESP::Player.Value & Vars::ESP::PlayerEnum::HealthText)
tCache.m_vText.push_back({ TextHealth, std::format("{}", flHealth), flHealth > flMaxHealth ? Vars::Colors::Overheal.Value : Vars::Menu::Theme::Active.Value});
tCache.m_vText.push_back({ TextHealth, std::format("{}", flHealth), flHealth > flMaxHealth ? Vars::Colors::Overheal.Value : Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value });
if (iClassNum == TF_CLASS_MEDIC)
{
@@ -136,14 +136,14 @@ void CESP::StorePlayers(CTFPlayer* pLocal)
tCache.m_flUber = std::clamp(pMediGun->As<CWeaponMedigun>()->m_flChargeLevel(), 0.f, 1.f);
tCache.m_bUberBar = Vars::ESP::Player.Value & Vars::ESP::PlayerEnum::UberBar;
if (Vars::ESP::Player.Value & Vars::ESP::PlayerEnum::UberText)
tCache.m_vText.push_back({ TextUber, std::format("{:.0f}%%", tCache.m_flUber * 100.f), Vars::Menu::Theme::Active.Value });
tCache.m_vText.push_back({ TextUber, std::format("{:.0f}%%", tCache.m_flUber * 100.f), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value });
}
}
if (Vars::ESP::Player.Value & Vars::ESP::PlayerEnum::ClassIcon)
tCache.m_iClassIcon = iClassNum - 1;
if (Vars::ESP::Player.Value & Vars::ESP::PlayerEnum::ClassText)
tCache.m_vText.push_back({ TextRight, GetPlayerClass(iClassNum), Vars::Menu::Theme::Active.Value });
tCache.m_vText.push_back({ TextRight, GetPlayerClass(iClassNum), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value });
if (Vars::ESP::Player.Value & Vars::ESP::PlayerEnum::WeaponIcon && pWeapon)
tCache.m_pWeaponIcon = pWeapon->GetWeaponIcon();
@@ -177,21 +177,21 @@ void CESP::StorePlayers(CTFPlayer* pLocal)
}
if (void* pCurItemData = fnGetEconItemViewByLoadoutSlot(pPlayer, iWeaponSlot, 0))
tCache.m_vText.push_back({ TextBottom, SDK::ConvertWideToUTF8(fnGetItemName(pCurItemData)), Vars::Menu::Theme::Active.Value });
tCache.m_vText.push_back({ TextBottom, SDK::ConvertWideToUTF8(fnGetItemName(pCurItemData)), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value });
}
if (Vars::Debug::Info.Value && !pPlayer->IsDormant() && pPlayer->entindex() != I::EngineClient->GetLocalPlayer())
{
int iAverage = TIME_TO_TICKS(F::MoveSim.GetPredictedDelta(pPlayer));
int iCurrent = H::Entities.GetChoke(pPlayer);
tCache.m_vText.push_back({ TextRight, std::format("Lag {}, {}", iAverage, iCurrent), {} });
tCache.m_vText.push_back({ TextRight, std::format("Lag {}, {}", iAverage, iCurrent), {}, { 0, 0, 0, 255 } });
}
{
if (Vars::ESP::Player.Value & Vars::ESP::PlayerEnum::LagCompensation && !pPlayer->IsDormant() && pPlayer != pLocal)
{
if (H::Entities.GetLagCompensation(pPlayer))
tCache.m_vText.push_back({ TextRight, "LAGCOMP", { 255, 100, 100, 255 } });
tCache.m_vText.push_back({ TextRight, "LAGCOMP", { 255, 100, 100, 255 }, { 0, 0, 0, 255 } });
}
if (Vars::ESP::Player.Value & Vars::ESP::PlayerEnum::Ping && pResource && pPlayer != pLocal)
@@ -201,7 +201,7 @@ void CESP::StorePlayers(CTFPlayer* pLocal)
{
int iPing = pResource->GetPing(pPlayer->entindex());
if (iPing && (iPing >= 200 || iPing <= 5))
tCache.m_vText.push_back({ TextRight, std::format("{}MS", iPing), { 255, 100, 100, 255 } });
tCache.m_vText.push_back({ TextRight, std::format("{}MS", iPing), { 255, 100, 100, 255 }, { 0, 0, 0, 255 } });
}
}
@@ -212,7 +212,7 @@ void CESP::StorePlayers(CTFPlayer* pLocal)
{
int iKDR = iKills / std::max(iDeaths, 1);
if (iKDR >= 10)
tCache.m_vText.push_back({ TextRight, std::format("High KD [{} / {}]", iKills, iDeaths), { 255, 100, 100, 255 } });
tCache.m_vText.push_back({ TextRight, std::format("High KD [{} / {}]", iKills, iDeaths), { 255, 100, 100, 255 }, { 0, 0, 0, 255 } });
}
}
@@ -226,9 +226,9 @@ void CESP::StorePlayers(CTFPlayer* pLocal)
pWeapon && pWeapon->m_iItemDefinitionIndex() == Sniper_t_TheBushwacka ? bCrits = true : bMiniCrits = true;
if (bCrits)
tCache.m_vText.push_back({ TextRight, "CRITS", { 255, 100, 100, 255 } });
tCache.m_vText.push_back({ TextRight, "CRITS", { 255, 100, 100, 255 }, { 0, 0, 0, 255 } });
else if (bMiniCrits)
tCache.m_vText.push_back({ TextRight, "MINI-CRITS", { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, "MINI-CRITS", { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
if (pPlayer->InCond(TF_COND_RADIUSHEAL) ||
pPlayer->InCond(TF_COND_HEALTH_BUFF) ||
@@ -237,94 +237,94 @@ void CESP::StorePlayers(CTFPlayer* pLocal)
pPlayer->InCond(TF_COND_HALLOWEEN_QUICK_HEAL) ||
pPlayer->InCond(TF_COND_HALLOWEEN_HELL_HEAL) ||
pPlayer->IsBuffedByKing())
tCache.m_vText.push_back({ TextRight, "HP+", Vars::Colors::Overheal.Value });
tCache.m_vText.push_back({ TextRight, "HP+", Vars::Colors::Overheal.Value, { 0, 0, 0, 255 } });
else if (pPlayer->InCond(TF_COND_HEALTH_OVERHEALED))
tCache.m_vText.push_back({ TextRight, "HP", Vars::Colors::Overheal.Value });
tCache.m_vText.push_back({ TextRight, "HP", Vars::Colors::Overheal.Value, { 0, 0, 0, 255 } });
if (pPlayer->InCond(TF_COND_INVULNERABLE) ||
pPlayer->InCond(TF_COND_INVULNERABLE_HIDE_UNLESS_DAMAGED) ||
pPlayer->InCond(TF_COND_INVULNERABLE_USER_BUFF) ||
pPlayer->InCond(TF_COND_INVULNERABLE_CARD_EFFECT))
tCache.m_vText.push_back({ TextRight, "UBER", Vars::Colors::UberBar.Value });
tCache.m_vText.push_back({ TextRight, "UBER", Vars::Colors::UberBar.Value, { 0, 0, 0, 255 } });
else if (pPlayer->InCond(TF_COND_PHASE))
tCache.m_vText.push_back({ TextRight, "BONK", { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, "BONK", { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
/* vaccinator effects */
if (pPlayer->InCond(TF_COND_MEDIGUN_UBER_BULLET_RESIST) || pPlayer->InCond(TF_COND_BULLET_IMMUNE))
tCache.m_vText.push_back({ TextRight, "BULLET+", { 255, 100, 100, 255 } });
tCache.m_vText.push_back({ TextRight, "BULLET+", { 255, 100, 100, 255 }, { 0, 0, 0, 255 } });
else if (pPlayer->InCond(TF_COND_MEDIGUN_SMALL_BULLET_RESIST))
tCache.m_vText.push_back({ TextRight, "BULLET", { 255, 100, 100, 255 } });
tCache.m_vText.push_back({ TextRight, "BULLET", { 255, 100, 100, 255 }, { 0, 0, 0, 255 } });
if (pPlayer->InCond(TF_COND_MEDIGUN_UBER_BLAST_RESIST) || pPlayer->InCond(TF_COND_BLAST_IMMUNE))
tCache.m_vText.push_back({ TextRight, "BLAST+", { 255, 100, 100, 255 } });
tCache.m_vText.push_back({ TextRight, "BLAST+", { 255, 100, 100, 255 }, { 0, 0, 0, 255 } });
else if (pPlayer->InCond(TF_COND_MEDIGUN_SMALL_BLAST_RESIST))
tCache.m_vText.push_back({ TextRight, "BLAST", { 255, 100, 100, 255 } });
tCache.m_vText.push_back({ TextRight, "BLAST", { 255, 100, 100, 255 }, { 0, 0, 0, 255 } });
if (pPlayer->InCond(TF_COND_MEDIGUN_UBER_FIRE_RESIST) || pPlayer->InCond(TF_COND_FIRE_IMMUNE))
tCache.m_vText.push_back({ TextRight, "FIRE+", { 255, 100, 100, 255 } });
tCache.m_vText.push_back({ TextRight, "FIRE+", { 255, 100, 100, 255 }, { 0, 0, 0, 255 } });
else if (pPlayer->InCond(TF_COND_MEDIGUN_SMALL_FIRE_RESIST))
tCache.m_vText.push_back({ TextRight, "FIRE", { 255, 100, 100, 255 } });
tCache.m_vText.push_back({ TextRight, "FIRE", { 255, 100, 100, 255 }, { 0, 0, 0, 255 } });
if (pPlayer->InCond(TF_COND_OFFENSEBUFF))
tCache.m_vText.push_back({ TextRight, "BANNER", tCache.m_tColor });
tCache.m_vText.push_back({ TextRight, "BANNER", tCache.m_tColor, { 0, 0, 0, 255 } });
if (pPlayer->InCond(TF_COND_DEFENSEBUFF))
tCache.m_vText.push_back({ TextRight, "BATTALIONS", tCache.m_tColor });
tCache.m_vText.push_back({ TextRight, "BATTALIONS", tCache.m_tColor, { 0, 0, 0, 255 } });
if (pPlayer->InCond(TF_COND_REGENONDAMAGEBUFF))
tCache.m_vText.push_back({ TextRight, "CONCH", tCache.m_tColor });
tCache.m_vText.push_back({ TextRight, "CONCH", tCache.m_tColor, { 0, 0, 0, 255 } });
if (pPlayer->InCond(TF_COND_BLASTJUMPING))
tCache.m_vText.push_back({ TextRight, "BLASTJUMP", { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, "BLASTJUMP", { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
}
// Debuffs
if (Vars::ESP::Player.Value & Vars::ESP::PlayerEnum::Debuffs)
{
if (pPlayer->InCond(TF_COND_STUNNED))
tCache.m_vText.push_back({ TextRight, "STUNNED", { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, "STUNNED", { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
if (pPlayer->InCond(TF_COND_URINE))
tCache.m_vText.push_back({ TextRight, "JARATE", { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, "JARATE", { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
if (pPlayer->InCond(TF_COND_MARKEDFORDEATH) || pPlayer->InCond(TF_COND_MARKEDFORDEATH_SILENT))
tCache.m_vText.push_back({ TextRight, "MARKED", { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, "MARKED", { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
if (pPlayer->InCond(TF_COND_BURNING))
tCache.m_vText.push_back({ TextRight, "BURN", { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, "BURN", { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
if (pPlayer->InCond(TF_COND_MAD_MILK))
tCache.m_vText.push_back({ TextRight, "MILK", { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, "MILK", { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
}
// Misc
if (Vars::ESP::Player.Value & Vars::ESP::PlayerEnum::Misc)
{
if (Vars::Visuals::Removals::Taunts.Value && pPlayer->InCond(TF_COND_TAUNTING))
tCache.m_vText.push_back({ TextRight, "TAUNT", { 255, 100, 200, 255 } });
tCache.m_vText.push_back({ TextRight, "TAUNT", { 255, 100, 200, 255 }, { 0, 0, 0, 255 } });
if (pPlayer->m_bFeignDeathReady())
tCache.m_vText.push_back({ TextRight, "DR", { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, "DR", { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
if (pPlayer->InCond(TF_COND_AIMING) && pWeapon)
{
switch (pWeapon->GetWeaponID())
{
case TF_WEAPON_MINIGUN:
tCache.m_vText.push_back({ TextRight, "REV", { 127, 127, 127, 255 } });
tCache.m_vText.push_back({ TextRight, "REV", { 127, 127, 127, 255 }, { 0, 0, 0, 255 } });
break;
case TF_WEAPON_COMPOUND_BOW:
tCache.m_vText.push_back({ TextRight, I::GlobalVars->curtime - pWeapon->As<CTFPipebombLauncher>()->m_flChargeBeginTime() >= 1.f ? "CHARGED" : "CHARGING", { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, I::GlobalVars->curtime - pWeapon->As<CTFPipebombLauncher>()->m_flChargeBeginTime() >= 1.f ? "CHARGED" : "CHARGING", { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
break;
case TF_WEAPON_PARTICLE_CANNON:
tCache.m_vText.push_back({ TextRight, "CHARGING", { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, "CHARGING", { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
}
}
if (pPlayer->InCond(TF_COND_ZOOMED))
tCache.m_vText.push_back({ TextRight, "ZOOM", { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, "ZOOM", { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
if (pPlayer->InCond(TF_COND_STEALTHED) || pPlayer->InCond(TF_COND_STEALTHED_BLINK) || pPlayer->InCond(TF_COND_STEALTHED_USER_BUFF) || pPlayer->InCond(TF_COND_STEALTHED_USER_BUFF_FADING))
tCache.m_vText.push_back({ TextRight, std::format("INVIS {:.0f}%%", pPlayer->GetInvisPercentage()), Vars::Colors::Cloak.Value });
tCache.m_vText.push_back({ TextRight, std::format("INVIS {:.0f}%%", pPlayer->GetInvisPercentage()), Vars::Colors::Cloak.Value, { 0, 0, 0, 255 } });
if (pPlayer->InCond(TF_COND_DISGUISING) || pPlayer->InCond(TF_COND_DISGUISED))
tCache.m_vText.push_back({ TextRight, "DISGUISE", { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, "DISGUISE", { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
}
}
}
@@ -369,7 +369,7 @@ void CESP::StoreBuildings(CTFPlayer* pLocal)
if (Vars::ESP::Building.Value & Vars::ESP::BuildingEnum::Distance)
{
Vec3 vDelta = pEntity->m_vecOrigin() - pLocal->m_vecOrigin();
tCache.m_vText.push_back({ TextBottom, std::format("[{:.0f}M]", vDelta.Length2D() / 41), Vars::Menu::Theme::Active.Value });
tCache.m_vText.push_back({ TextBottom, std::format("[{:.0f}M]", vDelta.Length2D() / 41), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value });
}
if (Vars::ESP::Building.Value & Vars::ESP::BuildingEnum::Name)
@@ -381,46 +381,46 @@ void CESP::StoreBuildings(CTFPlayer* pLocal)
case ETFClassID::CObjectDispenser: szName = "Dispenser"; break;
case ETFClassID::CObjectTeleporter: szName = pBuilding->m_iObjectMode() ? "Teleporter Exit" : "Teleporter Entrance";
}
tCache.m_vText.push_back({ TextTop, szName, Vars::Menu::Theme::Active.Value });
tCache.m_vText.push_back({ TextTop, szName, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value });
}
float flHealth = pBuilding->m_iHealth(), flMaxHealth = pBuilding->m_iMaxHealth();
if (tCache.m_bHealthBar = Vars::ESP::Building.Value & Vars::ESP::BuildingEnum::HealthBar)
tCache.m_flHealth = flHealth / flMaxHealth;
if (Vars::ESP::Building.Value & Vars::ESP::BuildingEnum::HealthText)
tCache.m_vText.push_back({ TextHealth, std::format("{}", flHealth), Vars::Menu::Theme::Active.Value });
tCache.m_vText.push_back({ TextHealth, std::format("{}", flHealth), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value });
if (Vars::ESP::Building.Value & Vars::ESP::BuildingEnum::Owner && !pBuilding->m_bWasMapPlaced() && pOwner)
{
PlayerInfo_t pi{};
if (I::EngineClient->GetPlayerInfo(iIndex, &pi))
tCache.m_vText.push_back({ TextTop, F::PlayerUtils.GetPlayerName(iIndex, pi.name), Vars::Menu::Theme::Active.Value });
tCache.m_vText.push_back({ TextTop, F::PlayerUtils.GetPlayerName(iIndex, pi.name), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value });
}
if (Vars::ESP::Building.Value & Vars::ESP::BuildingEnum::Level && !bIsMini)
tCache.m_vText.push_back({ TextRight, std::format("{} / {}", pBuilding->m_iUpgradeLevel(), bIsMini ? 1 : 3), Vars::Menu::Theme::Active.Value});
tCache.m_vText.push_back({ TextRight, std::format("{} / {}", pBuilding->m_iUpgradeLevel(), bIsMini ? 1 : 3), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value });
if (Vars::ESP::Building.Value & Vars::ESP::BuildingEnum::Flags)
{
float flConstructed = pBuilding->m_flPercentageConstructed();
if (flConstructed < 1.f)
tCache.m_vText.push_back({ TextRight, std::format("{:.0f}%%", flConstructed * 100.f), { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, std::format("{:.0f}%%", flConstructed * 100.f), { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
if (pBuilding->IsSentrygun() && pBuilding->As<CObjectSentrygun>()->m_bPlayerControlled())
tCache.m_vText.push_back({ TextRight, "WRANGLED", { 255, 100, 100, 255 } });
tCache.m_vText.push_back({ TextRight, "WRANGLED", { 255, 100, 100, 255 }, { 0, 0, 0, 255 } });
if (pBuilding->m_bHasSapper())
tCache.m_vText.push_back({ TextRight, "SAPPED", { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, "SAPPED", { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
else if (pBuilding->m_bDisabled())
tCache.m_vText.push_back({ TextRight, "DISABLED", { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, "DISABLED", { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
if (pBuilding->IsSentrygun() && !pBuilding->m_bBuilding())
{
int iShells, iMaxShells, iRockets, iMaxRockets; pBuilding->As<CObjectSentrygun>()->GetAmmoCount(iShells, iMaxShells, iRockets, iMaxRockets);
if (!iShells)
tCache.m_vText.push_back({ TextRight, "NO AMMO", { 127, 127, 127, 255 } });
tCache.m_vText.push_back({ TextRight, "NO AMMO", { 127, 127, 127, 255 }, { 0, 0, 0, 255 } });
if (!bIsMini && !iRockets)
tCache.m_vText.push_back({ TextRight, "NO ROCKETS", { 127, 127, 127, 255 } });
tCache.m_vText.push_back({ TextRight, "NO ROCKETS", { 127, 127, 127, 255 }, { 0, 0, 0, 255 } });
}
}
}
@@ -521,7 +521,7 @@ void CESP::StoreProjectiles(CTFPlayer* pLocal)
if (Vars::ESP::Projectile.Value & Vars::ESP::ProjectileEnum::Distance)
{
Vec3 vDelta = pEntity->m_vecOrigin() - pLocal->m_vecOrigin();
tCache.m_vText.push_back({ TextBottom, std::format("[{:.0f}M]", vDelta.Length2D() / 41), Vars::Menu::Theme::Active.Value });
tCache.m_vText.push_back({ TextBottom, std::format("[{:.0f}M]", vDelta.Length2D() / 41), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value });
}
if (Vars::ESP::Projectile.Value & Vars::ESP::ProjectileEnum::Name)
@@ -571,7 +571,7 @@ void CESP::StoreProjectiles(CTFPlayer* pLocal)
case ETFClassID::CTFProjectile_EnergyRing: szName = "Energy"; break;
//case ETFClassID::CTFProjectile_Syringe: szName = "Syringe";
}
tCache.m_vText.push_back({ TextTop, szName, Vars::Menu::Theme::Active.Value });
tCache.m_vText.push_back({ TextTop, szName, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value });
}
if (Vars::ESP::Projectile.Value & Vars::ESP::ProjectileEnum::Flags)
@@ -599,7 +599,7 @@ void CESP::StoreObjective(CTFPlayer* pLocal)
if (Vars::ESP::Objective.Value & Vars::ESP::ObjectiveEnum::Distance)
{
Vec3 vDelta = pEntity->m_vecOrigin() - pLocal->m_vecOrigin();
tCache.m_vText.push_back({ TextBottom, std::format("[{:.0f}M]", vDelta.Length2D() / 41), Vars::Menu::Theme::Active.Value });
tCache.m_vText.push_back({ TextBottom, std::format("[{:.0f}M]", vDelta.Length2D() / 41), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value });
}
switch (pEntity->GetClassID())
@@ -609,27 +609,27 @@ void CESP::StoreObjective(CTFPlayer* pLocal)
auto pIntel = pEntity->As<CCaptureFlag>();
if (Vars::ESP::Objective.Value & Vars::ESP::ObjectiveEnum::Name)
tCache.m_vText.push_back({ TextTop, "Intel", Vars::Menu::Theme::Active.Value });
tCache.m_vText.push_back({ TextTop, "Intel", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value });
if (Vars::ESP::Objective.Value & Vars::ESP::ObjectiveEnum::Flags)
{
switch (pIntel->m_nFlagStatus())
{
case TF_FLAGINFO_HOME:
tCache.m_vText.push_back({ TextRight, "HOME", { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, "HOME", { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
break;
case TF_FLAGINFO_DROPPED:
tCache.m_vText.push_back({ TextRight, "DROPPED", { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, "DROPPED", { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
break;
default:
tCache.m_vText.push_back({ TextRight, std::format("{}", pIntel->m_nFlagStatus()), { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, std::format("{}", pIntel->m_nFlagStatus()), { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
}
}
if (Vars::ESP::Objective.Value & Vars::ESP::ObjectiveEnum::IntelReturnTime && pIntel->m_nFlagStatus() == TF_FLAGINFO_DROPPED)
{
float flReturnTime = std::max(pIntel->m_flResetTime() - TICKS_TO_TIME(I::ClientState->m_ClockDriftMgr.m_nServerTick), 0.f);
tCache.m_vText.push_back({ TextRight, std::format("RETURN {:.1f}S", pIntel->m_flResetTime() - TICKS_TO_TIME(I::ClientState->m_ClockDriftMgr.m_nServerTick)).c_str(), { 255, 175, 0, 255 } });
tCache.m_vText.push_back({ TextRight, std::format("RETURN {:.1f}S", pIntel->m_flResetTime() - TICKS_TO_TIME(I::ClientState->m_ClockDriftMgr.m_nServerTick)).c_str(), { 255, 175, 0, 255 }, { 0, 0, 0, 255 } });
}
break;
@@ -656,7 +656,7 @@ void CESP::StoreWorld()
case ETFClassID::CEyeballBoss: szName = "Monoculus";
}
tCache.m_vText.push_back({ TextTop, szName, Vars::Colors::NPC.Value });
tCache.m_vText.push_back({ TextTop, szName, Vars::Colors::NPC.Value, Vars::Menu::Theme::Background.Value });
}
}
@@ -666,7 +666,7 @@ void CESP::StoreWorld()
{
WorldCache& tCache = m_mWorldCache[pEntity];
tCache.m_vText.push_back({ TextTop, "Health", Vars::Colors::Health.Value });
tCache.m_vText.push_back({ TextTop, "Health", Vars::Colors::Health.Value, Vars::Menu::Theme::Background.Value });
}
}
@@ -676,7 +676,7 @@ void CESP::StoreWorld()
{
WorldCache& tCache = m_mWorldCache[pEntity];
tCache.m_vText.push_back({ TextTop, "Ammo", Vars::Colors::Ammo.Value });
tCache.m_vText.push_back({ TextTop, "Ammo", Vars::Colors::Ammo.Value, Vars::Menu::Theme::Background.Value });
}
}
@@ -686,7 +686,7 @@ void CESP::StoreWorld()
{
WorldCache& tCache = m_mWorldCache[pEntity];
tCache.m_vText.push_back({ TextTop, "Money", Vars::Colors::Money.Value });
tCache.m_vText.push_back({ TextTop, "Money", Vars::Colors::Money.Value, Vars::Menu::Theme::Background.Value });
}
}
@@ -717,7 +717,7 @@ void CESP::StoreWorld()
//case FNV1A::Hash32Const("models/pickups/pickup_powerup_uber.mdl"): szName = "16"; break;
case FNV1A::Hash32Const("models/pickups/pickup_powerup_vampire.mdl"): szName = "Vampire";
}
tCache.m_vText.push_back({ TextTop, szName, Vars::Colors::Powerup.Value });
tCache.m_vText.push_back({ TextTop, szName, Vars::Colors::Powerup.Value, Vars::Menu::Theme::Background.Value });
}
}
@@ -727,7 +727,7 @@ void CESP::StoreWorld()
{
WorldCache& tCache = m_mWorldCache[pEntity];
tCache.m_vText.push_back({ TextTop, pEntity->GetClassID() == ETFClassID::CTFPumpkinBomb ? "Pumpkin Bomb" : "Bomb", Vars::Colors::Halloween.Value });
tCache.m_vText.push_back({ TextTop, pEntity->GetClassID() == ETFClassID::CTFPumpkinBomb ? "Pumpkin Bomb" : "Bomb", Vars::Colors::Halloween.Value, Vars::Menu::Theme::Background.Value });
}
}
@@ -737,7 +737,7 @@ void CESP::StoreWorld()
{
WorldCache& tCache = m_mWorldCache[pEntity];
tCache.m_vText.push_back({ TextTop, "Spellbook", Vars::Colors::Halloween.Value });
tCache.m_vText.push_back({ TextTop, "Spellbook", Vars::Colors::Halloween.Value, Vars::Menu::Theme::Background.Value });
}
}
@@ -747,7 +747,7 @@ void CESP::StoreWorld()
{
WorldCache& tCache = m_mWorldCache[pEntity];
tCache.m_vText.push_back({ TextTop, "Gargoyle", Vars::Colors::Halloween.Value });
tCache.m_vText.push_back({ TextTop, "Gargoyle", Vars::Colors::Halloween.Value, Vars::Menu::Theme::Background.Value });
}
}
}
@@ -816,40 +816,40 @@ void CESP::DrawPlayers()
bOffset += 5;
}
for (auto& [iMode, sText, tColor] : tCache.m_vText)
for (auto& [iMode, sText, tColor, tOutline] : tCache.m_vText)
{
switch (iMode)
{
case TextTop:
H::Draw.String(fFont, m, y - tOffset, tColor, ALIGN_BOTTOM, sText.c_str());
H::Draw.StringOutlined(fFont, m, y - tOffset, tColor, tOutline, ALIGN_BOTTOM, sText.c_str());
tOffset += fFont.m_nTall + 2;
break;
case TextBottom:
H::Draw.String(fFont, m, b + bOffset, tColor, ALIGN_TOP, sText.c_str());
H::Draw.StringOutlined(fFont, m, b + bOffset, tColor, tOutline, ALIGN_TOP, sText.c_str());
bOffset += fFont.m_nTall + 2;
break;
case TextRight:
H::Draw.String(fFont, r, y + rOffset, tColor, ALIGN_TOPLEFT, sText.c_str());
H::Draw.StringOutlined(fFont, r, y + rOffset, tColor, tOutline, ALIGN_TOPLEFT, sText.c_str());
rOffset += fFont.m_nTall + 2;
break;
case TextHealth:
H::Draw.String(fFont, x - 5 - lOffset, y + h - h * std::min(tCache.m_flHealth, 1.f) - 2, tColor, ALIGN_TOPRIGHT, sText.c_str());
H::Draw.StringOutlined(fFont, x - 5 - lOffset, y + h - h * std::min(tCache.m_flHealth, 1.f) - 2, tColor, tOutline, ALIGN_TOPRIGHT, sText.c_str());
break;
case TextUber:
H::Draw.String(fFont, x + w + 4, y + h, tColor, ALIGN_TOPLEFT, sText.c_str());
H::Draw.StringOutlined(fFont, x + w + 4, y + h, tColor, tOutline, ALIGN_TOPLEFT, sText.c_str());
}
}
if (tCache.m_iClassIcon)
{
int size = 18 * Vars::Menu::DPI.Value;
int size = 18 * Vars::Menu::Scale.Value;
H::Draw.Texture(x + w / 2, y - tOffset, size, size, tCache.m_iClassIcon, ALIGN_BOTTOM);
}
if (tCache.m_pWeaponIcon)
{
const float iw = tCache.m_pWeaponIcon->Width(), ih = tCache.m_pWeaponIcon->Height();
const float scale = std::clamp(float(w) / std::max(iw, ih * 2), 0.25f, 0.75f) * Vars::Menu::DPI.Value;
const float scale = std::clamp(float(w) / std::max(iw, ih * 2), 0.25f, 0.75f) * Vars::Menu::Scale.Value;
H::Draw.DrawHudTexture(x + float(w) / 2.f - iw / 2.f * scale, y + h + 1 + bOffset, scale, tCache.m_pWeaponIcon, Vars::Menu::Theme::Active.Value);
}
}
@@ -884,24 +884,24 @@ void CESP::DrawBuildings()
lOffset += 5;
}
for (auto& [iMode, sText, tColor] : tCache.m_vText)
for (auto& [iMode, sText, tColor, tOutline] : tCache.m_vText)
{
switch (iMode)
{
case TextTop:
H::Draw.String(fFont, m, y - tOffset, tColor, ALIGN_BOTTOM, sText.c_str());
H::Draw.StringOutlined(fFont, m, y - tOffset, tColor, tOutline, ALIGN_BOTTOM, sText.c_str());
tOffset += fFont.m_nTall + 2;
break;
case TextBottom:
H::Draw.String(fFont, m, b + bOffset, tColor, ALIGN_TOP, sText.c_str());
H::Draw.StringOutlined(fFont, m, b + bOffset, tColor, tOutline, ALIGN_TOP, sText.c_str());
bOffset += fFont.m_nTall + 2;
break;
case TextRight:
H::Draw.String(fFont, r, y + rOffset, tColor, ALIGN_TOPLEFT, sText.c_str());
H::Draw.StringOutlined(fFont, r, y + rOffset, tColor, tOutline, ALIGN_TOPLEFT, sText.c_str());
rOffset += fFont.m_nTall + 2;
break;
case TextHealth:
H::Draw.String(fFont, x - 5 - lOffset, y + h - h * std::min(tCache.m_flHealth, 1.f) - 2, tColor, ALIGN_TOPRIGHT, sText.c_str());
H::Draw.StringOutlined(fFont, x - 5 - lOffset, y + h - h * std::min(tCache.m_flHealth, 1.f) - 2, tColor, tOutline, ALIGN_TOPRIGHT, sText.c_str());
break;
}
}
@@ -927,20 +927,20 @@ void CESP::DrawWorld()
if (tCache.m_bBox)
H::Draw.LineRectOutline(x, y, w, h, tCache.m_tColor, { 0, 0, 0, 255 });
for (auto& [iMode, sText, tColor] : tCache.m_vText)
for (auto& [iMode, sText, tColor, tOutline] : tCache.m_vText)
{
switch (iMode)
{
case TextTop:
H::Draw.String(fFont, m, y - tOffset, tColor, ALIGN_BOTTOM, sText.c_str());
H::Draw.StringOutlined(fFont, m, y - tOffset, tColor, tOutline, ALIGN_BOTTOM, sText.c_str());
tOffset += fFont.m_nTall + 2;
break;
case TextBottom:
H::Draw.String(fFont, m, b + bOffset, tColor, ALIGN_TOP, sText.c_str());
H::Draw.StringOutlined(fFont, m, b + bOffset, tColor, tOutline, ALIGN_TOP, sText.c_str());
bOffset += fFont.m_nTall + 2;
break;
case TextRight:
H::Draw.String(fFont, r, y + rOffset, tColor, ALIGN_TOPLEFT, sText.c_str());
H::Draw.StringOutlined(fFont, r, y + rOffset, tColor, tOutline, ALIGN_TOPLEFT, sText.c_str());
rOffset += fFont.m_nTall + 2;
}
}
+3 -3
View File
@@ -13,7 +13,7 @@ enum TextMode
struct PlayerCache
{
float m_flAlpha = 1.f;
std::vector<std::tuple<TextMode, std::string, Color_t>> m_vText = {};
std::vector<std::tuple<TextMode, std::string, Color_t, Color_t>> m_vText = {};
Color_t m_tColor = {};
bool m_bBox = false;
bool m_bBones = false;
@@ -29,7 +29,7 @@ struct PlayerCache
struct BuildingCache
{
float m_flAlpha = 1.f;
std::vector<std::tuple<TextMode, std::string, Color_t>> m_vText = {};
std::vector<std::tuple<TextMode, std::string, Color_t, Color_t>> m_vText = {};
Color_t m_tColor = {};
bool m_bBox = false;
@@ -40,7 +40,7 @@ struct BuildingCache
struct WorldCache
{
float m_flAlpha = 1.f;
std::vector<std::tuple<TextMode, std::string, Color_t>> m_vText = {};
std::vector<std::tuple<TextMode, std::string, Color_t, Color_t>> m_vText = {};
Color_t m_tColor = {};
bool m_bBox = false;
};
+1 -1
View File
@@ -250,8 +250,8 @@ void CGlow::SetupEnd(Glow_t glow, IMatRenderContext* pRenderContext, IMaterial*
}
pRenderContext->DrawScreenSpaceRectangle(m_pMatHaloAddToScreen, -side, 0, w, h, 0.f, 0.f, w - 1, h - 1, w, h);
pRenderContext->DrawScreenSpaceRectangle(m_pMatHaloAddToScreen, 0, -side, w, h, 0.f, 0.f, w - 1, h - 1, w, h);
pRenderContext->DrawScreenSpaceRectangle(m_pMatHaloAddToScreen, 0, side, w, h, 0.f, 0.f, w - 1, h - 1, w, h);
pRenderContext->DrawScreenSpaceRectangle(m_pMatHaloAddToScreen, side, 0, w, h, 0.f, 0.f, w - 1, h - 1, w, h);
pRenderContext->DrawScreenSpaceRectangle(m_pMatHaloAddToScreen, 0, side, w, h, 0.f, 0.f, w - 1, h - 1, w, h);
}
if (glow.Blur)
pRenderContext->DrawScreenSpaceRectangle(m_pMatHaloAddToScreen, 0, 0, w, h, 0.f, 0.f, w - 1, h - 1, w, h);
@@ -1,5 +1,10 @@
#include "Notifications.h"
static float EaseInOutCubic(float x)
{
return x < 0.5f ? 4.f * x * x * x : 1 - powf(-2.f * x + 2.f, 3.f) / 2.f;
}
void CNotifications::Add(const std::string& sText, float flLifeTime, float flPanTime)
{
vNotifications.push_back({ sText, float(SDK::PlatFloatTime()), flLifeTime, flPanTime });
@@ -8,7 +13,7 @@ void CNotifications::Add(const std::string& sText, float flLifeTime, float flPan
void CNotifications::Draw()
{
while (vNotifications.size() > iMaxNotifySize)
vNotifications.erase(vNotifications.begin());
vNotifications.pop_front();
for (auto it = vNotifications.begin(); it != vNotifications.end();)
{
@@ -21,28 +26,34 @@ void CNotifications::Draw()
if (vNotifications.empty())
return;
int y = 2;
int y = 8;
const auto& fFont = H::Fonts.GetFont(FONT_INDICATORS);
for (auto& tNotification : vNotifications)
{
int x = 2;
int x = 8;
int w, h; I::MatSystemSurface->GetTextSize(fFont.m_dwFont, SDK::ConvertUtf8ToWide(tNotification.m_sText).c_str(), w, h);
w += 4; h += 4;
w += 23; h = 32;
float flEase = 0.f;
if (float flPan = tNotification.m_flPanTime)
{
float flTime = SDK::PlatFloatTime();
float flCreate = tNotification.m_flCreateTime;
float flLife = std::min(flTime - flCreate, flCreate + tNotification.m_flLifeTime - flTime);
if (flLife < flPan)
x -= powf(Math::RemapValClamped(flLife, flPan, 0.f, 0.f, 1.f), 2.f) * w;
{
float flRatio = Math::RemapValClamped(flLife, flPan, 0.f, 0.f, 1.f);
flEase = EaseInOutCubic(flRatio);
x -= (w + 8) * flEase;
}
}
auto& cAccent = Vars::Menu::Theme::Accent.Value, & cActive = Vars::Menu::Theme::Active.Value, & cBackground = Vars::Menu::Theme::Background.Value;
H::Draw.Line(x, y, x, y + h, { cAccent.r, cAccent.g, cAccent.b, 255 });
H::Draw.GradientRect(x + 1, y, w, h, { cBackground.r, cBackground.g, cBackground.b, 255 }, { cBackground.r, cBackground.g, cBackground.b, 0 }, true);
H::Draw.String(fFont, x + 6, y + 2, { cActive.r, cActive.g, cActive.b, 255 }, ALIGN_TOPLEFT, tNotification.m_sText.c_str());
H::Draw.FillRect(x + 1, y + 1, 2, h - 2, { cAccent.r, cAccent.g, cAccent.b, 255 });
H::Draw.GradientRect(x + 3, y + 1, w - 4, h - 2, { cBackground.r, cBackground.g, cBackground.b, 255 }, { cBackground.r, cBackground.g, cBackground.b, 127 }, true);
H::Draw.LineRect(x, y, w, h, { cBackground.r, cBackground.g, cBackground.b, 255 });
H::Draw.StringOutlined(fFont, x + 13, y + 9, { cActive.r, cActive.g, cActive.b, 255 }, Vars::Menu::Theme::Background.Value, ALIGN_TOPLEFT, tNotification.m_sText.c_str());
y += h + 2;
y += (h + 8) * (1.f - flEase);
}
}
@@ -11,11 +11,11 @@ struct Notification_t
class CNotifications
{
std::vector<Notification_t> vNotifications;
std::deque<Notification_t> vNotifications;
unsigned iMaxNotifySize = 10;
public:
void Add(const std::string& sText, float flLifeTime = Vars::Logging::Lifetime.Value, float flPanTime = 0.1f);
void Add(const std::string& sText, float flLifeTime = Vars::Logging::Lifetime.Value, float flPanTime = 0.2f);
void Draw();
};
@@ -65,12 +65,10 @@ void CPlayerArrows::DrawArrowTo(const Vec3& vecFromPos, const Vec3& vecToPos, Co
const float _cos = cos(deg);
const float _sin = sin(deg);
Vertex_t t1, t2, t3;
t1.Init({ cx + p1.x * _cos - p1.y * _sin, cy + p1.y * _cos + p1.x * _sin });
t2.Init({ cx + p2.x * _cos - p2.y * _sin, cy + p2.y * _cos + p2.x * _sin });
t3.Init({ cx + p3.x * _cos - p3.y * _sin, cy + p3.y * _cos + p3.x * _sin });
std::array<Vertex_t, 3> verts{ t1, t2, t3 };
H::Draw.Polygon(3, verts.data(), color);
Vertex_t t1 = { { cx + p1.x * _cos - p1.y * _sin, cy + p1.y * _cos + p1.x * _sin } };
Vertex_t t2 = { { cx + p2.x * _cos - p2.y * _sin, cy + p2.y * _cos + p2.x * _sin } };
Vertex_t t3 = { { cx + p3.x * _cos - p3.y * _sin, cy + p3.y * _cos + p3.x * _sin } };
H::Draw.FillPolygon({ t1, t2, t3 }, color);
}
void CPlayerArrows::Run(CTFPlayer* pLocal)
+1 -1
View File
@@ -363,7 +363,7 @@ void CRadar::DrawPoints(CTFPlayer* pLocal)
const int iOffset = z < 0 ? -5 : 5;
const int yPos = z < 0 ? y - iBounds / 2 - 2 : y + iBounds / 2 + 2;
H::Draw.DrawFillTriangle({ Vec2(m, yPos), Vec2(m + iSize * 0.5f, yPos + iOffset), Vec2(m + iSize, yPos) }, drawColor);
H::Draw.FillPolygon({ Vec2(m, yPos), Vec2(m + iSize * 0.5f, yPos + iOffset), Vec2(m + iSize, yPos) }, drawColor);
}
}
}
@@ -76,15 +76,15 @@ void CSpectatorList::Run(CTFPlayer* pLocal)
int y = Vars::Menu::SpectatorsDisplay.Value.y + 8;
EAlign align = ALIGN_TOP;
if (x <= (100 + 50 * Vars::Menu::DPI.Value))
if (x <= (100 + 50 * Vars::Menu::Scale.Value))
{
// iconOffset = 36;
x -= 42 * Vars::Menu::DPI.Value;
x -= 42 * Vars::Menu::Scale.Value;
align = ALIGN_TOPLEFT;
}
else if (x >= H::Draw.m_nScreenW - (100 + 50 * Vars::Menu::DPI.Value))
else if (x >= H::Draw.m_nScreenW - (100 + 50 * Vars::Menu::Scale.Value))
{
x += 42 * Vars::Menu::DPI.Value;
x += 42 * Vars::Menu::Scale.Value;
align = ALIGN_TOPRIGHT;
}
//else
@@ -95,7 +95,7 @@ void CSpectatorList::Run(CTFPlayer* pLocal)
const auto& fFont = H::Fonts.GetFont(FONT_INDICATORS);
H::Draw.String(fFont, x, y, Vars::Menu::Theme::Accent.Value, align, "Spectating You:");
H::Draw.StringOutlined(fFont, x, y, Vars::Menu::Theme::Accent.Value, Vars::Menu::Theme::Background.Value, align, "Spectating You:");
for (auto& Spectator : m_vSpectators)
{
y += fFont.m_nTall + 3;
@@ -129,6 +129,6 @@ void CSpectatorList::Run(CTFPlayer* pLocal)
color = { 255, 100, 100, 255 };
else if (FNV1A::Hash32(Spectator.m_sMode.c_str()) == FNV1A::Hash32Const("1st"))
color = { 255, 200, 127, 255 };
H::Draw.String(fFont, x + iconOffset, y, color, align, "%s - %s (respawn %ds)", Spectator.m_sName.c_str(), Spectator.m_sMode.c_str(), Spectator.m_iRespawnIn);
H::Draw.StringOutlined(fFont, x + iconOffset, y, color, Vars::Menu::Theme::Background.Value, align, "%s - %s (respawn %ds)", Spectator.m_sName.c_str(), Spectator.m_sMode.c_str(), Spectator.m_iRespawnIn);
}
}
+42 -42
View File
@@ -44,20 +44,20 @@ void CVisuals::DrawTicks(CTFPlayer* pLocal)
const auto& fFont = H::Fonts.GetFont(FONT_INDICATORS);
int iTicks = G::ShiftedTicks + G::ChokeAmount;
int iOffset = 7 + 12 * Vars::Menu::DPI.Value;
int iOffset = 7 + 12 * Vars::Menu::Scale.Value;
float flRatio = float(std::clamp(iTicks, 0, G::MaxShift)) / G::MaxShift;
float flSizeX = 100 * Vars::Menu::DPI.Value, flSizeY = 12 * Vars::Menu::DPI.Value, flPosX = dtPos.x - flSizeX / 2, flPosY = dtPos.y + 5 + fFont.m_nTall;
float flSizeX = 100 * Vars::Menu::Scale.Value, flSizeY = 12 * Vars::Menu::Scale.Value, flPosX = dtPos.x - flSizeX / 2, flPosY = dtPos.y + 5 + fFont.m_nTall;
H::Draw.String(fFont, dtPos.x, dtPos.y + 2, Vars::Menu::Theme::Active.Value, ALIGN_TOP, "Ticks %d / %d", iTicks, G::MaxShift);
H::Draw.StringOutlined(fFont, dtPos.x, dtPos.y + 2, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, ALIGN_TOP, "Ticks %d / %d", iTicks, G::MaxShift);
if (G::WaitForShift)
H::Draw.String(fFont, dtPos.x, dtPos.y + fFont.m_nTall + iOffset, Vars::Menu::Theme::Active.Value, ALIGN_TOP, "Not Ready");
H::Draw.StringOutlined(fFont, dtPos.x, dtPos.y + fFont.m_nTall + iOffset, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, ALIGN_TOP, "Not Ready");
H::Draw.LineRect(flPosX, dtPos.y + 5 + fFont.m_nTall, flSizeX, flSizeY, Vars::Menu::Theme::Accent.Value);
H::Draw.LineRoundRect(flPosX, dtPos.y + 5 + fFont.m_nTall, flSizeX, flSizeY, 3 * Vars::Menu::Scale.Value, Vars::Menu::Theme::Accent.Value, 16);
if (flRatio)
{
flSizeX -= 4, flSizeY -= 4, flPosX = dtPos.x - flSizeX / 2;
H::Draw.StartClipping(flPosX, flPosY, flSizeX * flRatio, flSizeY + 2 /*?*/);
H::Draw.FillRect(flPosX, flPosY + 2, flSizeX, flSizeY, Vars::Menu::Theme::Accent.Value);
flSizeX -= 4, flSizeY -= 4, flPosX = dtPos.x - flSizeX / 2, flPosY += 2;
H::Draw.StartClipping(flPosX, flPosY, flSizeX * flRatio, flSizeY);
H::Draw.FillRoundRect(flPosX, flPosY, flSizeX, flSizeY, 3 * Vars::Menu::Scale.Value, Vars::Menu::Theme::Accent.Value, 16);
H::Draw.EndClipping();
}
}
@@ -89,22 +89,22 @@ void CVisuals::DrawOnScreenPing(CTFPlayer* pLocal)
const auto& fFont = H::Fonts.GetFont(FONT_INDICATORS);
EAlign align = ALIGN_TOP;
if (x <= (100 + 50 * Vars::Menu::DPI.Value))
if (x <= (100 + 50 * Vars::Menu::Scale.Value))
{
x -= 42 * Vars::Menu::DPI.Value;
x -= 42 * Vars::Menu::Scale.Value;
align = ALIGN_TOPLEFT;
}
else if (x >= H::Draw.m_nScreenW - (100 + 50 * Vars::Menu::DPI.Value))
else if (x >= H::Draw.m_nScreenW - (100 + 50 * Vars::Menu::Scale.Value))
{
x += 42 * Vars::Menu::DPI.Value;
x += 42 * Vars::Menu::Scale.Value;
align = ALIGN_TOPRIGHT;
}
if (flFake || Vars::Backtrack::Interp.Value && Vars::Backtrack::Enabled.Value)
H::Draw.String(fFont, x, y, Vars::Menu::Theme::Active.Value, align, "Real %.0f (+ %.0f) ms", flLatency, flFake);
H::Draw.StringOutlined(fFont, x, y, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, "Real %.0f (+ %.0f) ms", flLatency, flFake);
else
H::Draw.String(fFont, x, y, Vars::Menu::Theme::Active.Value, align, "Real %.0f ms", flLatency);
H::Draw.String(fFont, x, y += fFont.m_nTall + 1, Vars::Menu::Theme::Active.Value, align, "Scoreboard %d ms", iLatencyScoreboard);
H::Draw.StringOutlined(fFont, x, y, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, "Real %.0f ms", flLatency);
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, "Scoreboard %d ms", iLatencyScoreboard);
}
void CVisuals::DrawOnScreenConditions(CTFPlayer* pLocal)
@@ -117,14 +117,14 @@ void CVisuals::DrawOnScreenConditions(CTFPlayer* pLocal)
const auto& fFont = H::Fonts.GetFont(FONT_INDICATORS);
EAlign align = ALIGN_TOP;
if (x <= (100 + 50 * Vars::Menu::DPI.Value))
if (x <= (100 + 50 * Vars::Menu::Scale.Value))
{
x -= 42 * Vars::Menu::DPI.Value;
x -= 42 * Vars::Menu::Scale.Value;
align = ALIGN_TOPLEFT;
}
else if (x >= H::Draw.m_nScreenW - (100 + 50 * Vars::Menu::DPI.Value))
else if (x >= H::Draw.m_nScreenW - (100 + 50 * Vars::Menu::Scale.Value))
{
x += 42 * Vars::Menu::DPI.Value;
x += 42 * Vars::Menu::Scale.Value;
align = ALIGN_TOPRIGHT;
}
@@ -133,7 +133,7 @@ void CVisuals::DrawOnScreenConditions(CTFPlayer* pLocal)
int offset = 0;
for (const std::wstring& cond : conditionsVec)
{
H::Draw.String(fFont, x, y + offset, Vars::Menu::Theme::Active.Value, align, cond.data());
H::Draw.StringOutlined(fFont, x, y + offset, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, cond.data());
offset += fFont.m_nTall + 1;
}
}
@@ -154,21 +154,21 @@ void CVisuals::DrawSeedPrediction(CTFPlayer* pLocal)
const auto& fFont = H::Fonts.GetFont(FONT_INDICATORS);
EAlign align = ALIGN_TOP;
if (x <= (100 + 50 * Vars::Menu::DPI.Value))
if (x <= (100 + 50 * Vars::Menu::Scale.Value))
{
x -= 42 * Vars::Menu::DPI.Value;
x -= 42 * Vars::Menu::Scale.Value;
align = ALIGN_TOPLEFT;
}
else if (x >= H::Draw.m_nScreenW - (100 + 50 * Vars::Menu::DPI.Value))
else if (x >= H::Draw.m_nScreenW - (100 + 50 * Vars::Menu::Scale.Value))
{
x += 42 * Vars::Menu::DPI.Value;
x += 42 * Vars::Menu::Scale.Value;
align = ALIGN_TOPRIGHT;
}
const auto& cColor = F::NoSpreadHitscan.bSynced ? Vars::Menu::Theme::Active.Value : Vars::Menu::Theme::Inactive.Value;
H::Draw.String(fFont, x, y, cColor, align, std::format("Uptime {}", F::NoSpreadHitscan.GetFormat(F::NoSpreadHitscan.flServerTime)).c_str());
H::Draw.String(fFont, x, y += fFont.m_nTall + 1, cColor, align, std::format("Mantissa step {}", F::NoSpreadHitscan.flMantissaStep).c_str());
H::Draw.StringOutlined(fFont, x, y, cColor, Vars::Menu::Theme::Background.Value, align, std::format("Uptime {}", F::NoSpreadHitscan.GetFormat(F::NoSpreadHitscan.flServerTime)).c_str());
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, cColor, Vars::Menu::Theme::Background.Value, align, std::format("Mantissa step {}", F::NoSpreadHitscan.flMantissaStep).c_str());
}
std::deque<Vec3> SplashTrace(Vec3 vOrigin, float flRadius, Vec3 vNormal = { 0, 0, 1 }, bool bTrace = true, int iSegments = 32)
@@ -488,23 +488,23 @@ void CVisuals::DrawDebugInfo(CTFPlayer* pLocal)
if (pCmd)
{
H::Draw.String(fFont, x, y += fFont.m_nTall + 1, {}, ALIGN_TOPLEFT, "View: (%.3f, %.3f, %.3f)", pCmd->viewangles.x, pCmd->viewangles.y, pCmd->viewangles.z);
H::Draw.String(fFont, x, y += fFont.m_nTall + 1, {}, ALIGN_TOPLEFT, "Move: (%.0f, %.0f, %.0f)", pCmd->forwardmove, pCmd->sidemove, pCmd->upmove);
H::Draw.String(fFont, x, y += fFont.m_nTall + 1, {}, ALIGN_TOPLEFT, "Buttons: %i", pCmd->buttons);
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, "View: (%.3f, %.3f, %.3f)", pCmd->viewangles.x, pCmd->viewangles.y, pCmd->viewangles.z);
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, "Move: (%.0f, %.0f, %.0f)", pCmd->forwardmove, pCmd->sidemove, pCmd->upmove);
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, "Buttons: %i", pCmd->buttons);
}
{
Vec3 vOrigin = pLocal->m_vecOrigin();
H::Draw.String(fFont, x, y += fFont.m_nTall + 1, {}, ALIGN_TOPLEFT, "Origin: (%.3f, %.3f, %.3f)", vOrigin.x, vOrigin.y, vOrigin.z);
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, "Origin: (%.3f, %.3f, %.3f)", vOrigin.x, vOrigin.y, vOrigin.z);
}
{
Vec3 vVelocity = pLocal->m_vecVelocity();
H::Draw.String(fFont, x, y += fFont.m_nTall + 1, {}, ALIGN_TOPLEFT, "Velocity: %.3f (%.3f, %.3f, %.3f)", vVelocity.Length(), vVelocity.x, vVelocity.y, vVelocity.z);
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, "Velocity: %.3f (%.3f, %.3f, %.3f)", vVelocity.Length(), vVelocity.x, vVelocity.y, vVelocity.z);
}
H::Draw.String(fFont, x, y += fFont.m_nTall + 1, {}, ALIGN_TOPLEFT, std::format("Choke: {}, {}", G::Choking, I::ClientState->chokedcommands).c_str());
H::Draw.String(fFont, x, y += fFont.m_nTall + 1, {}, ALIGN_TOPLEFT, std::format("Ticks: {}, {}", G::ShiftedTicks, G::ShiftedGoal).c_str());
H::Draw.String(fFont, x, y += fFont.m_nTall + 1, {}, ALIGN_TOPLEFT, "Round state: %i", SDK::GetRoundState());
H::Draw.String(fFont, x, y += fFont.m_nTall + 1, {}, ALIGN_TOPLEFT, "Tickcount: %i", pLocal->m_nTickBase());
H::Draw.String(fFont, x, y += fFont.m_nTall + 1, {}, ALIGN_TOPLEFT, "Entities: %i (%i, %i)", I::ClientEntityList->GetMaxEntities(), I::ClientEntityList->GetHighestEntityIndex(), I::ClientEntityList->NumberOfEntities(false));
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, std::format("Choke: {}, {}", G::Choking, I::ClientState->chokedcommands).c_str());
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, std::format("Ticks: {}, {}", G::ShiftedTicks, G::ShiftedGoal).c_str());
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, "Round state: %i", SDK::GetRoundState());
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, "Tickcount: %i", pLocal->m_nTickBase());
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, "Entities: %i (%i, %i)", I::ClientEntityList->GetMaxEntities(), I::ClientEntityList->GetHighestEntityIndex(), I::ClientEntityList->NumberOfEntities(false));
if (!pWeapon || !pCmd)
return;
@@ -514,11 +514,11 @@ void CVisuals::DrawDebugInfo(CTFPlayer* pLocal)
float flSecondaryAttack = pWeapon->m_flNextSecondaryAttack();
float flAttack = pLocal->m_flNextAttack();
H::Draw.String(fFont, x, y += (fFont.m_nTall + 1) * 2, {}, ALIGN_TOPLEFT, std::format("Attacking: {} ({})", G::Attacking, bool(pCmd->buttons & IN_ATTACK)).c_str());
H::Draw.String(fFont, x, y += fFont.m_nTall + 1, {}, ALIGN_TOPLEFT, std::format("CanPrimaryAttack: {} ([{:.3f} | {:.3f}] <= {:.3f})", G::CanPrimaryAttack, flPrimaryAttack, flAttack, flTime).c_str());
H::Draw.String(fFont, x, y += fFont.m_nTall + 1, {}, ALIGN_TOPLEFT, std::format("CanSecondaryAttack: {} ([{:.3f} | {:.3f}] <= {:.3f})", G::CanSecondaryAttack, flSecondaryAttack, flAttack, flTime).c_str());
H::Draw.String(fFont, x, y += fFont.m_nTall + 1, {}, ALIGN_TOPLEFT, std::format("Attack: {:.3f}, {:.3f}; {:.3f}", flTime - flPrimaryAttack, flTime - flSecondaryAttack, flTime - flAttack).c_str());
H::Draw.String(fFont, x, y += fFont.m_nTall + 1, {}, ALIGN_TOPLEFT, std::format("Reload: {} ({} || {} != 0)", G::Reloading, pWeapon->m_bInReload(), pWeapon->m_iReloadMode()).c_str());
H::Draw.StringOutlined(fFont, x, y += (fFont.m_nTall + 1) * 2, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, std::format("Attacking: {} ({})", G::Attacking, bool(pCmd->buttons & IN_ATTACK)).c_str());
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, std::format("CanPrimaryAttack: {} ([{:.3f} | {:.3f}] <= {:.3f})", G::CanPrimaryAttack, flPrimaryAttack, flAttack, flTime).c_str());
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, std::format("CanSecondaryAttack: {} ([{:.3f} | {:.3f}] <= {:.3f})", G::CanSecondaryAttack, flSecondaryAttack, flAttack, flTime).c_str());
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, std::format("Attack: {:.3f}, {:.3f}; {:.3f}", flTime - flPrimaryAttack, flTime - flSecondaryAttack, flTime - flAttack).c_str());
H::Draw.StringOutlined(fFont, x, y += fFont.m_nTall + 1, {}, { 0, 0, 0, 255 }, ALIGN_TOPLEFT, std::format("Reload: {} ({} || {} != 0)", G::Reloading, pWeapon->m_bInReload(), pWeapon->m_iReloadMode()).c_str());
}
}
@@ -820,7 +820,7 @@ void CVisuals::PickupTimers()
Vec3 vScreen;
if (SDK::W2S(pickupData->Location, vScreen))
H::Draw.String(H::Fonts.GetFont(FONT_ESP), vScreen.x, vScreen.y, color, ALIGN_CENTER, timerText.c_str());
H::Draw.StringOutlined(H::Fonts.GetFont(FONT_ESP), vScreen.x, vScreen.y, color, Vars::Menu::Theme::Background.Value, ALIGN_CENTER, timerText.c_str());
++pickupData;
}
+1 -1
View File
@@ -21,7 +21,7 @@ void Paint()
// dumb FUCKN+IG CHeck for fonts
int w = 0, h = 0; I::MatSystemSurface->GetTextSize(H::Fonts.GetFont(FONT_ESP).m_dwFont, L"", w, h);
if (!h)
H::Fonts.Reload(Vars::Menu::DPI.Map[DEFAULT_BIND]);
H::Fonts.Reload(Vars::Menu::Scale.Map[DEFAULT_BIND]);
F::Notifications.Draw();
+152 -25
View File
@@ -1,5 +1,6 @@
#include "Draw.h"
#include "../../Vars.h"
#include "Icons.h"
#include "../../Definitions/Interfaces.h"
#include "../../../Utils/Math/Math.h"
@@ -28,6 +29,11 @@ void CDraw::UpdateW2SMatrix()
}
}
bool CDraw::IsColorBright(const Color_t& clr)
{
return clr.r + clr.g + clr.b > 510;
}
void CDraw::String(const Font_t& font, int x, int y, const Color_t& clr, const EAlign& align, const char* str, ...)
{
if (str == nullptr)
@@ -98,12 +104,113 @@ void CDraw::String(const Font_t& font, int x, int y, const Color_t& clr, const E
I::MatSystemSurface->DrawPrintText(wstr, int(wcslen(wstr)));
}
void CDraw::Line(int x, int y, int x1, int y1, const Color_t& clr)
void CDraw::StringOutlined(const Font_t& font, int x, int y, const Color_t& clr, const Color_t& out, const EAlign& align, const char* str, ...)
{
if (str == nullptr)
return;
va_list va_alist;
char cbuffer[1024] = { '\0' };
wchar_t wstr[1024] = { '\0' };
va_start(va_alist, str);
vsprintf_s(cbuffer, str, va_alist);
va_end(va_alist);
wsprintfW(wstr, L"%hs", cbuffer);
const auto dwFont = font.m_dwFont;
int w = 0, h = 0; I::MatSystemSurface->GetTextSize(dwFont, wstr, w, h);
switch (align)
{
case ALIGN_TOPLEFT: break;
case ALIGN_TOP: x -= w / 2; break;
case ALIGN_TOPRIGHT: x -= w; break;
case ALIGN_LEFT: y -= h / 2; break;
case ALIGN_CENTER: x -= w / 2; y -= h / 2; break;
case ALIGN_RIGHT: x -= w; y -= h / 2; break;
case ALIGN_BOTTOMLEFT: y -= h; break;
case ALIGN_BOTTOM: x -= w / 2; y -= h; break;
case ALIGN_BOTTOMRIGHT: x -= w; y -= h; break;
}
auto outline = out;
std::vector<std::pair<int, int>> vOutline = { { 1, 1 } };
if (!Vars::Menu::CheapText.Value)
{
vOutline = { { -1, 0 }, { 0, -1 }, { 1, 0 }, { 0, 1 }, { -1, -1 }, { 1, 1 }, { -1, 1 }, { 1, -1 } };
outline.a /= 2;
}
for (auto& [x2, y2] : vOutline)
{
I::MatSystemSurface->DrawSetTextPos(x + x2, y + y2);
I::MatSystemSurface->DrawSetTextFont(dwFont);
I::MatSystemSurface->DrawSetTextColor(outline.r, outline.g, outline.b, outline.a);
I::MatSystemSurface->DrawPrintText(wstr, int(wcslen(wstr)));
}
I::MatSystemSurface->DrawSetTextPos(x, y);
I::MatSystemSurface->DrawSetTextFont(dwFont);
I::MatSystemSurface->DrawSetTextColor(clr.r, clr.g, clr.b, clr.a);
I::MatSystemSurface->DrawPrintText(wstr, int(wcslen(wstr)));
}
void CDraw::StringOutlined(const Font_t& font, int x, int y, const Color_t& clr, const Color_t& out, const EAlign& align, const wchar_t* str, ...)
{
if (str == nullptr)
return;
va_list va_alist;
wchar_t wstr[1024] = { '\0' };
va_start(va_alist, str);
vswprintf_s(wstr, str, va_alist);
va_end(va_alist);
const auto dwFont = font.m_dwFont;
int w = 0, h = 0; I::MatSystemSurface->GetTextSize(dwFont, wstr, w, h);
switch (align)
{
case ALIGN_TOPLEFT: break;
case ALIGN_TOP: x -= w / 2; break;
case ALIGN_TOPRIGHT: x -= w; break;
case ALIGN_LEFT: y -= h / 2; break;
case ALIGN_CENTER: x -= w / 2; y -= h / 2; break;
case ALIGN_RIGHT: x -= w; y -= h / 2; break;
case ALIGN_BOTTOMLEFT: y -= h; break;
case ALIGN_BOTTOM: x -= w / 2; y -= h; break;
case ALIGN_BOTTOMRIGHT: x -= w; y -= h; break;
}
auto outline = out;
std::vector<std::pair<int, int>> vOutline = { { 1, 1 } };
if (!Vars::Menu::CheapText.Value)
{
vOutline = { { -1, 0 }, { 0, -1 }, { 1, 0 }, { 0, 1 }, { -1, -1 }, { 1, 1 }, { -1, 1 }, { 1, -1 } };
outline.a /= 2;
}
for (auto& [x2, y2] : vOutline)
{
I::MatSystemSurface->DrawSetTextPos(x + x2, y + y2);
I::MatSystemSurface->DrawSetTextFont(dwFont);
I::MatSystemSurface->DrawSetTextColor(outline.r, outline.g, outline.b, outline.a);
I::MatSystemSurface->DrawPrintText(wstr, int(wcslen(wstr)));
}
I::MatSystemSurface->DrawSetTextPos(x, y);
I::MatSystemSurface->DrawSetTextFont(dwFont);
I::MatSystemSurface->DrawSetTextColor(clr.r, clr.g, clr.b, clr.a);
I::MatSystemSurface->DrawPrintText(wstr, int(wcslen(wstr)));
}
void CDraw::Line(int x1, int y1, int x2, int y2, const Color_t& clr)
{
I::MatSystemSurface->DrawSetColor(clr.r, clr.g, clr.b, clr.a);
I::MatSystemSurface->DrawLine(x, y, x1, y1);
I::MatSystemSurface->DrawLine(x1, y1, x2, y2);
}
void CDraw::Polygon(int count, Vertex_t* vertices, const Color_t& clr)
void CDraw::FillPolygon(std::vector<Vertex_t> vertices, const Color_t& clr)
{
static int id = 0;
if (!I::MatSystemSurface->IsTextureIDValid(id))
@@ -111,19 +218,17 @@ void CDraw::Polygon(int count, Vertex_t* vertices, const Color_t& clr)
I::MatSystemSurface->DrawSetColor(clr.r, clr.g, clr.b, clr.a);
I::MatSystemSurface->DrawSetTexture(id);
I::MatSystemSurface->DrawTexturedPolygon(count, vertices);
I::MatSystemSurface->DrawTexturedPolygon(int(vertices.size()), vertices.data());
}
void CDraw::LinePolygon(std::vector<Vertex_t> vertices, const Color_t& clr)
{
static int id = 0;
if (!I::MatSystemSurface->IsTextureIDValid(id))
id = I::MatSystemSurface->CreateNewTextureID();
void CDraw::DrawFillTriangle(const std::array<Vec2, 3>& points, const Color_t& clr)
{
std::array<Vertex_t, 3> vertices{ Vertex_t(points.at(0)), Vertex_t(points.at(1)), Vertex_t(points.at(2)) };
Polygon(3, vertices.data(), clr);
}
void CDraw::DrawLineTriangle(const std::array<Vec2, 3>& points, const Color_t& clr)
{
Line(points.at(0).x, points.at(0).y, points.at(1).x, points.at(1).y, clr);
Line(points.at(1).x, points.at(1).y, points.at(2).x, points.at(2).y, clr);
Line(points.at(2).x, points.at(2).y, points.at(0).x, points.at(0).y, clr);
I::MatSystemSurface->DrawSetColor(clr.r, clr.g, clr.b, clr.a);
I::MatSystemSurface->DrawSetTexture(id);
I::MatSystemSurface->DrawTexturedPolyLine(vertices.data(), int(vertices.size()));
}
void CDraw::FillRect(int x, int y, int w, int h, const Color_t& clr)
@@ -171,37 +276,59 @@ void CDraw::FillRectPercent(int x, int y, int w, int h, float t, const Color_t&
FillRect(x - 1, y - 1, nw + 2, nh + 2, out);
FillRect(x, y, nw, nh, clr);
}
void CDraw::RoundRect(int x, int y, int w, int h, int radius, const Color_t& clr)
void CDraw::FillRoundRect(int x, int y, int w, int h, int radius, const Color_t& clr, int iCount)
{
Vertex_t roundsquare[64];
std::vector<Vertex_t> vertices = {};
int _iCount = iCount / 4;
float flDelta = 90.f / _iCount;
for (int i = 0; i < 4; i++)
{
const int _x = x + ((i < 2) ? (w - radius) : radius);
const int _y = y + ((i % 3) ? (h - radius) : radius);
const float a = 90.f * i;
for (int j = 0; j < 16; j++)
for (int j = 0; j <= _iCount; j++)
{
const float _a = DEG2RAD(a + j * 6.f);
roundsquare[(i * 16) + j] = Vertex_t(Vector2D(_x + radius * sin(_a), _y - radius * cos(_a)));
const float _a = DEG2RAD(a + j * flDelta);
vertices.emplace_back(Vertex_t({ { _x + radius * sinf(_a), _y - radius * cosf(_a) } }));
}
}
Polygon(64, roundsquare, clr);
FillPolygon(vertices, clr);
}
void CDraw::LineRoundRect(int x, int y, int w, int h, int radius, const Color_t& clr, int iCount)
{
std::vector<Vertex_t> vertices = {};
w -= 1, h -= 1;
int _iCount = iCount / 4;
float flDelta = 90.f / _iCount;
for (int i = 0; i < 4; i++)
{
const int _x = x + ((i < 2) ? (w - radius) : radius);
const int _y = y + ((i % 3) ? (h - radius) : radius);
const float a = 90.f * i;
for (int j = 0; j <= _iCount; j++)
{
const float _a = DEG2RAD(a + j * flDelta);
vertices.emplace_back(Vertex_t({ { _x + radius * sinf(_a), _y - radius * cosf(_a) } }));
}
}
LinePolygon(vertices, clr);
}
void CDraw::FillCircle(int x, int y, float radius, int segments, const Color_t clr)
{
static std::vector<Vertex_t> vertices = {};
std::vector<Vertex_t> vertices = {};
const float step = static_cast<float>(PI) * 2.0f / segments;
for (float a = 0; a < PI * 2.0f; a += step)
vertices.emplace_back(Vertex_t{ { radius * cosf(a) + x, radius * sinf(a) + y } });
vertices.emplace_back(Vertex_t({ radius * cosf(a) + x, radius * sinf(a) + y }));
Polygon(segments, vertices.data(), clr);
FillPolygon(vertices, clr);
vertices.clear();
}
+9 -6
View File
@@ -23,14 +23,16 @@ public:
void UpdateScreenSize();
void UpdateW2SMatrix();
bool IsColorBright(const Color_t& clr);
void String(const Font_t& font, int x, int y, const Color_t& clr, const EAlign& align, const char* str, ...);
void String(const Font_t& font, int x, int y, const Color_t& clr, const EAlign& align, const wchar_t* str, ...);
void StringOutlined(const Font_t& font, int x, int y, const Color_t& clr, const Color_t& out, const EAlign& align, const char* str, ...);
void StringOutlined(const Font_t& font, int x, int y, const Color_t& clr, const Color_t& out, const EAlign& align, const wchar_t* str, ...);
void Line(int x, int y, int x1, int y1, const Color_t& clr);
void Polygon(int count, Vertex_t* vertices, const Color_t& clr);
void DrawFillTriangle(const std::array<Vec2, 3>& points, const Color_t& clr);
void DrawLineTriangle(const std::array<Vec2, 3>& points, const Color_t& clr);
void Line(int x1, int y1, int x2, int y2, const Color_t& clr);
void FillPolygon(std::vector<Vertex_t> vertices, const Color_t& clr);
void LinePolygon(std::vector<Vertex_t> vertices, const Color_t& clr);
void FillRect(int x, int y, int w, int h, const Color_t& clr);
void LineRect(int x, int y, int w, int h, const Color_t& clr);
@@ -38,7 +40,8 @@ public:
void FillRectOutline(int x, int y, int w, int h, const Color_t& clr, const Color_t& out = { 0, 0, 0, 255 });
void LineRectOutline(int x, int y, int w, int h, const Color_t& clr, const Color_t& out = { 0, 0, 0, 255 }, bool inside = true);
void FillRectPercent(int x, int y, int w, int h, float t, const Color_t& clr, const Color_t& out = { 0, 0, 0, 255 }, const EAlign& align = ALIGN_LEFT, bool adjust = false);
void RoundRect(int x, int y, int w, int h, int radius, const Color_t& clr);
void FillRoundRect(int x, int y, int w, int h, int radius, const Color_t& clr, int iCount = 64);
void LineRoundRect(int x, int y, int w, int h, int radius, const Color_t& clr, int iCount = 64);
void FillCircle(int x, int y, float radius, int segments, Color_t clr);
void LineCircle(int x, int y, float radius, int segments, const Color_t& clr);
+2 -2
View File
@@ -2,8 +2,8 @@
void CFonts::Reload(float flDPI)
{
m_mapFonts[FONT_ESP] = { "Verdana", int(12.f * flDPI), FONTFLAG_OUTLINE, 0 };
m_mapFonts[FONT_INDICATORS] = { "Verdana", int(13.f * flDPI), FONTFLAG_OUTLINE, 0 };
m_mapFonts[FONT_ESP] = { "Verdana", int(12.f * flDPI), FONTFLAG_ANTIALIAS, 0 };
m_mapFonts[FONT_INDICATORS] = { "Verdana", int(13.f * flDPI), FONTFLAG_ANTIALIAS, 0 };
for (auto& [_, fFont] : m_mapFonts)
{
+2 -1
View File
@@ -103,7 +103,8 @@ namespace Vars
CVar(ConditionsDisplay, DragBox_t(), NOBIND)
CVar(SeedPredictionDisplay, DragBox_t(), NOBIND)
CVar(DPI, 1.f, NOBIND)
CVar(Scale, 1.f, NOBIND)
CVar(CheapText, false)
SUBNAMESPACE_BEGIN(Theme)
CVar(Accent, Color_t(255, 101, 101, 255), VISUAL)