diff --git a/apps/opencs/view/doc/view.cpp b/apps/opencs/view/doc/view.cpp index 6a807f086..4868f20ff 100644 --- a/apps/opencs/view/doc/view.cpp +++ b/apps/opencs/view/doc/view.cpp @@ -204,6 +204,32 @@ void CSVDoc::View::setupAssetsMenu() QAction *sounds = new QAction (tr ("Sounds"), this); connect (sounds, SIGNAL (triggered()), this, SLOT (addSoundsSubView())); assets->addAction (sounds); + + assets->addSeparator(); // resources follow here + + QAction *meshes = new QAction (tr ("Meshes"), this); + connect (meshes, SIGNAL (triggered()), this, SLOT (addMeshesSubView())); + assets->addAction (meshes); + + QAction *icons = new QAction (tr ("Icons"), this); + connect (icons, SIGNAL (triggered()), this, SLOT (addIconsSubView())); + assets->addAction (icons); + + QAction *musics = new QAction (tr ("Music"), this); + connect (musics, SIGNAL (triggered()), this, SLOT (addMusicsSubView())); + assets->addAction (musics); + + QAction *soundsRes = new QAction (tr ("Sound Files"), this); + connect (soundsRes, SIGNAL (triggered()), this, SLOT (addSoundsResSubView())); + assets->addAction (soundsRes); + + QAction *textures = new QAction (tr ("Textures"), this); + connect (textures, SIGNAL (triggered()), this, SLOT (addTexturesSubView())); + assets->addAction (textures); + + QAction *videos = new QAction (tr ("Videos"), this); + connect (videos, SIGNAL (triggered()), this, SLOT (addVideosSubView())); + assets->addAction (videos); } void CSVDoc::View::setupUi() @@ -487,6 +513,36 @@ void CSVDoc::View::addBodyPartsSubView() addSubView (CSMWorld::UniversalId::Type_BodyParts); } +void CSVDoc::View::addMeshesSubView() +{ + addSubView (CSMWorld::UniversalId::Type_Meshes); +} + +void CSVDoc::View::addIconsSubView() +{ + addSubView (CSMWorld::UniversalId::Type_Icons); +} + +void CSVDoc::View::addMusicsSubView() +{ + addSubView (CSMWorld::UniversalId::Type_Musics); +} + +void CSVDoc::View::addSoundsResSubView() +{ + addSubView (CSMWorld::UniversalId::Type_SoundsRes); +} + +void CSVDoc::View::addTexturesSubView() +{ + addSubView (CSMWorld::UniversalId::Type_Textures); +} + +void CSVDoc::View::addVideosSubView() +{ + addSubView (CSMWorld::UniversalId::Type_Videos); +} + void CSVDoc::View::abortOperation (int type) { mDocument->abortOperation (type); diff --git a/apps/opencs/view/doc/view.hpp b/apps/opencs/view/doc/view.hpp index a227997c2..19171ff42 100644 --- a/apps/opencs/view/doc/view.hpp +++ b/apps/opencs/view/doc/view.hpp @@ -182,6 +182,18 @@ namespace CSVDoc void addBodyPartsSubView(); + void addMeshesSubView(); + + void addIconsSubView(); + + void addMusicsSubView(); + + void addSoundsResSubView(); + + void addTexturesSubView(); + + void addVideosSubView(); + void toggleShowStatusBar (bool show); void loadErrorLog(); diff --git a/apps/opencs/view/world/subviews.cpp b/apps/opencs/view/world/subviews.cpp index 8c666c1fe..200a26a85 100644 --- a/apps/opencs/view/world/subviews.cpp +++ b/apps/opencs/view/world/subviews.cpp @@ -70,6 +70,21 @@ void CSVWorld::addSubViewFactories (CSVDoc::SubViewFactoryManager& manager) manager.add (CSMWorld::UniversalId::Type_JournalInfos, new CSVDoc::SubViewFactoryWithCreator > (false)); + // Subviews for resources tables + manager.add (CSMWorld::UniversalId::Type_Meshes, + new CSVDoc::SubViewFactoryWithCreator); + manager.add (CSMWorld::UniversalId::Type_Icons, + new CSVDoc::SubViewFactoryWithCreator); + manager.add (CSMWorld::UniversalId::Type_Musics, + new CSVDoc::SubViewFactoryWithCreator); + manager.add (CSMWorld::UniversalId::Type_SoundsRes, + new CSVDoc::SubViewFactoryWithCreator); + manager.add (CSMWorld::UniversalId::Type_Textures, + new CSVDoc::SubViewFactoryWithCreator); + manager.add (CSMWorld::UniversalId::Type_Videos, + new CSVDoc::SubViewFactoryWithCreator); + + // Subviews for editing/viewing individual records manager.add (CSMWorld::UniversalId::Type_Script, new CSVDoc::SubViewFactory);