From 1ffe11c47f9dd841b8e04e42f5bed137e963c429 Mon Sep 17 00:00:00 2001 From: hkva Date: Sat, 19 Aug 2017 04:11:50 -0500 Subject: [PATCH] Added cat_info_min --- src/drawmgr.cpp | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/drawmgr.cpp b/src/drawmgr.cpp index 60f52aed..13a5cd85 100644 --- a/src/drawmgr.cpp +++ b/src/drawmgr.cpp @@ -20,6 +20,7 @@ void BeginCheatVisuals() { std::mutex drawing_mutex; CatVar info_text(CV_SWITCH, "info", "1", "Show info", "Show cathook version in top left corner"); +CatVar info_text_min(CV_SWITCH, "info_min", "0", "Show minimal info", "Only show cathook title in top left corner"); void DrawCheatVisuals() { std::lock_guard draw_lock(drawing_mutex); @@ -33,24 +34,26 @@ void DrawCheatVisuals() { std::string name_s, reason_s; PROF_SECTION(PT_info_text); AddSideString("cathook by nullifiedcat", colors::RainbowCurrent()); - AddSideString(hack::GetVersion(), GUIColor()); // github commit and date - AddSideString(hack::GetType(), GUIColor()); // Compile type + if (!info_text_min) { + AddSideString(hack::GetVersion(), GUIColor()); // github commit and date + AddSideString(hack::GetType(), GUIColor()); // Compile type #if ENABLE_GUI - AddSideString("Press 'INSERT' or 'F11' key to open/close cheat menu.", GUIColor()); - AddSideString("Use mouse to navigate in menu.", GUIColor()); + AddSideString("Press 'INSERT' or 'F11' key to open/close cheat menu.", GUIColor()); + AddSideString("Use mouse to navigate in menu.", GUIColor()); #endif - if (!g_IEngine->IsInGame() + if (!g_IEngine->IsInGame() #if ENABLE_GUI - || g_pGUI->Visible() + || g_pGUI->Visible() #endif - ) { - name_s = force_name.GetString(); - if (name_s.length() < 3) name_s = "*Not Set*"; - reason_s = disconnect_reason.GetString(); - if (reason_s.length() < 3) reason_s = "*Not Set*"; - AddSideString(""); // foolish - AddSideString(format("Custom Name: ", name_s), GUIColor()); - AddSideString(format("Custom Disconnect Reason: ", reason_s), GUIColor()); + ) { + name_s = force_name.GetString(); + if (name_s.length() < 3) name_s = "*Not Set*"; + reason_s = disconnect_reason.GetString(); + if (reason_s.length() < 3) reason_s = "*Not Set*"; + AddSideString(""); // foolish + AddSideString(format("Custom Name: ", name_s), GUIColor()); + AddSideString(format("Custom Disconnect Reason: ", reason_s), GUIColor()); + } } } if (CE_GOOD(g_pLocalPlayer->entity) && !g_Settings.bInvalid) {