Show h in the window, on top of the scene (it must stay alive while
shown), from the next frame.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(WindowProxy), | intent(inout) | :: | self | |||
| type(HUDText), | intent(in), | target | :: | h |
the text (not owned) |
subroutine add_hud_text(self, h) class(WindowProxy), intent(inout) :: self type(HUDText), intent(in), target :: h !! the text (not owned) type(HUDEntry), allocatable :: tmp(:) if (.not. allocated(self%huds)) allocate(self%huds(4)) if (self%n_huds == size(self%huds)) then allocate(tmp(2 * self%n_huds)) tmp(1:self%n_huds) = self%huds(1:self%n_huds) call move_alloc(tmp, self%huds) end if self%n_huds = self%n_huds + 1 self%huds(self%n_huds)%p => h self%huds(self%n_huds)%node = c_null_ptr self%huds(self%n_huds)%revision = -1 if (self%scene_added) call create_hud(self, self%n_huds) ! shown: made now end subroutine add_hud_text