Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Draw text on a decent way
#1
Code:
Public Sub DrawText(ByVal hDC As Long, ByVal X, ByVal y, ByVal Text As String, Color As Long)
    If LenB(Text) > 0 Then
    DD_BackBuffer.SetForeColor 0
    DD_BackBuffer.DrawText X + 2, y + 2, Text, False
    DD_BackBuffer.DrawText X + 1, y + 1, Text, False
    DD_BackBuffer.SetForeColor Color
    DD_BackBuffer.DrawText X, y, Text, False
    End If
End Sub
Reply
#2
Where would I put this?
Reply
#3
I'm guessing if there is already a drawtext sub, replace it?
Reply
#4
so this will make the text wider with a shadow?
Reply
#5
I dunno, it doesn't seem to work with the newer version.
Reply
#6
You need to set the font object for DX also.
Code:
Public Sub SetFont(ByVal Font As String, ByVal Size As Byte)
Dim FontInfo As New StdFont

    DD_BackBuffer.SetFontTransparency True

    FontInfo.Bold = True
    FontInfo.Size = Size
    FontInfo.Name = Font

    DD_BackBuffer.SetFont FontInfo
    
End Sub
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)