# GM:PopulateMenuBar

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

```lua
GM:PopulateMenuBar( Panel menubar )
```

## Açıklama

Üstteki içerik menüsü (context menu) çubuğunu doldurma zamanı geldiğinde çağrılır.

## Argümanlar

1. [Panel](https://gmod.tr/wiki/Panel) **menubar**: [DMenuBar](https://gmod.tr/wiki/DMenuBar)'ın kendisi.

### Örnek

Hook'un örnek kullanımı

```lua
hook.Add( "PopulateMenuBar", "My_MenuBar", function( menubar )

	local m = menubar:AddOrGetMenu( "Test" )

	m:AddCVar( "Item 1", "console_var1", "1", "0" )

	m:AddSpacer()

	m:AddCVar( "Item 2", "console_var2", "0", "100" )

	m:AddCVar( "Check console", "console_var3", "1", "0", function() print("I was clicked!") end )

	local submenu = m:AddSubMenu( "Submenu" )

	submenu:SetDeleteSelf( false )
	submenu:AddCVar( "No password", "password", "" )
	submenu:AddSpacer()

	submenu:AddCVar( "Password: test1", "password", "test1" )
	submenu:AddCVar( "Password: lolno", "password", "lolno" )

end )
```

- [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/GM:PopulateMenuBar
