Files

47 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.
# chroma_trail.js — openMenu() (satır 827)
[← chroma_trail.js](index.md) · [← Master](../../wiki.md)
Parça 1/2 · [sonraki](openMenu-2.md)
```javascript
function openMenu(c, p) {
var server = c.getServer();
var st = p.getStates();
var spec = getSpec(st);
var life = getLife(st);
var ui = mappet.createUI(c, "uiHandler").background();
var bg = ui.graphics().rxy(0.5, 0.5).wh(UI_W, UI_H).anchor(0.5, 0.5);
bg.rect(0, 0, UI_W, UI_H, 0xE00B0C12);
bg.rect(0, 0, UI_W, 28, 0xEE14161F);
bg.rect(0, 28, UI_W, 1, 0xFFE8E8E8);
at(ui.label("§f§lChroma Iz §8- §7ayak alti blok izi"), 12, 8, 250, 12).labelAnchor(0, 0.5);
at(ui.icon("close").id("close"), UI_W - 24, 5, 18, 18);
// Blok
at(ui.label("§7Blok id"), 12, 38, 120, 12);
at(ui.textbox(spec.id, 120).id("block"), 12, 51, 200, 20)
.tooltip("Ornek: blockbuster:green, minecraft:wool", 1);
at(ui.label("§7Meta"), 222, 38, 60, 12);
at(ui.textbox(String(spec.meta), 2).id("meta"), 222, 51, 66, 20)
.tooltip("0-15. Beyaz chroma = 6", 1);
at(ui.button("§fBeyaz Chroma").id("preset"), 12, 77, 110, 20)
.tooltip(DEFAULT_BLOCK + ":" + DEFAULT_META, 1);
at(ui.button("§aBlogu Kaydet").id("save"), 128, 77, 160, 20);
at(ui.label("§8Iz blogu: §7" + spec.id + ":" + spec.meta).id("msg"), 12, 102, 276, 12);
// Kaybolma suresi
at(ui.label("§7Kaybolma suresi"), 12, 122, 150, 12);
at(ui.label(lifeText(life)).id("life"), 12, 136, 90, 20).labelAnchor(0, 0.5);
at(ui.button("§c-5").id("m5"), 110, 136, 40, 20);
at(ui.button("§e-1").id("m1"), 155, 136, 40, 20);
at(ui.button("§a+1").id("p1"), 200, 136, 40, 20);
at(ui.button("§2+5").id("p5"), 245, 136, 43, 20);
// Durum + kontrol
```