Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3731 closed enhancement (fixed)

[PATCH] View panels in observer-mode / replays

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

Description

Feature: As of alpha 19, the observermode / visual-replaymode hides all panels, so that one can't see the units trained, constructable buildings, unit stances, market prices etc..

The attached patch shows all panels of all players after selecting a unit / structure in observermode and disables its buttons. It shows these things for all players, no matter if the change-perspective tool is used. Since the buttons are only disabled and not graphically changed, it allows seeing if required techs / resources are met for techs / training.

Implementation: All panels are changed in selection_panels.js, namely: Alert, Barter, Command, AllyCommand, Construction, Formation, Garrison, Gate, Pack, Queue, Research, Selection, Stance, Training.

One GUIInterface change is needed in order to make it work. GuiInterfaceCall passes the current playerID to the GUIInterface functions. Instead we need to use the playerID of the owner of the selected building / unit.

Attachments (1)

t3731_observer_selection_panels_v1.patch (17.5 KB ) - added by elexis 8 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 by elexis, 8 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 17617:

Show the selection panels to observers / in replays, fixes #3731.

This allows observers to see the training queue, researched techs, unit stance, constructable buildings, garrisoned units, market prices etc. for all players without changing the perspective.
All buttons are disabled if the user isn't allowed to control the affected player.
Notice updateUnitCommands() fills out the panel differently in case of selecting an allied building.
Extends the GUIInterface methods "GetNeededResources", "CheckTechnologyRequirements" and "IsTechnologyResearched" to optionally take a different player-argument.

comment:2 by elexis, 8 years ago

Keywords: review removed
Note: See TracTickets for help on using tickets.