Skip to content

Dynamically show comm window if it does not overlap with other UI elements #26

@BC46

Description

@BC46

Currently, Freelancer hides the comm window when the Nav Map is open. This was done because in 4:3 if there are mission objectives, the comm window would overlap with the Nav Map. However, in 16:9 and wider this isn't an issue anymore (see FLHDE/freelancer-hd-edition#322). It would be possible to dynamically check the positions of the UI elements and determine whether they would overlap. If they don't overlap, the Nav Map does not have to be hidden. The comm text can be obtained and it should be checked where it is positioned and how wide it is.

The same can be done for the following UI elements:

  • Trade window (automatically hidden by FL when opened)
  • Chat history window

Some notes:

004A0AA6: nav map left window
004CD8D3: comm text
GetNumOfActiveMissionObjectives is correct way to check if the nav map has mission objectives to show

0x4CB7AF: center comm text (bool)
0x4CB7BC: comm text width (float)
0x58A6F6: comm text width is referenced here

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions