surface.SetTextPos

  surface.SetTextPos( number x, number y )

Açıklama

İleride çizilecek herhangi bir metnin çizileceği sol üst konumu ayarlar.

Argümanlar

1 number x
X tam sayı koordinatı.
2 number y
Y tam sayı koordinatı.

Örnek

Ekranın sol üst civarına 'Hello World' yazar.

hook.Add( "HUDPaint", "HUDPaint_DrawABox", function() surface.SetDrawColor( 0, 0, 0, 128 ) -- Arka plan için rengi ayarla surface.DrawRect( 100, 100, 128, 20 ) -- Arka planı çiz surface.SetTextColor( 255, 255, 255 ) -- Metin rengini ayarla surface.SetTextPos( 136, 104 ) -- Metin konumunu ayarla, sol üst köşe surface.SetFont( "Default" ) -- Yazı tipini ayarla surface.DrawText( "Hello World" ) -- Metni çiz end )

Tüm sunucular · GmodTR Launcher · Rehber · GMod Wiki · GmodTR nedir? · Sunucu ekle · Discord