Files

52 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.
# poker.js — openLobbyUI() (satır 199)
[← poker.js](index.md) · [← Master](../../wiki.md)
Parça 1/3 · [sonraki](openLobbyUI-2.md)
```javascript
function openLobbyUI(c, player) {
var lobby = getLobbyData(c);
var playerName = player.getName();
// Eğer oyuncu zaten aktif bir masadaysa, direkt masayı aç (Reconnection desteği)
var activeTableId = getPlayerTableId(lobby, playerName);
if (activeTableId !== null) {
openPokerUI(c, player, activeTableId);
return;
}
var ui = mappet.createUI(c, "poker_handler").background();
// LOBİ PANELİ ARKA PLANI
var bg = ui.graphics().rxy(0.5, 0.5).wh(340, 240).anchor(0.5);
// Ahşap dış kenar ve altın çerçeve
bg.rect(0, 0, 340, 240, 0xFF2A1408); // Koyu Maun Ahşap
bg.rect(4, 4, 332, 232, 0xFF422212); // Açık Maun
bg.rect(8, 8, 324, 224, 0xFFD4AF37); // Altın Şerit Çerçeve
bg.rect(10, 10, 320, 220, 0xFF141F18); // Koyu şık panel zemini
// Masa Listesi Kapsayıcı Panel
bg.rect(20, 45, 300, 135, 0x33000000);
bg.rect(20, 45, 300, 1, 0x44D4AF37);
bg.rect(20, 180, 300, 1, 0x44D4AF37);
// Başlık HUD
var titleBg = ui.graphics().rx(0.5).ry(0.5, -100).wh(200, 22).anchor(0.5);
titleBg.rect(0, 0, 200, 22, 0xDD111111);
titleBg.rect(0, 21, 200, 1, 0xFFD4AF37);
var title = ui.label("§6♦ §e§lPOKER OYUN LOBİSİ §6♣").labelAnchor(0.5).color(0xFFD700);
title.rx(0.5).ry(0.5, -100).wh(200, 20).anchor(0.5);
// Aktif Masaları Listele
var activeTablesCount = lobby.tables.length;
if (activeTablesCount === 0) {
var noTableLbl = ui.label("§7Şu anda aktif masa bulunmamaktadır.").labelAnchor(0.5);
noTableLbl.rx(0.5).ry(0.5, -10).wh(250, 20).anchor(0.5);
} else {
// Arayüze en fazla 5 masa sığdırıyoruz
var limit = Math.min(activeTablesCount, 5);
```