Opened 16 months ago
Last modified 16 months ago
#6692 new defect
Open the correct structure tree when you click on the emblem
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 },
Attachments (1)
Change History (9)
by , 16 months ago
Attachment: | struct.png added |
---|
comment:1 by , 16 months ago
Description: | modified (diff) |
---|
comment:2 by , 16 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 , 16 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 , 16 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.
comment:7 by , 16 months ago
Can't you just leave out the last part, people will figure it out for themselves.
-
binaries/data/mods/public/gui/session/top_panel/CivIcon.js
a b class CivIcon 77 77 } 78 78 79 79 CivIcon.prototype.Tooltip = 80 markForTranslation("%(civ)s\n%(hotkey_civinfo)s / %(hotkey_structree)s: View Civilization Overview / Structure Tree \nLast opened will be reopened on click.");80 markForTranslation("%(civ)s\n%(hotkey_civinfo)s / %(hotkey_structree)s: View Civilization Overview / Structure Tree"); 81 81 82 82 CivIcon.prototype.CivTags = { "font": "sans-bold-stroke-14" };
Up to the patch maker.
comment:8 by , 16 months ago
Keywords: | simple added |
---|
Set date and title of the link to the forum