HUD text text, optionally at position ([x, y], 0 to 1; default near
the bottom left), with alignment (default ALIGN_LEFT_BOTTOM), size
(window units; default 20), color ([r, g, b] or [r, g, b, a]; default
white) and font (default: the default font).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | text |
the text |
||
| real(kind=wp), | intent(in), | optional | :: | position(2) |
[x, y] (0 to 1 across the window, y up) |
|
| integer, | intent(in), | optional | :: | alignment |
an ALIGN_* constant |
|
| real(kind=wp), | intent(in), | optional | :: | size |
character height (window units) |
|
| real(kind=wp), | intent(in), | optional | :: | color(:) |
[r, g, b] or [r, g, b, a] (0 to 1) |
|
| character(len=*), | intent(in), | optional | :: | font |
font file |
function new_hud_text(text, position, alignment, size, color, font) result(h) character(len=*), intent(in) :: text !! the text real(wp), intent(in), optional :: position(2) !! [x, y] (0 to 1 across the window, y up) real(wp), intent(in), optional :: size !! character height (window units) real(wp), intent(in), optional :: color(:) !! [r, g, b] or [r, g, b, a] (0 to 1) integer, intent(in), optional :: alignment !! an ALIGN_* constant character(len=*), intent(in), optional :: font !! font file type(HUDText) :: h h%text_ = text if (present(position)) h%position_ = position if (present(alignment)) h%alignment_ = alignment if (present(size)) h%size_ = size if (present(color)) call h%set_color(color) if (present(font)) h%font_ = font end function new_hud_text