Files

43 lines
1.6 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 — openMessageMenu() (satır 530)
[← Darklord.js](index.md) · [← Master](../../wiki.md)
```javascript
function openMessageMenu(c, p, targetRole)
{
var self = roleByPlayer(p.getName());
if (!self) 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(MESSAGE_W, MESSAGE_H).anchor(0.5);
click.rxy(0.5, 0.5).wh(MESSAGE_W, MESSAGE_H).anchor(0.5).updateDelay(0);
p.getStates().setString(UI_MODE_KEY, "message");
p.getStates().setString(SELECTED_TARGET_KEY, targetRole.id);
panel.rect(0, 0, MESSAGE_W, MESSAGE_H, C_BG);
panel.rect(0, 0, MESSAGE_W, 28, C_HEAD);
panel.rect(0, 28, MESSAGE_W, 1, C_LINE);
panel.text("TELEPATI MESAJI", 12, 8, C_RED, 0.0, 0.0);
drawUiButton(panel, 380, 5, 18, 18, "X", C_TEXT, C_BUTTON_DARK);
panel.text("Gonderen: " + self.rp, 16, 44, roleColorInt(self), 0.0, 0.0);
panel.text("Hedef: " + targetRole.rp, 224, 44, roleColorInt(targetRole), 0.0, 0.0);
ui.textbox("", TEXTBOX_LIMIT).id("telepathy_text")
.rx(0.5, -MESSAGE_W / 2 + 18).ry(0.5, -MESSAGE_H / 2 + 72).wh(374, 24).anchor(0, 0)
.tooltip("Telepati mesaji.", 1);
drawUiButton(panel, 18, 112, 116, 24, "Gonder", C_RED, C_BUTTON);
drawUiButton(panel, 146, 112, 116, 24, "Geri", C_TEXT, C_BUTTON_DARK);
drawUiButton(panel, 274, 112, 116, 24, "Kapat", C_MUTED, C_BUTTON_DARK);
panel.text("Mesaj normal chat'e dusmez.", 18, 162, C_MUTED, 0.0, 0.0);
p.openUI(ui, true);
}
```