diff options
Diffstat (limited to 'pacman-c++/mainwidget.cpp')
| -rw-r--r-- | pacman-c++/mainwidget.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pacman-c++/mainwidget.cpp b/pacman-c++/mainwidget.cpp index 1fc7687..daa5806 100644 --- a/pacman-c++/mainwidget.cpp +++ b/pacman-c++/mainwidget.cpp | |||
| @@ -59,13 +59,15 @@ void MainWidget::createGui() | |||
| 59 | QVBoxLayout *layout = new QVBoxLayout(this); | 59 | QVBoxLayout *layout = new QVBoxLayout(this); |
| 60 | layout->setAlignment(Qt::AlignHCenter | Qt::AlignTop); | 60 | layout->setAlignment(Qt::AlignHCenter | Qt::AlignTop); |
| 61 | QHBoxLayout *scoreLayout = new QHBoxLayout(); | 61 | QHBoxLayout *scoreLayout = new QHBoxLayout(); |
| 62 | for (unsigned int i = 0; Color::order[i] != Color::none; ++i) | 62 | for (unsigned int i = 0; i < m_maxplayers; ++i) |
| 63 | { | 63 | { |
| 64 | QGridLayout *playerLayout = new QGridLayout(); | 64 | QGridLayout *playerLayout = new QGridLayout(); |
| 65 | playerLayout->addWidget(new QLabel("Current:", this), 0, 0); | 65 | playerLayout->addWidget(new QLabel("Current:", this), 0, 0); |
| 66 | playerLayout->addWidget(new QLabel("Total:", this), 1, 0); | 66 | playerLayout->addWidget(new QLabel("Total:", this), 1, 0); |
| 67 | playerLayout->addWidget(new QLabel("0", this), 0, 1); | 67 | playerLayout->addWidget(new QLabel("0", this), 0, 1, Qt::AlignLeft); |
| 68 | playerLayout->addWidget(new QLabel("0", this), 1, 1); | 68 | playerLayout->addWidget(new QLabel("0", this), 1, 1, Qt::AlignLeft); |
| 69 | playerLayout->setColumnStretch(1, 10); | ||
| 70 | playerLayout->setSizeConstraint(QLayout::SetMinimumSize); | ||
| 69 | 71 | ||
| 70 | QGroupBox *scoreBox = new QGroupBox(QString("Player %1").arg(i + 1), this); | 72 | QGroupBox *scoreBox = new QGroupBox(QString("Player %1").arg(i + 1), this); |
| 71 | scoreBox->setObjectName(QString("actor%1").arg(i + 1)); | 73 | scoreBox->setObjectName(QString("actor%1").arg(i + 1)); |
