mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 08:34:52 -07:00
fix: don't show conceded players, fix: compute multicolumn layout correctly when dealing with odd number of players
This commit is contained in:
parent
b001421cfe
commit
3ed26e11ae
4 changed files with 10 additions and 7 deletions
|
|
@ -64,7 +64,6 @@ void GameScene::rearrange()
|
|||
const int playersCount = playersPlaying.size();
|
||||
const int columns = playersCount < settingsCache->getMinPlayersForMultiColumnLayout() ? 1 : 2;
|
||||
const int rows = ceil((qreal) playersCount / columns);
|
||||
|
||||
qreal sceneHeight = 0, sceneWidth = -playerAreaSpacing;
|
||||
QList<int> columnWidth;
|
||||
int firstPlayerOfColumn = firstPlayer;
|
||||
|
|
@ -72,7 +71,7 @@ void GameScene::rearrange()
|
|||
playersByColumn.append(QList<Player *>());
|
||||
columnWidth.append(0);
|
||||
qreal thisColumnHeight = -playerAreaSpacing;
|
||||
const int rowsInColumn = rows - (playersCount % columns);
|
||||
const int rowsInColumn = rows - (playersCount % columns) * col; // only correct for max. 2 cols
|
||||
for (int j = 0; j < rowsInColumn; ++j) {
|
||||
Player *player = playersPlaying[(firstPlayerOfColumn + j) % playersCount];
|
||||
if (col == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue