Answers for "draw_char godot"

0

draw_char godot

func _draw():
    var font = load('res://Font.tres')
    var pos = Vector2(500, 500)
    var string = 'Test'

    for i in string.length():
        var c = string[i]
        var next_char = string[i + 1] if i + 1 < string.length() else ''
        var advance = draw_char(font, pos, c, next_char, Color.red)
        pos.x += advance
Posted by: Guest on August-31-2021

Browse Popular Code Answers by Language