# DBubbleContainer

- **Ortam:** İstemci
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/DBubbleContainer
- **Çeviri tarihi:** 2025-09-08

## Açıklama

Alttan çıkan bir nokta ve yuvarlatılmış bir kutudan oluşan şeffaf gri bir konuşma balonu paneli.

[Kaynağı görüntüle](https://github.com/Facepunch/garrysmod/blob/master/garrysmod/lua/vgui/dbubblecontainer.lua)

## Ebeveyn

Bu sayfada listelenmeyen metotları vb. [DPanel](https://gmod.tr/wiki/DPanel)'dan türetir.

## Metotlar

DBubbleContainer:[GetBackgroundColor](https://gmod.tr/wiki/DBubbleContainer:GetBackgroundColor)()

Arka plan rengini döndürür, bkz. DBubbleContainer:SetBackgroundColor

DBubbleContainer:[OpenForPos](https://gmod.tr/wiki/DBubbleContainer:OpenForPos)( [number](https://gmod.tr/wiki/number) x, [number](https://gmod.tr/wiki/number) y, [number](https://gmod.tr/wiki/number) w, [number](https://gmod.tr/wiki/number) h )

Diyalog noktası konumuyla birlikte konuşma balonunun konumunu ve boyutunu ayarlar.

DBubbleContainer:[SetBackgroundColor](https://gmod.tr/wiki/DBubbleContainer:SetBackgroundColor)( [Color](https://gmod.tr/wiki/Color) color )

Arka plan rengini ayarlar, ayrıca bkz. DBubbleContainer:GetBackgroundColor

### Örnek

Ekranın ortasında bir baloncuk kapsayıcı paneli oluşturur. Arka plan [DPanel](https://gmod.tr/wiki/DPanel)'i, diyalog noktası konumunun daha iyi kontrol edilmesini sağlamak için kullanılır.

```lua
--Arka plan paneli
BGPanel = vgui.Create("DPanel")
BGPanel:SetSize(300, 170)
BGPanel:Center()
BGPanel:SetDrawBackground(false)

-- Baloncuk kapsayıcısı
local DBubbleContainer = vgui.Create("DBubbleContainer", BGPanel)

-- Diyalog noktasını soldan 50 birim olarak ayarlayın ve tüm baloncuğu 280x150 piksel yapın.
DBubbleContainer:OpenForPos(50, 0, 280, 150)
```

### Örnek

Left 4 Dead'den Bill'in bir konuşma balonu aracılığıyla konuştuğu bir panel oluşturur.

```lua
-- Bill'in resmi
local dimg = vgui.Create("DImage")
dimg:SetPos(0, ScrH()-512)
dimg:SetImage("spawnicons/models/survivors/survivor_namvet_128.png")
dimg:SizeToContents()

-- Görüntü boyutlarına göre baloncuk kapsayıcısının yerleşimini belirle
local dimg_x, dimg_y = dimg:GetPos()
local dimg_w, dimg_h = dimg:GetSize()

dimg_x = dimg_x + dimg_w/2
dimg_y = dimg_y + dimg_h/2.5

-- Baloncuk kapsayıcısı boyutu
local bubble_w, bubble_h = 150, 100

-- Baloncuk kapsayıcısını oluştur
local bubble = vgui.Create("DBubbleContainer")

-- Bill resminin üzerinde aç
bubble:OpenForPos(dimg_x, dimg_y+bubble_h-32, bubble_w, bubble_h)

-- Baloncuğa metin ekle
local lbl = vgui.Create("DLabel", bubble)
lbl:SetPos(5, 5)
lbl:SetSize(150, 50)
lbl:SetWrap(true)
lbl:SetFont("GModNotify")
lbl:SetText("Does this example get the point across?")
lbl:SetDark(true)
```

**Çıktı:** ![](https://gmod.tr/api/uploads/wiki/32d987fd3055aaea5455.jpg)

- [GMod Wiki ana sayfası](https://gmod.tr/wiki)

---

[Tüm sunucular](https://gmod.tr/) · [GmodTR Launcher](https://gmod.tr/launcher) · [Rehber](https://gmod.tr/rehber) · [GMod Wiki](https://gmod.tr/wiki) · [GmodTR nedir?](https://gmod.tr/hakkinda) · [Sunucu ekle](https://gmod.tr/sunucu-ekle) · [Discord](https://discord.gg/gmodtr)

Kaynak: https://gmod.tr/wiki/DBubbleContainer
