Repository navigation
Expand file tree
/
Copy pathMenuUI.ts
More file actions
64 lines (51 loc) · 2.14 KB
/
Copy pathMenuUI.ts
File metadata and controls
64 lines (51 loc) · 2.14 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import Java from "frida-java-bridge";
import { add, CENTER, ObsidianLayout, waitForInit, Composer } from "frida-java-menu";
import { Constants } from "../data/Constants";
import { ObsidianConfig } from "../data/LayoutConfig";
import { I18n } from "../i18n/I18n";
import { Logger } from "../logger/Logger";
import { DebugTab } from "./tabs/DebugTab";
import { MovementTab } from "./tabs/MovementTab";
import { ESPTab } from "./tabs/ESPTab";
import { ShipTab } from "./tabs/ShipTab";
import { PassiveTab } from "./tabs/PassiveTab";
import { OtherTab } from "./tabs/OtherTab";
/**
* Archon — Among Us Edition
* Mod-menu shell. Visual theme: teal / near-black (Archon overlay style).
*/
export class MenuUI {
private static readonly tag = "MenuUI";
static layout: ObsidianLayout;
static init(): void {
if (Java.available) {
Java.perform(() => {
waitForInit(MenuUI.build);
});
Logger.info(`[${this.tag}::init] Archon overlay ready`);
}
}
private static build(): void {
MenuUI.layout = new ObsidianLayout(ObsidianConfig);
const title = I18n.t("menu.info.title"); // "Archon"
const desc = I18n.t("menu.info.desc", Constants.VERSION, Il2Cpp.application.version!);
const composer = new Composer(title, desc, MenuUI.layout);
composer.icon(Constants.MOD_MENU_ICON_URL, "Web");
// ── Tab order mirrors Archon's module-card layout ─────────────
DebugTab.draw(MenuUI.layout); // ◆ INFO
MovementTab.draw(MenuUI.layout); // ◆ MOVEMENT
ESPTab.draw(MenuUI.layout); // ◆ VISION
ShipTab.draw(MenuUI.layout); // ◆ SABOTAGE
PassiveTab.draw(MenuUI.layout); // ◆ PASSIVE
OtherTab.draw(MenuUI.layout); // ◆ SETTINGS
composer.show();
}
/** Inserts a centred text label — used for section dividers. */
static addCenterText(text: string): void {
if (MenuUI.layout) {
const label = MenuUI.layout.textView(text);
label.gravity = CENTER;
add(label);
}
}
}