Modulo:TeamBracket: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
aggiungo commenti |
r |
||
Riga 308:
-- row: la riga della prima cella in cui disegnare il team
-- top: true se è il primo team del match
--
-- score_results: risultato degli scores individuali (1: vinto dal primo team, 2 vinto dal secondo, 3 pari)
===============================================================================]]
function TeamBracket:renderTeam(team_name, team_number, row, show_seed, top,
self:addGap(row, self.current_col, self.current_width, 'rt')
self:addGap(row+1, self.current_col, self.current_width, 'rt')
-- seed cell
local pos = (top and 1) or 2▼
local seedArg = self:getTeamArg(self.current_round, 'seed', team_number)
if show_seed and (not self.hideSeeds) then
local seedCell = self.rows[row]:tag('td'):attr('rowspan', '2'):cssText(style.seed_cell):wikitext(seedArg):newline()
if self.not_draw_top then seedCell:css('border-top-width', '0' ) end
if self.bold_winner and (
seedCell:cssText(style.winner)
end
Line 334 ⟶ 333:
teamCell:css('border-top-width', '0' )
end
if self.bold_winner and
teamCell:cssText(style.winner)
end
if self.current_round == self.rounds and
if
▲ teamCell:cssText(style.first_place)
teamCell:cssText(style.third_place)▼
▲ elseif team_number < 3 then
teamCell:cssText(style.second_place)
elseif medal == 3 then
end
end
Line 357 ⟶ 354:
:newline()
if self.not_draw_top then scoreCell:css('border-top-width', '0') end
if score_results[i] == pos then scoreCell:cssText(style.winner) end
end
Line 422 ⟶ 420:
winner, score_results = self:getWinner(team_number1)
end
local medal2 = (winner == 1 and 2) or (winner == 2 and 1) or 0
self:renderTeam(team_name1, team_number1, row_base, showSeed, true, winner, score_results, is_bye)
self:renderTeam(team_name2, team_number2, row_base+2, showSeed, false,
return row_base
end
Line 456 ⟶ 455:
:wikitext("Finale 3° posto")
:newline()
local medal1 = (winner == 1 and 3) or 0
self:renderTeam(team_name1, 3, row+2, showSeed, true, winner, score_results)▼
local medal2 = (winner == 2 and 3) or 0
self:renderTeam(team_name2, 4, row+4, showSeed, false, winner, score_results)▼
end
|