Create BxLogger to show colored logs

This commit is contained in:
redphx
2024-04-30 18:52:56 +07:00
parent 26c318fb8d
commit edc8991a6a
9 changed files with 59 additions and 15 deletions

View File

@@ -2,6 +2,7 @@ import { MkbHandler } from "../modules/mkb/mkb-handler";
import { PrefKey, getPref } from "./preferences";
import { t } from "./translation";
import { Toast } from "./toast";
import { BxLogger } from "./bx-logger";
// Show a toast when connecting/disconecting controller
export function showGamepadToast(gamepad: Gamepad) {
@@ -10,7 +11,7 @@ export function showGamepadToast(gamepad: Gamepad) {
return;
}
console.log(gamepad);
BxLogger.info('Gamepad', gamepad);
let text = '🎮';
if (getPref(PrefKey.LOCAL_CO_OP_ENABLED)) {