Opened 20 months ago
Last modified 20 months ago
#6692 new defect
Open the correct structure tree when you click on the emblem — at Version 6
Reported by: | Langbart | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 27 |
Component: | UI – In-game | Keywords: | simple |
Cc: | Patch: |
Description (last modified by )
reported by RangerK
in the forum:
Alpha26 feedback and suggested changes (5/Jan/23)
When watching a multiplayer replay, when you click on a player's civilization emblem, it opens the structure tree of the previously opened civilization.
to reproduce
- watch a multiplayer replay
- switch to observation mode of a player playing, say the the Mauryas
- In the top-center, you'll see their civilization emblem and you can click it to open their structure tree
- Close the structure tree and switch to observation mode of a player playing the Roman
- Click their civilization emblem. It'll open the Mauryas structure tree instead of the Roman one.
expected behavior
- if you click on the emblem, the correct structure tree should be displayed
answered by s0600204
bisect
Intentional (by design of the session UI, not the Structure Tree), and dates back to this Revision - Phab:D846 (29/Aug/17)
Easily changed by altering this line of code.
gui/session/top_panel/CivIcon.js$40
Line | |
---|---|
35 | Engine.PushGuiPage( |
36 | page, |
37 | { |
38 | // If an Observer triggers `openPage()` via hotkey, g_ViewedPlayer could be -1 or 0 |
39 | // (depending on whether they're "viewing" no-one or gaia respectively) |
40 | "civ": this.dialogSelection.civ || g_Players[Math.max(g_ViewedPlayer, 1)].civ, |
41 | |
42 | // TODO add info about researched techs and unlocked entities |
43 | }, |
44 | this.storePageSelection.bind(this)); |
45 | } |
possible solution
-
binaries/data/mods/public/gui/session/top_panel/CivIcon.js
a b class CivIcon 37 37 { 38 38 // If an Observer triggers `openPage()` via hotkey, g_ViewedPlayer could be -1 or 0 39 39 // (depending on whether they're "viewing" no-one or gaia respectively) 40 "civ": this.dialogSelection.civ || g_Players[Math.max(g_ViewedPlayer, 1)].civ,40 "civ": g_ViewedPlayer > 0 ? g_Players[g_ViewedPlayer].civ : this.dialogSelection.civ || g_Players[1].civ, 41 41 42 42 // TODO add info about researched techs and unlocked entities 43 43 },
Change History (7)
by , 20 months ago
Attachment: | struct.png added |
---|
comment:1 by , 20 months ago
Description: | modified (diff) |
---|
comment:2 by , 20 months ago
Description: | modified (diff) |
---|
Mind that the tooltip should not show "Last opened will be reopened on click." then.
follow-up: 5 comment:4 by , 20 months ago
The tooltip refers to the fact the button can also open the "Civilisation History" page, and will reopen that if it was opened last, not that it will show the last civ viewed.
In the possible solution g_Players[Math.max(g_ViewedPlayer, 1)].civ
can be reduced down to g_Players[1].civ
, as the case of g_Players[g_ViewedPlayer].civ
has already been dealt with by that point.
comment:5 by , 20 months ago
Replying to s0600204:
The tooltip refers to the fact the button can also open the "Civilisation History" page, and will reopen that if it was opened last, not that it will show the last civ viewed.
Depends on how one reads it, I guess. I read it as: The exact same page is openened as was open when you closed it.
Which is easy when comparing stuff. Anyway, I don't care much.
Set date and title of the link to the forum