player.ship.hudAllowsBigGui returns true when HUD is hidden

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

player.ship.hudAllowsBigGui returns true when HUD is hidden

Post by phkb »

I'm not sure if this should be catergorised as a bug or a "feature" but anyway...

If I do this when using the default HUD:

Code: Select all

log(this.name, "Big Allowed: " + player.ship.hudAllowsBigGui);
I get this
[MyOXP]: Big Allowed: false
But if I do this:

Code: Select all

player.ship.hudHidden;
log(this.name, "Big Allowed: " + player.ship.hudAllowsBigGui);
I get this:
[MyOXP]: Big Allowed: true
This appears to be a mix-up in concepts. On the one hand, the HUD definition says it doesn't allow big GUIs. Using this logic, hudAllowsBigGui should always return false. Here we are referring to the allow_big_gui property of the HUD plist file that is currently selected, not the current state of the players view. On the other hand, if the HUD is hidden it by definition allows for big GUI's, so hudAllowsBigGui should always return true. Here we are referring to the current view the player has of the HUD.

Given that hudHidden is already giving us the current view the player has of the HUD, I think hudAllowsBigGui should be corrected to always report on the allow_big_gui property of the currently selected HUD.
Anonymissimus
---- E L I T E ----
---- E L I T E ----
Posts: 299
Joined: Mon Apr 27, 2015 9:03 pm

Re: player.ship.hudAllowsBigGui returns true when HUD is hidden

Post by Anonymissimus »

Is this the root cause of the issue with the email system and HUD dissappearance which I reported in your thread ?
warning sound if a missile is inbound: Missile warning
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: player.ship.hudAllowsBigGui returns true when HUD is hidden

Post by phkb »

It's possible although I struggled to reproduce the scenario on my system. What I ended up doing is always turning the HUD back on whenever the player leaves the screen.
Post Reply