Files

36 lines
974 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# gojo_skills.js — menuHandler() (satır 112)
[← gojo_skills.js](index.md) · [← Master](../../wiki.md)
```javascript
function menuHandler(c) {
var p = c.getPlayer();
if (!p) return;
var ctx = p.getUIContext();
if (!ctx) return;
var last = ctx.getLast();
if (last === "blue") {
cast_blue(c);
} else if (last === "red") {
cast_red(c);
} else if (last === "purple") {
cast_purple(c);
} else if (last === "domain") {
cast_domain(c);
} else if (last === "infinity") {
toggle_infinity(c);
// Buton etiketini yeni duruma göre güncelle (auto-send)
var on = p.getStates().getNumber("gojo_infinity") > 0;
var btn = ctx.get("infinity");
if (btn) {
btn.label(infinityLabel(on));
btn.background(on ? 0x115522 : 0x333333);
}
} else if (last === "close") {
p.closeUI();
}
}
```