# Panel:LocalCursorPos

- **Ortam:** İstemci, Menü
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/Panel:LocalCursorPos
- **Çeviri tarihi:** 2025-09-08

```lua
number, number Panel:LocalCursorPos()
```

## Açıklama

İmlecin konumunu, panelin konumuna (genellikle sol üst köşe) göre yerel olarak döndürür.

## Döndürülen Değerler

1. [number](https://gmod.tr/wiki/number): x koordinatı
2. [number](https://gmod.tr/wiki/number): y koordinatı

### Örnek

Bir etiket paneli oluşturup ortalayın ve metnini yerel imleç konumuyla güncelleyin.

```lua
TestLabel = vgui.Create("DLabel")
TestLabel:SetSize(100, 20)
TestLabel:Center()
TestLabel:SetPaintBackgroundEnabled(true)
TestLabel:SetColor(Color(255, 0, 0))

local x, y = 0, 0

function TestLabel:PerformLayout()

	x, y = self:LocalCursorPos()

	self:SetText(" X: "..x.." , Y: "..y)

end
```

**Çıktı:** ![](https://gmod.tr/api/uploads/wiki/574e5ef1bf3933c646e3.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/Panel:LocalCursorPos
