From 0dadbc4e30ddc0931318d797099f482917ea02e4 Mon Sep 17 00:00:00 2001 From: Roblox-Thot <67937010+Roblox-Thot@users.noreply.github.com> Date: Thu, 1 Jun 2023 21:48:53 -0400 Subject: [PATCH] fix printing status --- MicrosoftRBX-FPS/MicrosoftRBX-FPS/main.cpp | 31 +++++++++++----------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/MicrosoftRBX-FPS/MicrosoftRBX-FPS/main.cpp b/MicrosoftRBX-FPS/MicrosoftRBX-FPS/main.cpp index 34d8d7b..ef49ebb 100644 --- a/MicrosoftRBX-FPS/MicrosoftRBX-FPS/main.cpp +++ b/MicrosoftRBX-FPS/MicrosoftRBX-FPS/main.cpp @@ -172,6 +172,19 @@ void fixCursor(HWND handle) } } +void printStatus() +{ + system("cls"); + std::cout << KBLU; + std::cout << BOLD("Roblox-HWND: ") << robloxHWND << std::endl; + std::cout << KYEL; + std::cout << BOLD("Keybind: ") << toggleKeyName << std::endl; + std::cout << KRED; + std::cout << BOLD("Mode: ") << modes[mode - 1] << std::endl; + std::cout << KCYN; + std::cout << BOLD("Enabled: ") << (isEnabled ? "Enabled" : "Disabled"); +} + void init() { // FindWindow is so fucked because it has none for this so i had to use this method <3 @@ -197,15 +210,7 @@ void init() } Sleep(1000); - system("cls"); - std::cout << KBLU; - std::cout << BOLD("Roblox-HWND: ") << robloxHWND << std::endl; - std::cout << KYEL; - std::cout << BOLD("Keybind: ") << toggleKeyName << std::endl; - std::cout << KRED; - std::cout << BOLD("Mode: ") << modes[mode-1] << std::endl; - std::cout << KCYN; - std::cout << BOLD("Enabled: ") << (isEnabled ? "Enabled" : "Disabled"); + printStatus(); } void check() @@ -228,13 +233,7 @@ void toggle() if (GetAsyncKeyState(toggleKey)) { isEnabled = not isEnabled; - system("cls"); - std::cout << KBLU; - std::cout << BOLD("Roblox-HWND: ") << robloxHWND << std::endl; - std::cout << KYEL; - std::cout << BOLD("Keybind: ") << toggleKeyName << std::endl; - std::cout << KCYN; - std::cout << BOLD("Enabled: ") << (isEnabled ? "Enabled" : "Disabled"); + printStatus(); Sleep(1000); } Sleep(25);