[Commands] Extend #devtools Functionality (#4425)

This commit is contained in:
Alex King
2024-07-22 21:44:34 -04:00
committed by GitHub
parent b6fb8daae8
commit 098498dedd
3 changed files with 30 additions and 8 deletions
+17 -3
View File
@@ -9338,6 +9338,7 @@ void Client::ShowDevToolsMenu()
std::string menu_reload_eight;
std::string menu_reload_nine;
std::string menu_toggle;
std::string window_toggle;
/**
* Search entity commands
@@ -9403,9 +9404,14 @@ void Client::ShowDevToolsMenu()
/**
* Show window status
*/
menu_toggle = Saylink::Silent("#devtools enable", "Enable");
menu_toggle = Saylink::Silent("#devtools menu enable", "Enable");
if (IsDevToolsEnabled()) {
menu_toggle = Saylink::Silent("#devtools disable", "Disable");
menu_toggle = Saylink::Silent("#devtools menu disable", "Disable");
}
window_toggle = Saylink::Silent("#devtools window enable", "Enable");
if (GetDisplayMobInfoWindow()) {
window_toggle = Saylink::Silent("#devtools window disable", "Disable");
}
/**
@@ -9426,11 +9432,19 @@ void Client::ShowDevToolsMenu()
Message(
Chat::White,
fmt::format(
"Toggle | {}",
"Toggle Menu | {}",
menu_toggle
).c_str()
);
Message(
Chat::White,
fmt::format(
"Toggle Window | {}",
window_toggle
).c_str()
);
Message(
Chat::White,
fmt::format(