Show the HUD texts' changes: text, color, position, size and alignment in place; a new font makes the text's node again.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(WindowProxy), | intent(inout) | :: | self |
subroutine update_huds(self) type(WindowProxy), intent(inout) :: self type(HUDText), pointer :: h character(len=:), allocatable :: t integer(c_int) :: status integer :: k do k = 1, self%n_huds h => self%huds(k)%p if (.not. c_associated(self%huds(k)%node) .or. h%revision() == self%huds(k)%revision) cycle if (h%font() /= self%huds(k)%font) then status = vkf_viewer_hud_remove(self%viewer_, self%huds(k)%node) call vkf_node_delete(self%huds(k)%node) call create_hud(self, k) cycle end if t = h%text() if (vkf_label_set_text(self%huds(k)%node, t, len(t, kind=c_int)) /= 0 .or. & vkf_label_set_color(self%huds(k)%node, real(h%color(), c_float)) /= 0 .or. & .not. label_set_layout(self%huds(k)%node, [h%position(), 0.0_wp], h%size(), 0.0_wp, h%alignment())) & write(*, '(a)') 'vkframes: could not update HUD text' self%huds(k)%revision = h%revision() end do end subroutine update_huds