Added project settings dialog; added build name lookup functionality
This commit is contained in:
parent
3697401ebb
commit
bdb753dca2
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<GameInfo ArchiveVer="0" FileVer="0" Game="DKCR">
|
||||||
|
<GameBuilds>
|
||||||
|
<Build>
|
||||||
|
<Version>74887</Version>
|
||||||
|
<Region>PAL</Region>
|
||||||
|
<Name>Wii PAL</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>75001</Version>
|
||||||
|
<Region>NTSC</Region>
|
||||||
|
<Name>Wii NTSC 0A-1</Name>
|
||||||
|
</Build>
|
||||||
|
</GameBuilds>
|
||||||
|
</GameInfo>
|
|
@ -1,5 +1,57 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<GameInfo ArchiveVer="0" FileVer="0" Game="MPRM">
|
<GameInfo ArchiveVer="0" FileVer="0" Game="MPRM">
|
||||||
|
<GameBuilds>
|
||||||
|
<Build>
|
||||||
|
<Version>0.0</Version>
|
||||||
|
<Region>NTSC</Region>
|
||||||
|
<Name>Multi-Game Demo Disc v7-9</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>1.088</Version>
|
||||||
|
<Region>NTSC</Region>
|
||||||
|
<Name>GameCube 0-00 NTSC</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>1.093</Version>
|
||||||
|
<Region>NTSC</Region>
|
||||||
|
<Name>GameCube 0-01 NTSC</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>1.097</Version>
|
||||||
|
<Region>NTSC</Region>
|
||||||
|
<Name>GameCube 0-30 NTSC-K</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>1.101</Version>
|
||||||
|
<Region>PAL</Region>
|
||||||
|
<Name>EUR Interactive Multi-Game Demo Disc: February 2003</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>1.111</Version>
|
||||||
|
<Region>JPN</Region>
|
||||||
|
<Name>GameCube 0-00 NTSC-J</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>1.111</Version>
|
||||||
|
<Region>JPN</Region>
|
||||||
|
<Name>GameCube 0-02 NTSC (Player's Choice)</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>3.570</Version>
|
||||||
|
<Region>JPN</Region>
|
||||||
|
<Name>Wii de Asobu</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>3.593</Version>
|
||||||
|
<Region>NTSC</Region>
|
||||||
|
<Name>Metroid Prime: Trilogy NTSC</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>3.629</Version>
|
||||||
|
<Region>PAL</Region>
|
||||||
|
<Name>Metroid Prime: Trilogy PAL</Name>
|
||||||
|
</Build>
|
||||||
|
</GameBuilds>
|
||||||
<AreaNameMap>
|
<AreaNameMap>
|
||||||
<AreaName>
|
<AreaName>
|
||||||
<Key>0035FDAD</Key>
|
<Key>0035FDAD</Key>
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<GameInfo ArchiveVer="0" FileVer="0" Game="MPRM">
|
||||||
|
<GameBuilds>
|
||||||
|
<Build>
|
||||||
|
<Version>0.160</Version>
|
||||||
|
<Region>NTSC</Region>
|
||||||
|
<Name>Metroid Prime 2: Echoes Bonus Disc</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>0.227</Version>
|
||||||
|
<Region>NTSC</Region>
|
||||||
|
<Name>Multi-Game Demo Disc v20, v23-26</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>0.237</Version>
|
||||||
|
<Region>PAL</Region>
|
||||||
|
<Name>EUR Interactive Multi-Game Demo Disc: November 2004</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>1.028</Version>
|
||||||
|
<Region>NTSC</Region>
|
||||||
|
<Name>GameCube 0-00 NTSC</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>1.035</Version>
|
||||||
|
<Region>PAL</Region>
|
||||||
|
<Name>GameCube 0-00 PAL</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>1.036</Version>
|
||||||
|
<Region>JPN</Region>
|
||||||
|
<Name>GameCube 0-00 NTSC-J</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>3.561</Version>
|
||||||
|
<Region>JPN</Region>
|
||||||
|
<Name>Wii de Asobu</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>3.593</Version>
|
||||||
|
<Region>NTSC</Region>
|
||||||
|
<Name>Metroid Prime: Trilogy NTSC</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>3.629</Version>
|
||||||
|
<Region>PAL</Region>
|
||||||
|
<Name>Metroid Prime: Trilogy PAL</Name>
|
||||||
|
</Build>
|
||||||
|
</GameBuilds>
|
||||||
|
</GameInfo>
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<GameInfo ArchiveVer="0" FileVer="0" Game="MP3C">
|
||||||
|
<GameBuilds>
|
||||||
|
<Build>
|
||||||
|
<Version>3.068</Version>
|
||||||
|
<Region>NTSC</Region>
|
||||||
|
<Name>E3 2006 Prototype</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>3.436</Version>
|
||||||
|
<Region>NTSC</Region>
|
||||||
|
<Name>Wii NTSC</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>3.453</Version>
|
||||||
|
<Region>PAL</Region>
|
||||||
|
<Name>Wii PAL</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>3.495</Version>
|
||||||
|
<Region>JPN</Region>
|
||||||
|
<Name>Wii NTSC-J</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>3.593</Version>
|
||||||
|
<Region>NTSC</Region>
|
||||||
|
<Name>Metroid Prime: Trilogy NTSC</Name>
|
||||||
|
</Build>
|
||||||
|
<Build>
|
||||||
|
<Version>3.629</Version>
|
||||||
|
<Region>PAL</Region>
|
||||||
|
<Name>Metroid Prime: Trilogy PAL</Name>
|
||||||
|
</Build>
|
||||||
|
</GameBuilds>
|
||||||
|
</GameInfo>
|
|
@ -67,25 +67,32 @@ void Serialize(IArchive& rArc, EGame& rGame)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ERegion
|
// ERegion
|
||||||
|
static const TString gskRegionNames[] = { "NTSC", "PAL", "JPN", "UnknownRegion" };
|
||||||
|
static const u32 gskNumRegions = sizeof(gskRegionNames) / sizeof(gskRegionNames[0]);
|
||||||
|
|
||||||
|
TString GetRegionName(ERegion Region)
|
||||||
|
{
|
||||||
|
return gskRegionNames[(int) Region];
|
||||||
|
}
|
||||||
|
|
||||||
|
ERegion GetRegionForName(const TString& rkName)
|
||||||
|
{
|
||||||
|
for (u32 iReg = 0; iReg < gskNumRegions; iReg++)
|
||||||
|
if (gskRegionNames[iReg] == rkName)
|
||||||
|
return (ERegion) iReg;
|
||||||
|
|
||||||
|
return eRegion_Unknown;
|
||||||
|
}
|
||||||
|
|
||||||
void Serialize(IArchive& rArc, ERegion& rRegion)
|
void Serialize(IArchive& rArc, ERegion& rRegion)
|
||||||
{
|
{
|
||||||
static const TString skRegionNames[] = { "NTSC", "PAL", "JPN" };
|
|
||||||
TString Name;
|
TString Name;
|
||||||
|
|
||||||
if (rArc.IsWriter())
|
if (rArc.IsWriter())
|
||||||
Name = skRegionNames[rRegion];
|
Name = GetRegionName(rRegion);
|
||||||
|
|
||||||
rArc.SerializePrimitive(Name);
|
rArc.SerializePrimitive(Name);
|
||||||
|
|
||||||
if (rArc.IsReader())
|
if (rArc.IsReader())
|
||||||
{
|
rRegion = GetRegionForName(Name);
|
||||||
for (u32 iReg = 0; iReg < 3; iReg++)
|
|
||||||
{
|
|
||||||
if (skRegionNames[iReg] == Name)
|
|
||||||
{
|
|
||||||
rRegion = (ERegion) iReg;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,8 @@ enum ERegion
|
||||||
eRegion_JPN,
|
eRegion_JPN,
|
||||||
eRegion_Unknown = -1
|
eRegion_Unknown = -1
|
||||||
};
|
};
|
||||||
|
TString GetRegionName(ERegion Region);
|
||||||
|
ERegion GetRegionForName(const TString& rkName);
|
||||||
void Serialize(IArchive& rArc, ERegion& rRegion);
|
void Serialize(IArchive& rArc, ERegion& rRegion);
|
||||||
|
|
||||||
#endif // EGAME_H
|
#endif // EGAME_H
|
||||||
|
|
|
@ -41,10 +41,25 @@ void CGameInfo::Serialize(IArchive& rArc)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Serialize data
|
// Serialize data
|
||||||
|
rArc << SERIAL_CONTAINER("GameBuilds", mBuilds, "Build");
|
||||||
|
|
||||||
if (mGame <= ePrime)
|
if (mGame <= ePrime)
|
||||||
rArc << SERIAL_CONTAINER("AreaNameMap", mAreaNameMap, "AreaName");
|
rArc << SERIAL_CONTAINER("AreaNameMap", mAreaNameMap, "AreaName");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TString CGameInfo::GetBuildName(float BuildVer, ERegion Region) const
|
||||||
|
{
|
||||||
|
for (u32 iBuild = 0; iBuild < mBuilds.size(); iBuild++)
|
||||||
|
{
|
||||||
|
const SBuildInfo& rkBuildInfo = mBuilds[iBuild];
|
||||||
|
|
||||||
|
if (rkBuildInfo.Version == BuildVer && rkBuildInfo.Region == Region)
|
||||||
|
return rkBuildInfo.Name;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "Unknown Build";
|
||||||
|
}
|
||||||
|
|
||||||
TString CGameInfo::GetAreaName(const CAssetID &rkID) const
|
TString CGameInfo::GetAreaName(const CAssetID &rkID) const
|
||||||
{
|
{
|
||||||
auto Iter = mAreaNameMap.find(rkID);
|
auto Iter = mAreaNameMap.find(rkID);
|
||||||
|
|
|
@ -14,6 +14,22 @@ const TString gkGameInfoExt = "xml";
|
||||||
class CGameInfo
|
class CGameInfo
|
||||||
{
|
{
|
||||||
EGame mGame;
|
EGame mGame;
|
||||||
|
|
||||||
|
// List of known builds of each game
|
||||||
|
struct SBuildInfo
|
||||||
|
{
|
||||||
|
float Version;
|
||||||
|
ERegion Region;
|
||||||
|
TString Name;
|
||||||
|
|
||||||
|
void Serialize(IArchive& rArc)
|
||||||
|
{
|
||||||
|
rArc << SERIAL_AUTO(Version) << SERIAL_AUTO(Region) << SERIAL_AUTO(Name);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
std::vector<SBuildInfo> mBuilds;
|
||||||
|
|
||||||
|
// List of internal area names; used for MP1 which doesn't store area names in the MLVL
|
||||||
std::map<CAssetID, TString> mAreaNameMap;
|
std::map<CAssetID, TString> mAreaNameMap;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -26,6 +42,7 @@ public:
|
||||||
bool SaveGameInfo(TString Path = "");
|
bool SaveGameInfo(TString Path = "");
|
||||||
void Serialize(IArchive& rArc);
|
void Serialize(IArchive& rArc);
|
||||||
|
|
||||||
|
TString GetBuildName(float BuildVer, ERegion Region) const;
|
||||||
TString GetAreaName(const CAssetID& rkID) const;
|
TString GetAreaName(const CAssetID& rkID) const;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
|
|
|
@ -104,6 +104,8 @@ public:
|
||||||
inline CGameInfo* GameInfo() const { return mpGameInfo; }
|
inline CGameInfo* GameInfo() const { return mpGameInfo; }
|
||||||
inline CAudioManager* AudioManager() const { return mpAudioManager; }
|
inline CAudioManager* AudioManager() const { return mpAudioManager; }
|
||||||
inline EGame Game() const { return mGame; }
|
inline EGame Game() const { return mGame; }
|
||||||
|
inline ERegion Region() const { return mRegion; }
|
||||||
|
inline TString GameID() const { return mGameID; }
|
||||||
inline float BuildVersion() const { return mBuildVersion; }
|
inline float BuildVersion() const { return mBuildVersion; }
|
||||||
inline bool IsWiiBuild() const { return mBuildVersion >= 3.f; }
|
inline bool IsWiiBuild() const { return mBuildVersion >= 3.f; }
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "CEditorApplication.h"
|
#include "CEditorApplication.h"
|
||||||
#include "IEditor.h"
|
#include "IEditor.h"
|
||||||
#include "CBasicViewport.h"
|
#include "CBasicViewport.h"
|
||||||
#include "CProjectOverviewDialog.h"
|
#include "CProjectSettingsDialog.h"
|
||||||
#include "Editor/CharacterEditor/CCharacterEditor.h"
|
#include "Editor/CharacterEditor/CCharacterEditor.h"
|
||||||
#include "Editor/ModelEditor/CModelEditorWindow.h"
|
#include "Editor/ModelEditor/CModelEditorWindow.h"
|
||||||
#include "Editor/ResourceBrowser/CResourceBrowser.h"
|
#include "Editor/ResourceBrowser/CResourceBrowser.h"
|
||||||
|
@ -34,7 +34,7 @@ void CEditorApplication::InitEditor()
|
||||||
{
|
{
|
||||||
mpWorldEditor = new CWorldEditor();
|
mpWorldEditor = new CWorldEditor();
|
||||||
mpResourceBrowser = new CResourceBrowser(mpWorldEditor);
|
mpResourceBrowser = new CResourceBrowser(mpWorldEditor);
|
||||||
mpProjectDialog = new CProjectOverviewDialog();
|
mpProjectDialog = new CProjectSettingsDialog(mpWorldEditor);
|
||||||
mpWorldEditor->showMaximized();
|
mpWorldEditor->showMaximized();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
|
|
||||||
class CBasicViewport;
|
class CBasicViewport;
|
||||||
class CProjectOverviewDialog;
|
class CProjectSettingsDialog;
|
||||||
class CResourceBrowser;
|
class CResourceBrowser;
|
||||||
class CResourceEntry;
|
class CResourceEntry;
|
||||||
class CWorldEditor;
|
class CWorldEditor;
|
||||||
|
@ -22,7 +22,7 @@ class CEditorApplication : public QApplication
|
||||||
CGameProject *mpActiveProject;
|
CGameProject *mpActiveProject;
|
||||||
CWorldEditor *mpWorldEditor;
|
CWorldEditor *mpWorldEditor;
|
||||||
CResourceBrowser *mpResourceBrowser;
|
CResourceBrowser *mpResourceBrowser;
|
||||||
CProjectOverviewDialog *mpProjectDialog;
|
CProjectSettingsDialog *mpProjectDialog;
|
||||||
QVector<IEditor*> mEditorWindows;
|
QVector<IEditor*> mEditorWindows;
|
||||||
QMap<CResourceEntry*,IEditor*> mEditingMap;
|
QMap<CResourceEntry*,IEditor*> mEditingMap;
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ public:
|
||||||
inline CGameProject* ActiveProject() const { return mpActiveProject; }
|
inline CGameProject* ActiveProject() const { return mpActiveProject; }
|
||||||
inline CWorldEditor* WorldEditor() const { return mpWorldEditor; }
|
inline CWorldEditor* WorldEditor() const { return mpWorldEditor; }
|
||||||
inline CResourceBrowser* ResourceBrowser() const { return mpResourceBrowser; }
|
inline CResourceBrowser* ResourceBrowser() const { return mpResourceBrowser; }
|
||||||
inline CProjectOverviewDialog* ProjectDialog() const { return mpProjectDialog; }
|
inline CProjectSettingsDialog* ProjectDialog() const { return mpProjectDialog; }
|
||||||
|
|
||||||
inline void SetEditorTicksEnabled(bool Enabled) { Enabled ? mRefreshTimer.start(gkTickFrequencyMS) : mRefreshTimer.stop(); }
|
inline void SetEditorTicksEnabled(bool Enabled) { Enabled ? mRefreshTimer.start(gkTickFrequencyMS) : mRefreshTimer.stop(); }
|
||||||
inline bool AreEditorTicksEnabled() const { return mRefreshTimer.isActive(); }
|
inline bool AreEditorTicksEnabled() const { return mRefreshTimer.isActive(); }
|
||||||
|
|
|
@ -61,6 +61,9 @@ void CExportGameDialog::InitUI(QString ExportDir)
|
||||||
ASSERT(mpDisc != nullptr);
|
ASSERT(mpDisc != nullptr);
|
||||||
|
|
||||||
// Export settings
|
// Export settings
|
||||||
|
CGameInfo GameInfo;
|
||||||
|
GameInfo.LoadGameInfo(mGame);
|
||||||
|
|
||||||
ExportDir.replace('/', '\\');
|
ExportDir.replace('/', '\\');
|
||||||
|
|
||||||
TWideString DefaultNameMapPath = CAssetNameMap::DefaultNameMapPath();
|
TWideString DefaultNameMapPath = CAssetNameMap::DefaultNameMapPath();
|
||||||
|
@ -76,7 +79,7 @@ void CExportGameDialog::InitUI(QString ExportDir)
|
||||||
// Info boxes
|
// Info boxes
|
||||||
mpUI->GameTitleLineEdit->setText( TO_QSTRING(mGameTitle) );
|
mpUI->GameTitleLineEdit->setText( TO_QSTRING(mGameTitle) );
|
||||||
mpUI->GameIdLineEdit->setText( TO_QSTRING(mGameID) );
|
mpUI->GameIdLineEdit->setText( TO_QSTRING(mGameID) );
|
||||||
mpUI->BuildVersionLineEdit->setText( QString::number(mBuildVer) );
|
mpUI->BuildVersionLineEdit->setText( QString("%1 (%2)").arg(mBuildVer).arg( TO_QSTRING(GameInfo.GetBuildName(mBuildVer, mRegion)) ));
|
||||||
mpUI->RegionLineEdit->setText( mRegion == eRegion_NTSC ? "NTSC" :
|
mpUI->RegionLineEdit->setText( mRegion == eRegion_NTSC ? "NTSC" :
|
||||||
mRegion == eRegion_PAL ? "PAL" : "JPN" );
|
mRegion == eRegion_PAL ? "PAL" : "JPN" );
|
||||||
|
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>CProjectOverviewDialog</class>
|
|
||||||
<widget class="QDialog" name="CProjectOverviewDialog">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>492</width>
|
|
||||||
<height>445</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Dialog</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QGroupBox" name="PackagesGroupBox">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>100</x>
|
|
||||||
<y>130</y>
|
|
||||||
<width>280</width>
|
|
||||||
<height>287</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Packages</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
|
||||||
<item>
|
|
||||||
<widget class="QListWidget" name="PackagesList">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="alternatingRowColors">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="verticalScrollMode">
|
|
||||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="horizontalScrollMode">
|
|
||||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="CookPackageButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Cook Package</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="CookAllDirtyPackagesButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Cook All Dirty Packages</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "CProjectOverviewDialog.h"
|
#include "CProjectSettingsDialog.h"
|
||||||
#include "ui_CProjectOverviewDialog.h"
|
#include "ui_CProjectSettingsDialog.h"
|
||||||
#include "CEditorApplication.h"
|
#include "CEditorApplication.h"
|
||||||
#include "CExportGameDialog.h"
|
#include "CExportGameDialog.h"
|
||||||
#include "UICommon.h"
|
#include "UICommon.h"
|
||||||
|
@ -9,9 +9,9 @@
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
CProjectOverviewDialog::CProjectOverviewDialog(QWidget *pParent)
|
CProjectSettingsDialog::CProjectSettingsDialog(QWidget *pParent)
|
||||||
: QDialog(pParent)
|
: QDialog(pParent)
|
||||||
, mpUI(new Ui::CProjectOverviewDialog)
|
, mpUI(new Ui::CProjectSettingsDialog)
|
||||||
, mpProject(nullptr)
|
, mpProject(nullptr)
|
||||||
{
|
{
|
||||||
mpUI->setupUi(this);
|
mpUI->setupUi(this);
|
||||||
|
@ -23,18 +23,43 @@ CProjectOverviewDialog::CProjectOverviewDialog(QWidget *pParent)
|
||||||
connect(gpEdApp, SIGNAL(AssetsModified()), this, SLOT(SetupPackagesList()));
|
connect(gpEdApp, SIGNAL(AssetsModified()), this, SLOT(SetupPackagesList()));
|
||||||
}
|
}
|
||||||
|
|
||||||
CProjectOverviewDialog::~CProjectOverviewDialog()
|
CProjectSettingsDialog::~CProjectSettingsDialog()
|
||||||
{
|
{
|
||||||
delete mpUI;
|
delete mpUI;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CProjectOverviewDialog::ActiveProjectChanged(CGameProject *pProj)
|
void CProjectSettingsDialog::ActiveProjectChanged(CGameProject *pProj)
|
||||||
{
|
{
|
||||||
mpProject = pProj;
|
mpProject = pProj;
|
||||||
|
|
||||||
|
if (mpProject)
|
||||||
|
{
|
||||||
|
// Set up project info
|
||||||
|
mpUI->ProjectNameLineEdit->setText( TO_QSTRING(pProj->Name()) );
|
||||||
|
mpUI->GameLineEdit->setText( TO_QSTRING(GetGameName(pProj->Game())) );
|
||||||
|
mpUI->GameIdLineEdit->setText( TO_QSTRING(pProj->GameID()) );
|
||||||
|
|
||||||
|
float BuildVer = pProj->BuildVersion();
|
||||||
|
ERegion Region = pProj->Region();
|
||||||
|
TString BuildName = pProj->GameInfo()->GetBuildName(BuildVer, Region);
|
||||||
|
mpUI->BuildLineEdit->setText( QString("%1 (%2)").arg(BuildVer).arg( TO_QSTRING(BuildName) ) );
|
||||||
|
mpUI->RegionLineEdit->setText( TO_QSTRING(GetRegionName(Region)) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Clear project info
|
||||||
|
mpUI->ProjectNameLineEdit->clear();
|
||||||
|
mpUI->GameLineEdit->clear();
|
||||||
|
mpUI->GameIdLineEdit->clear();
|
||||||
|
mpUI->BuildLineEdit->clear();
|
||||||
|
mpUI->RegionLineEdit->clear();
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
|
||||||
SetupPackagesList();
|
SetupPackagesList();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CProjectOverviewDialog::SetupPackagesList()
|
void CProjectSettingsDialog::SetupPackagesList()
|
||||||
{
|
{
|
||||||
mpUI->PackagesList->clear();
|
mpUI->PackagesList->clear();
|
||||||
if (!mpProject) return;
|
if (!mpProject) return;
|
||||||
|
@ -50,7 +75,7 @@ void CProjectOverviewDialog::SetupPackagesList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CProjectOverviewDialog::CookPackage()
|
void CProjectSettingsDialog::CookPackage()
|
||||||
{
|
{
|
||||||
u32 PackageIdx = mpUI->PackagesList->currentRow();
|
u32 PackageIdx = mpUI->PackagesList->currentRow();
|
||||||
CPackage *pPackage = mpProject->PackageByIndex(PackageIdx);
|
CPackage *pPackage = mpProject->PackageByIndex(PackageIdx);
|
||||||
|
@ -58,7 +83,7 @@ void CProjectOverviewDialog::CookPackage()
|
||||||
SetupPackagesList();
|
SetupPackagesList();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CProjectOverviewDialog::CookAllDirtyPackages()
|
void CProjectSettingsDialog::CookAllDirtyPackages()
|
||||||
{
|
{
|
||||||
gpEdApp->CookAllDirtyPackages();
|
gpEdApp->CookAllDirtyPackages();
|
||||||
SetupPackagesList();
|
SetupPackagesList();
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef CPROJECTOVERVIEWDIALOG_H
|
#ifndef CPROJECTSETTINGSDIALOG_H
|
||||||
#define CPROJECTOVERVIEWDIALOG_H
|
#define CPROJECTSETTINGSDIALOG_H
|
||||||
|
|
||||||
#include "Editor/WorldEditor/CWorldEditor.h"
|
#include "Editor/WorldEditor/CWorldEditor.h"
|
||||||
#include <Core/GameProject/CGameProject.h>
|
#include <Core/GameProject/CGameProject.h>
|
||||||
|
@ -7,13 +7,13 @@
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class CProjectOverviewDialog;
|
class CProjectSettingsDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
class CProjectOverviewDialog : public QDialog
|
class CProjectSettingsDialog : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Ui::CProjectOverviewDialog *mpUI;
|
Ui::CProjectSettingsDialog *mpUI;
|
||||||
CGameProject *mpProject;
|
CGameProject *mpProject;
|
||||||
|
|
||||||
QVector<CResourceEntry*> mWorldEntries;
|
QVector<CResourceEntry*> mWorldEntries;
|
||||||
|
@ -21,8 +21,8 @@ class CProjectOverviewDialog : public QDialog
|
||||||
TResPtr<CWorld> mpWorld;
|
TResPtr<CWorld> mpWorld;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CProjectOverviewDialog(QWidget *pParent = 0);
|
explicit CProjectSettingsDialog(QWidget *pParent = 0);
|
||||||
~CProjectOverviewDialog();
|
~CProjectSettingsDialog();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void ActiveProjectChanged(CGameProject *pProj);
|
void ActiveProjectChanged(CGameProject *pProj);
|
||||||
|
@ -31,4 +31,4 @@ public slots:
|
||||||
void CookAllDirtyPackages();
|
void CookAllDirtyPackages();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CPROJECTOVERVIEWDIALOG_H
|
#endif // CPROJECTSETTINGSDIALOG_H
|
|
@ -0,0 +1,148 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>CProjectSettingsDialog</class>
|
||||||
|
<widget class="QDialog" name="CProjectSettingsDialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>290</width>
|
||||||
|
<height>558</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Project Settings</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="ProjectSettingsLabel">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Project Settings</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QFormLayout" name="formLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="ProjectNameLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Name:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="ProjectNameLineEdit">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="GameLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Game:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="GameLineEdit">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="GameIdLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Game ID:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="GameIdLineEdit">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="BuildLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Build:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLineEdit" name="BuildLineEdit">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="RegionLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Region:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QLineEdit" name="RegionLineEdit">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="PackagesGroupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Packages</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
|
<item>
|
||||||
|
<widget class="QListWidget" name="PackagesList">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="alternatingRowColors">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="verticalScrollMode">
|
||||||
|
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="horizontalScrollMode">
|
||||||
|
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="CookPackageButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Cook Package</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="CookAllDirtyPackagesButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Cook All Dirty Packages</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
|
@ -172,7 +172,6 @@ HEADERS += \
|
||||||
CharacterEditor/CSkeletonHierarchyModel.h \
|
CharacterEditor/CSkeletonHierarchyModel.h \
|
||||||
CLineRenderable.h \
|
CLineRenderable.h \
|
||||||
WorldEditor/CCollisionRenderSettingsDialog.h \
|
WorldEditor/CCollisionRenderSettingsDialog.h \
|
||||||
CProjectOverviewDialog.h \
|
|
||||||
ResourceBrowser/CResourceBrowser.h \
|
ResourceBrowser/CResourceBrowser.h \
|
||||||
ResourceBrowser/CResourceTableModel.h \
|
ResourceBrowser/CResourceTableModel.h \
|
||||||
ResourceBrowser/CResourceProxyModel.h \
|
ResourceBrowser/CResourceProxyModel.h \
|
||||||
|
@ -184,7 +183,8 @@ HEADERS += \
|
||||||
WorldEditor/CScriptEditSidebar.h \
|
WorldEditor/CScriptEditSidebar.h \
|
||||||
WorldEditor/CWorldInfoSidebar.h \
|
WorldEditor/CWorldInfoSidebar.h \
|
||||||
WorldEditor/CWorldTreeModel.h \
|
WorldEditor/CWorldTreeModel.h \
|
||||||
Widgets/CTimedLineEdit.h
|
Widgets/CTimedLineEdit.h \
|
||||||
|
CProjectSettingsDialog.h
|
||||||
|
|
||||||
# Source Files
|
# Source Files
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
|
@ -244,14 +244,14 @@ SOURCES += \
|
||||||
CharacterEditor/CCharacterEditorViewport.cpp \
|
CharacterEditor/CCharacterEditorViewport.cpp \
|
||||||
CharacterEditor/CSkeletonHierarchyModel.cpp \
|
CharacterEditor/CSkeletonHierarchyModel.cpp \
|
||||||
WorldEditor/CCollisionRenderSettingsDialog.cpp \
|
WorldEditor/CCollisionRenderSettingsDialog.cpp \
|
||||||
CProjectOverviewDialog.cpp \
|
|
||||||
ResourceBrowser/CResourceBrowser.cpp \
|
ResourceBrowser/CResourceBrowser.cpp \
|
||||||
CEditorApplication.cpp \
|
CEditorApplication.cpp \
|
||||||
Widgets/CResourceSelector.cpp \
|
Widgets/CResourceSelector.cpp \
|
||||||
CExportGameDialog.cpp \
|
CExportGameDialog.cpp \
|
||||||
WorldEditor/CScriptEditSidebar.cpp \
|
WorldEditor/CScriptEditSidebar.cpp \
|
||||||
WorldEditor/CWorldInfoSidebar.cpp \
|
WorldEditor/CWorldInfoSidebar.cpp \
|
||||||
WorldEditor/CWorldTreeModel.cpp
|
WorldEditor/CWorldTreeModel.cpp \
|
||||||
|
CProjectSettingsDialog.cpp
|
||||||
|
|
||||||
# UI Files
|
# UI Files
|
||||||
FORMS += \
|
FORMS += \
|
||||||
|
@ -274,7 +274,7 @@ FORMS += \
|
||||||
CAboutDialog.ui \
|
CAboutDialog.ui \
|
||||||
CharacterEditor/CCharacterEditor.ui \
|
CharacterEditor/CCharacterEditor.ui \
|
||||||
WorldEditor/CCollisionRenderSettingsDialog.ui \
|
WorldEditor/CCollisionRenderSettingsDialog.ui \
|
||||||
CProjectOverviewDialog.ui \
|
|
||||||
ResourceBrowser/CResourceBrowser.ui \
|
ResourceBrowser/CResourceBrowser.ui \
|
||||||
CExportGameDialog.ui \
|
CExportGameDialog.ui \
|
||||||
WorldEditor/CWorldInfoSidebar.ui
|
WorldEditor/CWorldInfoSidebar.ui \
|
||||||
|
CProjectSettingsDialog.ui
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "Editor/CExportGameDialog.h"
|
#include "Editor/CExportGameDialog.h"
|
||||||
#include "Editor/CNodeCopyMimeData.h"
|
#include "Editor/CNodeCopyMimeData.h"
|
||||||
#include "Editor/CPakToolDialog.h"
|
#include "Editor/CPakToolDialog.h"
|
||||||
|
#include "Editor/CProjectSettingsDialog.h"
|
||||||
#include "Editor/CSelectionIterator.h"
|
#include "Editor/CSelectionIterator.h"
|
||||||
#include "Editor/UICommon.h"
|
#include "Editor/UICommon.h"
|
||||||
#include "Editor/PropertyEdit/CPropertyView.h"
|
#include "Editor/PropertyEdit/CPropertyView.h"
|
||||||
|
@ -171,6 +172,7 @@ CWorldEditor::CWorldEditor(QWidget *parent)
|
||||||
connect(ui->ActionSave, SIGNAL(triggered()) , this, SLOT(Save()));
|
connect(ui->ActionSave, SIGNAL(triggered()) , this, SLOT(Save()));
|
||||||
connect(ui->ActionSaveAndRepack, SIGNAL(triggered()), this, SLOT(SaveAndRepack()));
|
connect(ui->ActionSaveAndRepack, SIGNAL(triggered()), this, SLOT(SaveAndRepack()));
|
||||||
connect(ui->ActionExportGame, SIGNAL(triggered()), this, SLOT(ExportGame()));
|
connect(ui->ActionExportGame, SIGNAL(triggered()), this, SLOT(ExportGame()));
|
||||||
|
connect(ui->ActionProjectSettings, SIGNAL(triggered()), this, SLOT(OpenProjectSettings()));
|
||||||
connect(ui->ActionCloseProject, SIGNAL(triggered()), this, SLOT(CloseProject()));
|
connect(ui->ActionCloseProject, SIGNAL(triggered()), this, SLOT(CloseProject()));
|
||||||
connect(ui->ActionExit, SIGNAL(triggered()), this, SLOT(close()));
|
connect(ui->ActionExit, SIGNAL(triggered()), this, SLOT(close()));
|
||||||
|
|
||||||
|
@ -317,29 +319,20 @@ bool CWorldEditor::SetArea(CWorld *pWorld, int AreaIndex)
|
||||||
mpLinkDialog->SetMaster(pMaster);
|
mpLinkDialog->SetMaster(pMaster);
|
||||||
|
|
||||||
// Set window title
|
// Set window title
|
||||||
CStringTable *pWorldNameTable = mpWorld->WorldName();
|
QString ProjectName = TO_QSTRING(gpEdApp->ActiveProject()->Name());
|
||||||
TWideString WorldName = pWorldNameTable ? pWorldNameTable->String("ENGL", 0) : "[Untitled World]";
|
QString WorldName = TO_QSTRING(mpWorld->InGameName());
|
||||||
|
QString AreaName = TO_QSTRING(mpWorld->AreaInGameName(AreaIndex));
|
||||||
|
|
||||||
if (CurrentGame() < eReturns)
|
if (CurrentGame() < eReturns)
|
||||||
{
|
{
|
||||||
CStringTable *pAreaNameTable = mpWorld->AreaName(AreaIndex);
|
SET_WINDOWTITLE_APPVARS( QString("%APP_FULL_NAME% - %1 - %2 - %3[*]").arg(ProjectName, WorldName, AreaName) );
|
||||||
TWideString AreaName = pAreaNameTable ? pAreaNameTable->String("ENGL", 0) : (TWideString("!") + mpWorld->AreaInternalName(AreaIndex).ToUTF16());
|
Log::Write("Loaded area: " + mpArea->Entry()->Name().ToUTF8() + " (" + TO_TSTRING(AreaName) + ")");
|
||||||
|
|
||||||
if (AreaName.IsEmpty())
|
|
||||||
AreaName = "[Untitled Area]";
|
|
||||||
|
|
||||||
SET_WINDOWTITLE_APPVARS( QString("%APP_FULL_NAME% - %1 - %2[*]").arg(TO_QSTRING(WorldName)).arg(TO_QSTRING(AreaName)) );
|
|
||||||
Log::Write("Loaded area: " + mpArea->Source() + " (" + TO_TSTRING(TO_QSTRING(AreaName)) + ")");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QString LevelName;
|
SET_WINDOWTITLE_APPVARS( QString("%APP_FULL_NAME% - %1 - %2[*]").arg(AreaName) );
|
||||||
if (pWorldNameTable) LevelName = TO_QSTRING(WorldName);
|
Log::Write("Loaded level: World " + mpWorld->Entry()->Name().ToUTF8() + " / Area " + mpArea->Entry()->Name().ToUTF8() + " (" + TO_TSTRING(AreaName) + ")");
|
||||||
else LevelName = "!" + TO_QSTRING(mpWorld->AreaInternalName(AreaIndex));
|
|
||||||
|
|
||||||
SET_WINDOWTITLE_APPVARS( QString("%APP_FULL_NAME% - %1[*]").arg(LevelName) );
|
|
||||||
Log::Write("Loaded level: World " + mpWorld->Source() + " / Area " + mpArea->Source() + " (" + TO_TSTRING(LevelName) + ")");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update paste action
|
// Update paste action
|
||||||
|
@ -560,6 +553,13 @@ void CWorldEditor::ChangeEditMode(EWorldEditorMode Mode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CWorldEditor::OpenProjectSettings()
|
||||||
|
{
|
||||||
|
CProjectSettingsDialog *pDialog = gpEdApp->ProjectDialog();
|
||||||
|
pDialog->show();
|
||||||
|
pDialog->raise();
|
||||||
|
}
|
||||||
|
|
||||||
void CWorldEditor::OpenResourceBrowser()
|
void CWorldEditor::OpenResourceBrowser()
|
||||||
{
|
{
|
||||||
CResourceBrowser *pBrowser = gpEdApp->ResourceBrowser();
|
CResourceBrowser *pBrowser = gpEdApp->ResourceBrowser();
|
||||||
|
@ -569,6 +569,7 @@ void CWorldEditor::OpenResourceBrowser()
|
||||||
|
|
||||||
void CWorldEditor::OnActiveProjectChanged(CGameProject *pProj)
|
void CWorldEditor::OnActiveProjectChanged(CGameProject *pProj)
|
||||||
{
|
{
|
||||||
|
ui->ActionProjectSettings->setEnabled( pProj != nullptr );
|
||||||
ui->ActionCloseProject->setEnabled( pProj != nullptr );
|
ui->ActionCloseProject->setEnabled( pProj != nullptr );
|
||||||
ResetCamera();
|
ResetCamera();
|
||||||
if (!pProj) return;
|
if (!pProj) return;
|
||||||
|
|
|
@ -109,6 +109,7 @@ public slots:
|
||||||
|
|
||||||
void ChangeEditMode(int Mode);
|
void ChangeEditMode(int Mode);
|
||||||
void ChangeEditMode(EWorldEditorMode Mode);
|
void ChangeEditMode(EWorldEditorMode Mode);
|
||||||
|
void OpenProjectSettings();
|
||||||
void OpenResourceBrowser();
|
void OpenResourceBrowser();
|
||||||
|
|
||||||
void OnActiveProjectChanged(CGameProject *pProj);
|
void OnActiveProjectChanged(CGameProject *pProj);
|
||||||
|
|
|
@ -283,8 +283,9 @@
|
||||||
<addaction name="ActionSaveAndRepack"/>
|
<addaction name="ActionSaveAndRepack"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="ActionExportGame"/>
|
<addaction name="ActionExportGame"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="ActionProjectSettings"/>
|
||||||
<addaction name="ActionCloseProject"/>
|
<addaction name="ActionCloseProject"/>
|
||||||
|
<addaction name="separator"/>
|
||||||
<addaction name="ActionExit"/>
|
<addaction name="ActionExit"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuEdit">
|
<widget class="QMenu" name="menuEdit">
|
||||||
|
@ -350,7 +351,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QToolBar" name="EditModeToolBar">
|
<widget class="QToolBar" name="EditModeToolBar">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -362,7 +363,7 @@
|
||||||
<enum>RightToolBarArea</enum>
|
<enum>RightToolBarArea</enum>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="toolBarBreak">
|
<attribute name="toolBarBreak">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
<action name="ActionSave">
|
<action name="ActionSave">
|
||||||
|
@ -762,6 +763,14 @@
|
||||||
<string>Edit Script</string>
|
<string>Edit Script</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="ActionProjectSettings">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Project Settings</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
|
|
@ -17,6 +17,7 @@ CWorldInfoSidebar::CWorldInfoSidebar(CWorldEditor *pEditor)
|
||||||
pHeader->resizeSection(0, pHeader->width() * 2); // I really have no idea how this works, I just got this from trial & error
|
pHeader->resizeSection(0, pHeader->width() * 2); // I really have no idea how this works, I just got this from trial & error
|
||||||
|
|
||||||
connect(gpEdApp, SIGNAL(ActiveProjectChanged(CGameProject*)), this, SLOT(OnActiveProjectChanged(CGameProject*)));
|
connect(gpEdApp, SIGNAL(ActiveProjectChanged(CGameProject*)), this, SLOT(OnActiveProjectChanged(CGameProject*)));
|
||||||
|
connect(mpUI->ProjectSettingsButton, SIGNAL(pressed()), pEditor, SLOT(OpenProjectSettings()));
|
||||||
connect(mpUI->AreaSearchLineEdit, SIGNAL(StoppedTyping(QString)), this, SLOT(OnAreaFilterStringChanged(QString)));
|
connect(mpUI->AreaSearchLineEdit, SIGNAL(StoppedTyping(QString)), this, SLOT(OnAreaFilterStringChanged(QString)));
|
||||||
connect(mpUI->WorldTreeView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(OnWorldTreeClicked(QModelIndex)));
|
connect(mpUI->WorldTreeView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(OnWorldTreeClicked(QModelIndex)));
|
||||||
connect(mpUI->WorldTreeView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(OnWorldTreeDoubleClicked(QModelIndex)));
|
connect(mpUI->WorldTreeView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(OnWorldTreeDoubleClicked(QModelIndex)));
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="ProjectInfoWidget" native="true">
|
<widget class="QWidget" name="ProjectInfoWidget" native="true">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -29,8 +32,16 @@
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="GameNameLabel">
|
<widget class="QLabel" name="GameNameLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>12</pointsize>
|
<pointsize>12</pointsize>
|
||||||
|
@ -41,6 +52,20 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="ProjectSettingsButton">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Project Settings</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="CTimedLineEdit" name="AreaSearchLineEdit">
|
<widget class="CTimedLineEdit" name="AreaSearchLineEdit">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
|
@ -252,10 +277,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="CResourceSelector" name="AreaSelector" native="true">
|
<widget class="CResourceSelector" name="AreaSelector" native="true"/>
|
||||||
<zorder>AreaNameLineEdit</zorder>
|
|
||||||
<zorder>AreaInternalNameLabel</zorder>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="AreaNameStringLabel">
|
<widget class="QLabel" name="AreaNameStringLabel">
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#include "CEditorApplication.h"
|
#include "CEditorApplication.h"
|
||||||
#include "CProjectOverviewDialog.h"
|
|
||||||
#include <Common/Log.h>
|
#include <Common/Log.h>
|
||||||
#include <Core/Resource/Factory/CTemplateLoader.h>
|
#include <Core/Resource/Factory/CTemplateLoader.h>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue