Files

47 lines
1.9 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.
# poker.js — openLobbyUI() (satır 199)
[← poker.js](index.md) · [← Master](../../wiki.md)
Parça 2/3 · [önceki](openLobbyUI.md) · [sonraki](openLobbyUI-3.md)
```javascript
for (var i = 0; i < limit; i++) {
var table = lobby.tables[i];
var rowYOffset = -50 + i * 24;
// Satır Arka Planı
var rowBg = ui.graphics().rx(0.5).ry(0.5, rowYOffset).wh(280, 18).anchor(0.5);
rowBg.rect(0, 0, 280, 18, 0x55000000);
rowBg.rect(0, 17, 280, 1, 0x22FFFFFF);
// Masa Adı ve Kurucu (Doğrudan rowBg üzerine çizilir)
var tableNameStr = "§e" + table.name + " §7(" + table.host + ")";
rowBg.text(tableNameStr, 8, 5, 0xFFFFFFFF);
// Doluluk ve Durum (Doğrudan rowBg üzerine çizilir)
var statusStr = "§a" + table.players.length + "/6 §7| " + (table.state === "waiting" ? "§aBekliyor" : "§cOynanıyor");
rowBg.text(statusStr, 125, 5, 0xFFFFFFFF);
// Katıl / İzle Butonu
var joinBtnText = (table.state === "waiting") ? "§aKatıl" : "§bİzle";
var btnJoin = ui.button(joinBtnText).id("lobby_join_" + table.id);
btnJoin.rx(0.5, 75).ry(0.5, rowYOffset).wh(35, 14).anchor(0.5);
// Yönetici/Kurucu Kapat Butonu
var isAdmin = isPlayerOP(player);
if (table.host === playerName || isAdmin) {
var btnClose = ui.button("§cKapat").id("lobby_close_" + table.id);
btnClose.rx(0.5, 115).ry(0.5, rowYOffset).wh(32, 14).anchor(0.5);
}
}
}
// Alt Menü Butonları (Adminlere özel Tümünü Sil butonu ile birlikte)
if (isPlayerOP(player)) {
var btnCreate = ui.button("§6§lYeni Masa").id("lobby_create");
btnCreate.rx(0.5, -85).ry(0.5, 92).wh(80, 20).anchor(0.5);
var btnRefresh = ui.button("§7§lYenile").id("lobby_refresh");
btnRefresh.rx(0.5, 0).ry(0.5, 92).wh(65, 20).anchor(0.5);
```