Files

57 lines
1.8 KiB
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.
# klon_siluet.js — openMenu() (satır 172)
[← klon_siluet.js](index.md) · [← Master](../../wiki.md)
Parça 1/3 · [sonraki](openMenu-2.md)
```javascript
function openMenu(c)
{
var p = getPlayer(c);
if (!p) return;
var st = p.getStates();
var on = st.getNumber(ST_ON) === 1 && isLoopAlive(st);
var ui = mappet.createUI(c, "menuHandler").background();
var W = 250, left = -(W / 2);
// --- Baslik ---
ui.label("§d§l⟦ KOSMA SILUETI ⟧")
.rx(0.5).y(12).w(W).anchorX(0.5).labelAnchor(0.5, 0.5).color(0xff88ee);
ui.label("§7Hizlandikca iz yogunlasir §8• §7klon = kendi kiligin")
.rx(0.5).y(28).w(W).anchorX(0.5).labelAnchor(0.5, 0.5).color(0x99aabb);
// --- Ana AC/KAPA ---
ui.button(toggleLabel(on)).id("toggle")
.rx(0.5).y(46).wh(W, 28).anchorX(0.5)
.background(on ? 0x115522 : 0x3a1414)
.tooltip("§f§lSiluet izi\n§7Ac / kapa. §8(item'a duz sag tik ile ayni)");
// --- Hazir ayarlar ---
ui.label("§8HAZIR AYARLAR")
.rx(0.5, left).y(82).wh(W, 12).anchorX(0).labelAnchor(0, 0.5).color(0x667788);
var names = ["hafif", "normal", "yogun", "delilik"];
var lbls = ["§7Hafif", "§fNormal", "§eYogun", "§cDelilik"];
var pw = (W - 3 * 4) / 4;
for (var i = 0; i < names.length; i++)
{
ui.button(lbls[i]).id("pre_" + names[i])
.rx(0.5, left + i * (pw + 4)).y(96).wh(pw, 22).anchorX(0)
.background(0x222a3a)
.tooltip("§f§l" + lbls[i] + "\n" + presetTip(names[i]));
}
// --- Sayisal ayarlar (- deger +) ---
var rowY = 128;
for (var o = 0; o < OPTS.length; o++)
{
var opt = OPTS[o];
ui.button("§c§l-").id("dec_" + opt.id)
.rx(0.5, left).y(rowY).wh(24, 22).anchorX(0)
```