Add alternative position

This commit is contained in:
Beu 2024-08-25 19:29:52 +02:00
parent 5a9d8abc82
commit e6aa4049a1

View File

@ -41,6 +41,8 @@
#Setting S_EliminatePerRounds False as "Eliminate par rounds instead of per players alive"
#Setting S_MaximumLives 3
#Setting S_MatchName "Final"
#Setting S_AlternativeMatchInfosPosition False
/* About S_EliminatedPlayersNbRanks and S_EliminatePerRounds.
* If S_EliminatePerRounds is True, it will decrease the number of lose of life.
@ -1020,6 +1022,13 @@ Void UpdateMatchName() {
Net_MultiLivesKnockout_LiveRanking_MatchName = S_MatchName;
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// Update Match Infos
Void UpdateMatchInfosPosition() {
declare netwrite Boolean Net_MultiLivesKnockout_AlternativePosition for Teams[0];
Net_MultiLivesKnockout_AlternativePosition = S_AlternativeMatchInfosPosition;
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //
// Update Number of lives
Void UpdateMaximumLives() {
@ -1046,6 +1055,7 @@ Void UpdateLossOfLife(Integer _LossOfLife) {
*/
Void UpdateInterfacesInfo(Integer _CurrentRoundNb, Integer _LossOfLife, Integer _AliveScoresNb) {
UpdateMatchInfos(_CurrentRoundNb, _LossOfLife, _AliveScoresNb, GetNextMilestone(_CurrentRoundNb, _AliveScoresNb));
UpdateMatchInfosPosition();
UpdateMatchName();
UpdateMaximumLives();
UpdateLossOfLife(_LossOfLife);
@ -1187,6 +1197,10 @@ Void UpdateMatchInfo() {
declare CMlLabel Label_Name <=> (Frame.GetFirstChild("label-matchinfo-name") as CMlLabel);
declare CMlLabel Label_Info <=> (Frame.GetFirstChild("label-matchinfo-info") as CMlLabel);
declare netread Boolean Net_MultiLivesKnockout_AlternativePosition for Teams[0];
if (Net_MultiLivesKnockout_AlternativePosition) Frame.RelativePosition_V3.Y = 50.;
else Frame.RelativePosition_V3.Y = 80.;
declare netread Text Net_MultiLivesKnockout_LiveRanking_MatchName for Teams[0];
Label_Name.Value = Net_MultiLivesKnockout_LiveRanking_MatchName;
Tools::FitLabelValue(Label_Name, 3.5, 2., .2);