Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bolding
#4
Bolding is easy.

Code:
Public Sub DrawText(ByVal hdc As Long, _
                    ByVal X, _
                    ByVal Y, _
                    ByVal Text As String, _
                    Color As Long, _
                    Optional ByVal Bold As Boolean = False)

    SelectObject hdc, GameFont
    SetBkMode hdc, vbTransparent

    SetTextColor hdc, Color

    If Bold Then
        TextOut hdc, X - 1, Y, Text, Len(Text)
        TextOut hdc, X + 1, Y, Text, Len(Text)
        TextOut hdc, X, Y - 1, Text, Len(Text)
        TextOut hdc, X, Y + 1, Text, Len(Text)
    End If

    TextOut hdc, X, Y, Text, Len(Text)

End Sub

You can still keep the normal DrawText around, but if you want to do something bold then just do DrawText(blahblah, True).

Not sure how it would look...probably really hard to read (depending on font).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)