Opened 9 years ago

Last modified 7 years ago

#3215 closed defect

[PATCH] After pressing tab as observer, the status bars don't disappear — at Version 6

Reported by: elexis Owned by:
Priority: Should Have Milestone: Alpha 20
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description (last modified by elexis)

If you press the tab button, then your units health and aura icons are displayed.

However if you do this as a spectator, then the status bars don't disappear when releasing the button. You can only remove them by hovering each entity individually.

Also status bars over gaia entities like trees are displayed.

It would be nice too if your enemies status bars are displayed, so that you can select the weakest enemy unit to attack. Currently you have to hover each unit to find its health.

Change History (8)

comment:1 by elexis, 9 years ago

Keywords: patch review added
Milestone: BacklogAlpha 19
Summary: After pressing tab as observer, the status bars don't disappear[PATCH] After pressing tab as observer, the status bars don't disappear

comment:2 by leper, 9 years ago

  • => in the new code and in the filter you moved.
  • use if (observer) ... else if [...] so you don't have to move all that code.
  • The GuiInterface change is ugly, also seems a bit strange. Could also use x || y to make it nicer.

Though I'm not really sure about that part of the change at all (nor about the addition of observer specific checks in the gui.

comment:3 by leper, 9 years ago

Component: Core engineUI & Simulation
Keywords: review removed
Priority: Should HaveNice to Have

in reply to:  2 comment:4 by elexis, 9 years ago

Replying to leper:

  • => in the new code and in the filter you moved.

What does that mean? indention?

  • use if (observer) ... else if [...] so you don't have to move all that code.

Yes.

  • The GuiInterface change is ugly, also seems a bit strange. Could also use x || y to make it nicer.

I know its ugly, I can't look at it either. But the problem is that the player argument is automatically filled in by the GuiInterface. player || specificPlayer doesn't work therefore, since the player variable always contains the current player ID. I could make a second function GetEntitiesByOtherPlayer with an argument that has a different name than 'player'.

Though I'm not really sure about that part of the change at all (nor about the addition of observer specific checks in the gui.

Pressing the tab button should display the status bars. If you are observer and press it, then the status bars appear but don't disappear without the patch. With the patch they disappear again. Without the patch status bars appear over gaia stuff like resources too. With the patch they appear only over player entities. So the patch fixes two actual errors. There must be an observer specific check, otherwise those 2 errors will appear. One could check if the client is an observer and disable the feature completely, but why not make it a useful feature with that patch above, so that the observer can better see which player is winning the battle.

I put the priority on should have, since that hotkey is heavily broken for observers, not an enhancement. You have hover each resource after pressing that key in order to fix the bug.

comment:5 by elexis, 9 years ago

Keywords: review added
Priority: Nice to HaveShould Have

-Renames PickSimilarFriendlyEntities to PickSimilarPlayerEntities and PickSimilarFriendlyEntities to PickSimilarPlayerEntities (since it doesnt pick allied entities).

-Solved ugly javascript code and optimized performance by pushing the relevant code to c++ (rangemanager) and using the the fat arrow function in recalculateStatusBarDisplay()

-Should have because currently (as described above) the tab hotkey is heavily broken if you use it as an observer.

comment:6 by elexis, 9 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.