Files

66 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.
# EmoteMenu.js — menuCiz() (satır 1)
[← EmoteMenu.js](index.md) · [← Master](../../wiki.md)
Parça 1/2 · [sonraki](menuCiz-2.md)
```javascript
function menuCiz(uiContext, secili)
{
var g = uiContext.get("panel");
g.removeAll();
// arka plan
g.rect(0, 0, 420, 320, 0xff0f0f17);
g.gradient(0, 0, 420, 320, 0xff0f0f17, 0xff070710);
// üst bar
g.rect(0, 0, 420, 38, 0xff1a1a2e);
g.rect(0, 37, 420, 1, 0xff5a4aff);
g.text("EMOTE", 210, 12, 0xffffffff, 0.5, 0.0);
// alt bar
g.rect(0, 280, 420, 40, 0xff1a1a2e);
g.rect(0, 280, 420, 1, 0xff5a4aff);
if (secili >= 0)
g.text("Secili: " + _emoteAdi(secili), 210, 292, 0xffffcc00, 0.5, 0.0);
else
g.text("Bir emote sec", 210, 292, 0xff9090a0, 0.5, 0.0);
// emote kutular — 4 sutun 3 satir = 12 slot
var emoteIsimleri = [
"Otur", "Yat", "Kalk", "İşaret",
"???", "???", "???", "???",
"???", "???", "???", "???"
];
var emoteRenkler = [
0xff5a4aff, 0xff4aff5a, 0xffff4a4a, 0xffff9f4a,
0xff4affff, 0xffff4aff, 0xffffff4a, 0xff4a8aff,
0xffff6a4a, 0xff4affaa, 0xffaaaaff, 0xffff4a8a
];
var slotW = 90, slotH = 70, gap = 8;
var ox = 12, oy = 48;
for (var i = 0; i < 12; i++)
{
var col = i % 4;
var row = Math.floor(i / 4);
var x = ox + col * (slotW + gap);
var y = oy + row * (slotH + gap);
if (i === secili)
{
// seçili — parlak çerçeve
g.rect(x - 2, y - 2, slotW + 4, slotH + 4, emoteRenkler[i]);
g.rect(x, y, slotW, slotH, 0xff2a2a3a);
}
else
{
g.rect(x, y, slotW, slotH, 0xff1a1a28);
g.rect(x + 1, y + 1, slotW - 2, slotH - 2, 0xff141420);
}
```