# DNotify

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

## Açıklama

İçeriğini bir bildirim gibi bir kez içeri ve dışarı solduran bir panel.

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

## Ebeveyn

Bu sayfada listelenmeyen metotları vb. [Panel](https://gmod.tr/wiki/Panel)'den miras alır.

## Metotlar

DNotify:[AddItem](https://gmod.tr/wiki/DNotify:AddItem)( [Panel](https://gmod.tr/wiki/Panel) pnl, [number](https://gmod.tr/wiki/number) lifeLength = nil )

Bildirime bir panel ekler.

[number](https://gmod.tr/wiki/number) DNotify:[GetAlignment](https://gmod.tr/wiki/DNotify:GetAlignment)()

Bu bildirim panelinin mevcut hizalamasını döndürür. DNotify:SetAlignment ile ayarlanır.

[table](https://gmod.tr/wiki/table) DNotify:[GetItems](https://gmod.tr/wiki/DNotify:GetItems)()

DNotify:AddItem ile eklenen tüm öğeleri döndürür.

[number](https://gmod.tr/wiki/number) DNotify:[GetLife](https://gmod.tr/wiki/DNotify:GetLife)()

DNotify'nin saniye cinsinden görüntülenme süresini döndürür. Bu, DNotify:SetLife ile ayarlanır.

[number](https://gmod.tr/wiki/number) DNotify:[GetSpacing](https://gmod.tr/wiki/DNotify:GetSpacing)()

DNotify:SetSpacing tarafından ayarlanan öğeler arasındaki boşluğu döndürür.

DNotify:[SetAlignment](https://gmod.tr/wiki/DNotify:SetAlignment)( [number](https://gmod.tr/wiki/number) alignment )

Bildirimdeki alt panellerin hizalamasını ayarlar.

DNotify:[SetLife](https://gmod.tr/wiki/DNotify:SetLife)( [number](https://gmod.tr/wiki/number) time )

DNotify için görüntülenme süresini saniye cinsinden ayarlar.

DNotify:[SetSpacing](https://gmod.tr/wiki/DNotify:SetSpacing)( [number](https://gmod.tr/wiki/number) spacing )

Bildirim panelinin alt öğeleri arasındaki boşluğu ayarlar.

DNotify:[Shuffle](https://gmod.tr/wiki/DNotify:Shuffle)()

Bu dahili olarak kullanılır - kullanabilseniz de muhtemelen kullanmamalısınız. DNotify:GetItems öğelerini konumlandırmak ve içeri/dışarı soldurmak için dahili olarak kullanılır.

### Örnek

İçinde bir metin etiketi bulunan bir bildirim paneli oluşturur.

```lua
--Bildirim paneli
local NotifyPanel = vgui.Create("DNotify")
NotifyPanel:SetPos(10, 5)
NotifyPanel:SetSize(200, 40)

-- Metin etiketi
local lbl = vgui.Create("DLabel", NotifyPanel)
lbl:Dock(FILL)
lbl:SetText("This is a notification.")
lbl:SetFont("GModNotify")
lbl:SetDark(true)

-- Etiketi bildirime ekleyin ve soldurmaya başlayın
NotifyPanel:AddItem(lbl)
```

### Örnek

Oyuncuya HEV kostümünü giymesini hatırlatan bir Dr. Kleiner bildirim paneli oluşturur.

```lua
-- Bildirim paneli
local NotifyPanel = vgui.Create("DNotify")
NotifyPanel:SetPos(15, 15)
NotifyPanel:SetSize(150, 210)

-- Gri arka plan paneli
local bg = vgui.Create("DPanel", NotifyPanel)
bg:Dock(FILL)
bg:SetBackgroundColor(Color(64, 64, 64))

-- Dr. Kleiner resmi (arka plan paneline ebeveynlenmiş)
local img = vgui.Create("DImage", bg)
img:SetPos(11, 11)
img:SetSize(128, 128)
img:SetImage("entities/npc_kleiner.png")

-- Sarı bir etiket mesajı (arka plan paneline ebeveynlenmiş)
local lbl = vgui.Create("DLabel", bg)
lbl:SetPos(11, 136)
lbl:SetSize(128, 72)
lbl:SetText("Remember to wear your HEV suit!")
lbl:SetTextColor(Color(255, 200, 0))
lbl:SetFont("GModNotify")
lbl:SetWrap(true)

-- Arka plan panelini bildirime ekleyin
NotifyPanel:AddItem(bg)
```

**Çıktı:** ![](https://gmod.tr/api/uploads/wiki/52dd94936b07b2391abb.gif)

- [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/DNotify
