-
-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed isPlayerHudComponentVisible not working with showhud #3634
Fixed isPlayerHudComponentVisible not working with showhud #3634
Conversation
@@ -43,6 +43,9 @@ void CHudSA::Disable(bool bDisabled) | |||
else | |||
MemPut<BYTE>(FUNC_Draw, 0x80); | |||
|
|||
for (const auto& component : m_HudComponentMap) | |||
SetComponentVisible(component.first, !IsComponentVisible(component.first)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like isPlayerHudComponentVisible
will return true for a hidden component after showhud
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, do you think a copy of the components map would be good here?
To save status of each component and then restore it on the next call
Check conversation in #547. @qaisjp suggested bool isPlayerHudComponentVisible(string component, bool checkEnabled=true) I'd like to keep -- returns true by default and false when showhud command is used
bool isHudEnabled() Both variants are valid. |
Any update? |
Im not interested in advancing this PR further anymore. |
Resolves #547