Repository navigation
Expand file tree
/
Copy pathDebugTab.ts
More file actions
46 lines (40 loc) · 1.81 KB
/
Copy pathDebugTab.ts
File metadata and controls
46 lines (40 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import Java from "frida-java-bridge";
import { ObsidianLayout, add, toast, CENTER } from "frida-java-menu";
import { I18n } from "../../i18n/I18n";
import { JavaUtils } from "../../utils/JavaUtils";
import { UnityUtils } from "../../utils/UnityUtils";
/**
* ◆ INFO tab — runtime diagnostics + quick game controls.
* Archon layout: system info block → action buttons.
*/
export class DebugTab {
static draw(layout: ObsidianLayout): void {
// ── Section header ────────────────────────────────────────────
const header = layout.textView(I18n.t("menu.tabs.debug"));
header.gravity = CENTER;
add(header);
// ── Runtime info block ────────────────────────────────────────
const info: string[] = [
`Frida ${Frida.version} (${Script.runtime})`,
`Arch: ${Process.arch} PID: ${Process.id}`,
`Unity ${Il2Cpp.unityVersion} Android ${Java.androidVersion}`,
`Platform: ${Process.platform}`
];
for (const line of info) {
add(layout.textView(line));
}
// ── Actions ───────────────────────────────────────────────────
add(
layout.button(I18n.t("menu.functions.go_to_main_menu"), () => {
UnityUtils.LoadScene("MainMenu");
})
);
add(
layout.button(
"Exit Game",
() => { toast(I18n.t("menu.toasts.exit_game"), 0); },
() => { JavaUtils.exitFromApp(); }
)
);
}
}