Files

51 lines
1.5 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.
# Darklord.js — openTelepathyMenu() (satır 485)
[← Darklord.js](index.md) · [← Master](../../wiki.md)
```javascript
function openTelepathyMenu(c, p)
{
var self = roleByPlayer(p.getName());
if (!self)
{
p.send(TAG + "\u00a7cDarkBlood kardesi degilsin.");
return;
}
var ui = mappet.createUI(c, "handler").background();
var panel = ui.graphics().id("darkblood_panel");
var click = ui.click().id("click");
panel.rxy(0.5, 0.5).wh(MENU_W, MENU_H).anchor(0.5);
click.rxy(0.5, 0.5).wh(MENU_W, MENU_H).anchor(0.5).updateDelay(0);
p.getStates().setString(UI_MODE_KEY, "menu");
panel.rect(0, 0, MENU_W, MENU_H, C_BG);
panel.rect(0, 0, MENU_W, 28, C_HEAD);
panel.rect(0, 28, MENU_W, 1, C_LINE);
panel.text("DARK BLOOD TELEPATI", 12, 8, C_RED, 0.0, 0.0);
drawUiButton(panel, 330, 5, 18, 18, "X", C_TEXT, C_BUTTON_DARK);
panel.text("Kimlik: " + self.rp, 16, 44, roleColorInt(self), 0.0, 0.0);
var y = 72;
drawUiButton(panel, 30, y, 300, 24, "Genel", C_RED, C_BUTTON);
y += 34;
for (var i = 0; i < MEMBERS.length; i++)
{
var role = MEMBERS[i];
if (role.id === self.id) continue;
if (!findPlayer(c, role.player)) continue;
drawUiButton(panel, 30, y, 300, 24, role.rp, roleColorInt(role), C_BUTTON);
y += 34;
}
drawUiButton(panel, 120, 184, 120, 20, "Kapat", C_MUTED, C_BUTTON_DARK);
p.openUI(ui, true);
}
```