OpenXRay / OpenXRay/xray-16

Problems with task icons in PDA: icons for secondary tasks are missing, and the main task icon is not displayed after switching tasks.

Open
#2,086 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug UI
Dominant language
C++
Stars
3.6k
Forks
536
Avg merge
6d 1h
Merged PRs (30d)
3

Description

Describe the bug
There are two related issues with task icons in the PDA user interface:

  1. Secondary (additional) tasks do not display icons in map tooltips.
  2. Task icons may disappear after completing or switching tasks.
Issue 1: Missing icons for secondary tasks

In the CUIMapLocationHint::SetInfoTask() function, secondary tasks explicitly hide the icon:

else if (task->GetTaskType() == eTaskTypeAdditional)
{
m_info["t_icon"]->Show(false); <---- Here!

}

###Issue 2: Icon not rendering after task switch

After completing a task or switching the active task:

texture path is valid
InitTexture() is called

However, the icon is not rendered because UIStatic remains in a disabled texture state (m_bTextureEnable = false).

To Reproduce
Steps to reproduce the behavior:

  1. Open PDA
  2. Hover a secondary task → no icon shown
  3. Complete a task or wait for auto-switch
  4. New active task appears without icon

Expected behavior
Both storyline and additional tasks should display icons
Icons should always render when texture is set.

Actual behavior
Additional task icons are hidden
Icons may not render after task switch
Root cause
UI logic explicitly hides icons for additional tasks
UIStatic::TextureOff() disables rendering and InitTexture() does not restore it

Screenshots, videos
Image

Proposed solution
Enable icon rendering for additional tasks and align layout with storyline tasks
Ensure texture rendering is re-enabled before assigning a new texture
This results in no icon being displayed for secondary tasks, even when a valid texture is provided.
Fix PDA task icons for additional tasks and after task switch

Image

Desktop (please complete the following information):

  • OS: Windows 10 22H2 19045.6466
  • OpenXRay night build version 7368d4b0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with CUIMapLocationHint::SetInfoTask() and trace how t_icon is hidden for eTaskTypeAdditional. Then inspect UIStatic::TextureOff() and InitTexture() to verify texture rendering is re-enabled after task switches; reproduce the PDA tooltip and task-switch cases, and confirm both secondary and active-task icons render.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.