diff options
Diffstat (limited to '')
-rw-r--r-- | lsmaterialeditor.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/lsmaterialeditor.cpp b/lsmaterialeditor.cpp index f1c5736..5ff2825 100644 --- a/lsmaterialeditor.cpp +++ b/lsmaterialeditor.cpp @@ -5,11 +5,13 @@ LSMaterialEditor::LSMaterialEditor(QWidget *parent) : QWidget(parent) { QGridLayout *grid = new QGridLayout(this); + int gridRow = 0; m_nameEntry = new QLineEdit(this); - grid->addWidget(new QLabel("Name:", this), 0, 0, 1, 1); - grid->addWidget(m_nameEntry, 0, 1, 1, 1); + grid->addWidget(new QLabel("Name:", this), gridRow, 0, 1, 1); + grid->addWidget(m_nameEntry, gridRow, 1, 1, 1); + gridRow++; // TEV colour box QGroupBox *tevCBox = new QGroupBox("TEV Colours", this); @@ -24,10 +26,21 @@ LSMaterialEditor::LSMaterialEditor(QWidget *parent) : tevCLayout->addWidget(m_colourPickers[i], isKonst?3:1, isKonst?(i-3):i, 1, 1); } - grid->addWidget(tevCBox, 1, 0, 1, 2); + grid->addWidget(tevCBox, gridRow, 0, 1, 2); + gridRow++; + // TEV stages + QGroupBox *stageBox = new QGroupBox("TEV Stages", this); + QVBoxLayout *stageLayout = new QVBoxLayout(stageBox); - grid->setRowStretch(2, 1); + m_tevStageSetEditor = new LSSetEditor<LYTTevStage, LSTevStageEditor>(8, stageBox); + stageLayout->addWidget(m_tevStageSetEditor); + + grid->addWidget(stageBox, gridRow, 0, 1, 2); + gridRow++; + + // finish it all up + grid->setRowStretch(gridRow, 1); m_currentlyLoadingMaterial = false; @@ -45,6 +58,8 @@ void LSMaterialEditor::setMaterial(LYTMaterial *mat) { for (int i = 0; i < 4; i++) m_colourPickers[i+3]->setColor(mat->tevKColour[i]); + m_tevStageSetEditor->setData(&mat->tevStages); + m_currentlyLoadingMaterial = false; } |