diff --git a/src/Editor/CExportGameDialog.cpp b/src/Editor/CExportGameDialog.cpp index f5cbeb82..b5df68f5 100644 --- a/src/Editor/CExportGameDialog.cpp +++ b/src/Editor/CExportGameDialog.cpp @@ -114,6 +114,10 @@ bool CExportGameDialog::ValidateGame() mGameID = TString(6, 0); memcpy(&mGameID[0], rkHeader.m_gameID, 6); + // The MP2 ISO doesn't have a colon in the game name and it kinda annoys me + if (mGameTitle == "Metroid Prime 2 Echoes") + mGameTitle = "Metroid Prime 2: Echoes"; + // Check region byte switch (mGameID[3]) { diff --git a/src/Editor/Icons.qrc b/src/Editor/Icons.qrc index 40893644..eae96bfe 100644 --- a/src/Editor/Icons.qrc +++ b/src/Editor/Icons.qrc @@ -71,5 +71,6 @@ icons/New_16px.png icons/Disc_16px.png icons/World_16px.png + icons/PoiSymbol_24px.png diff --git a/src/Editor/WorldEditor/CWorldEditor.cpp b/src/Editor/WorldEditor/CWorldEditor.cpp index d246cb10..d02bb21a 100644 --- a/src/Editor/WorldEditor/CWorldEditor.cpp +++ b/src/Editor/WorldEditor/CWorldEditor.cpp @@ -83,7 +83,7 @@ CWorldEditor::CWorldEditor(QWidget *parent) AddEditModeButton( QIcon(":/icons/World.png"), "Edit World Info",eWEM_EditWorldInfo ); AddEditModeButton( QIcon(":/icons/Modify.png"), "Edit Script", eWEM_EditScript ); - mpPoiMapButton = AddEditModeButton( QIcon(":/icons/POI Normal.png"), "Edit POI Mappings", eWEM_EditPOIMappings ); + mpPoiMapButton = AddEditModeButton( QIcon(":/icons/PoiSymbol_24px.png"), "Edit POI Mappings", eWEM_EditPOIMappings ); mpPoiMapButton->setEnabled(false); ChangeEditMode(eWEM_EditWorldInfo); diff --git a/src/Editor/WorldEditor/CWorldInfoSidebar.cpp b/src/Editor/WorldEditor/CWorldInfoSidebar.cpp index ba7a231b..9d5dab43 100644 --- a/src/Editor/WorldEditor/CWorldInfoSidebar.cpp +++ b/src/Editor/WorldEditor/CWorldInfoSidebar.cpp @@ -37,9 +37,7 @@ CWorldInfoSidebar::CWorldInfoSidebar(CWorldEditor *pEditor) mpUI->WorldSelector->SetEditable(false); mpUI->WorldNameSelector->SetEditable(false); - mpUI->DarkWorldNameStringLabel->setHidden(true); mpUI->DarkWorldNameSelector->SetEditable(false); - mpUI->DarkWorldNameSelector->setHidden(true); mpUI->SkySelector->SetEditable(false); mpUI->AreaNameLineEdit->setEnabled(false); @@ -61,10 +59,25 @@ void CWorldInfoSidebar::OnActiveProjectChanged(CGameProject *pProj) mpUI->AreaSearchLineEdit->clear(); mProxyModel.SetFilterString(""); - bool IsEchoes = pProj && (pProj->Game() == eEchoesDemo || pProj->Game() == eEchoes); mpUI->GameNameLabel->setText( pProj ? TO_QSTRING(pProj->Name()) : "" ); + + // Add/remove widgets from the form layout based on the game. This is needed because + // simply hiding the widgets causes a minor spacing issue. The only fix seems to be + // actually entirely removing the widgets from the layout when not in use. + bool IsEchoes = pProj && (pProj->Game() == eEchoesDemo || pProj->Game() == eEchoes); mpUI->DarkWorldNameStringLabel->setHidden(!IsEchoes); mpUI->DarkWorldNameSelector->setHidden(!IsEchoes); + + if (IsEchoes) + { + mpUI->WorldInfoFormLayout->insertRow(2, mpUI->DarkWorldNameStringLabel, mpUI->DarkWorldNameSelector); + } + else + { + mpUI->WorldInfoFormLayout->removeWidget(mpUI->DarkWorldNameStringLabel); + mpUI->WorldInfoFormLayout->removeWidget(mpUI->DarkWorldNameSelector); + } + ClearWorldInfo(); } diff --git a/src/Editor/WorldEditor/CWorldInfoSidebar.ui b/src/Editor/WorldEditor/CWorldInfoSidebar.ui index 6c785c9a..0ef86103 100644 --- a/src/Editor/WorldEditor/CWorldInfoSidebar.ui +++ b/src/Editor/WorldEditor/CWorldInfoSidebar.ui @@ -148,7 +148,7 @@ - + @@ -242,7 +242,7 @@ - + diff --git a/src/Editor/icons/PoiSymbol_24px.png b/src/Editor/icons/PoiSymbol_24px.png new file mode 100644 index 00000000..f368e544 Binary files /dev/null and b/src/Editor/icons/PoiSymbol_24px.png differ