Page MenuHomeWildfire Games

Go quick through replay summaries by next/previous buttons
Needs RevisionPublic

Authored by ffffffff on Nov 16 2017, 9:25 PM.

Details

Reviewers
bb
elexis
Summary

Add buttons to just step to next summary from replays.

In combination with D810 remember view panel, this can be very useful for finding a replay regarding to a or some number/s from summary/ies.

So quick go to next summary by one button can be interesting.

first replay summary

Test Plan

test especialy last and first replay summary fit with button actions next/previous.

further it should only take next/previous summary from replay where summary data realy exist. (there is this inline function searching them.)

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

ffffffff created this revision.Nov 16 2017, 9:25 PM
ffffffff edited the summary of this revision. (Show Details)
elexis requested changes to this revision.Nov 16 2017, 9:39 PM

Good idea, but no need to switch the GUI page. The GetReplayMetadata could be moved (not copied) from replay_menu.js to sumary/ and replay_menu.js would pass an array of replay directories.

This revision now requires changes to proceed.Nov 16 2017, 9:39 PM
elexis added inline comments.Nov 16 2017, 9:41 PM
binaries/data/mods/public/gui/summary/summary.js
499

let prevReplayButton = Engine.GetGUIObjectByName("prevReplayButton");

replace the if statements with the -1 checks with an enabled = somelogical condition

replace the type of check with === undefined

In D1045#41096, @elexis wrote:

Good idea, but no need to switch the GUI page. The GetReplayMetadata could be moved (not copied) from replay_menu.js to sumary/ and replay_menu.js would pass an array of replay directories.

problem is its needing replaySelectionData from function createReplaySelectionData() in replay_actions.js. this needs to be moved to summary.js too.

Why? In order to select the next and previous summary screen it only needs the filename and calling the load function? The selected replay filters already are stored and passed when switching gui pages, no?

In D1045#41107, @elexis wrote:

Why? In order to select the next and previous summary screen it only needs the filename and calling the load function? The selected replay filters already are stored and passed when switching gui pages, no?

its passed for start the replay and later restore selection when come back to replay menu.

the function is defined in replay_actions.js and only there calculated when opening summary.

when now switching to next summary directly it cannot be calculated.

In D1045#41107, @elexis wrote:

its passed for start the replay and later restore selection when come back to replay menu.

um = to, nicht for

when now switching to next summary directly it cannot be calculated.

replaySelectionData only contains the selected filters.
When opening a summary page from the replay menu, it could only pass the replay directories that match the currently selected filters.
The set of currently selected filter settings is already passed between the GUI pages and does not have to be derived again, but can just persist, can't it?
Nothing in the data returned by createReplaySelectionData() appears to require to be changed in any situation.

In D1045#41112, @elexis wrote:
In D1045#41107, @elexis wrote:

its passed for start the replay and later restore selection when come back to replay menu.

um = to, nicht for

when now switching to next summary directly it cannot be calculated.

replaySelectionData only contains the selected filters.
When opening a summary page from the replay menu, it could only pass the replay directories that match the currently selected filters.
The set of currently selected filter settings is already passed between the GUI pages and does not have to be derived again, but can just persist, can't it?
Nothing in the data returned by createReplaySelectionData() appears to require to be changed in any situation.

ok we keep it

In D1045#41096, @elexis wrote:

Good idea, but no need to switch the GUI page. The GetReplayMetadata could be moved (not copied) from replay_menu.js to sumary/ and replay_menu.js would pass an array of replay directories.

gui switch easiest.

u need to remake whole gui otherwise init everything reset and co.

As in calling init with the same data except a different filename again?

ffffffff added a comment.EditedNov 17 2017, 2:05 AM
In D1045#41131, @elexis wrote:

As in calling init with the same data except a different filename again?

nope init boxes reset is problem initPlayerBoxPositions()
initcharts too. previous infos in the gui boxes and charts dont get resetted. it just gets new info written into it again and again. so its need resetted somehow and then rewritten. if u have reset function working for summary gui send me.

also the boxes move when reinit.

In D1045#41131, @elexis wrote:

nope init boxes reset is problem initPlayerBoxPositions(), nitcharts too

Wiping data from GUI objects and helper variables shouldn't be too hard. Sure you tried calling init to reload the data? Got a paste?

also the boxes move when reinit.

You mean the location of the GUI objects changes? It does that with the current patch too, doesn't it?

ffffffff added a comment.EditedNov 30 2017, 4:30 PM
In D1045#41136, @elexis wrote:
In D1045#41131, @elexis wrote:

nope init boxes reset is problem initPlayerBoxPositions(), nitcharts too

Wiping data from GUI objects and helper variables shouldn't be too hard. Sure you tried calling init to reload the data? Got a paste?

also the boxes move when reinit.

You mean the location of the GUI objects changes? It does that with the current patch too, doesn't it?

The problem is to reset every single type of summary data like every outcome icon, team name, team total, etc.

This is done when opening the summary gui by reading in the xml file. But how can i reread the xml file with its appropriate settings to each element?

Otherwise new data can get overlapped by previous data when it isn't set by new data especialy. That's the main problem. I tested it now and came much further and its realy fast without switching gui, but it always remains some of the panel data that needs to be resetted and its realy much. Especially resetting the size of each element to the default must be copying the size from the xml file into some js code where it is resetted again. So it doubles information that are not tied without knowing at two positions. I make paste.

https://code.wildfiregames.com/P96

ffffffff added a comment.EditedNov 30 2017, 4:36 PM

still open in resetting is the outcome icon as its not resetted to no icon per default, cause i may come more xml data that needs to be resetted so i just stopped there as we find a proper solution to reset a gui good.
outcome function is in line 418 in gamedescription.js function setOutcomeIcon(state, imageID)

Krinkle added a subscriber: Krinkle.Sep 8 2019, 5:56 PM