GH-2971 Brand mod model for resource/texture pack pages

This commit is contained in:
Jamie Mansfield
2021-06-19 00:59:48 +01:00
parent c92b44e6d6
commit b246fc171e
8 changed files with 84 additions and 3 deletions

View File

@ -29,6 +29,8 @@
#include "meta/VersionList.h"
#include "mod/ModFolderModel.h"
#include "mod/ResourcePackFolderModel.h"
#include "mod/TexturePackFolderModel.h"
#include "WorldList.h"
#include "icons/IIconList.h"
@ -986,7 +988,7 @@ std::shared_ptr<ModFolderModel> MinecraftInstance::resourcePackList() const
{
if (!m_resource_pack_list)
{
m_resource_pack_list.reset(new ModFolderModel(resourcePacksDir()));
m_resource_pack_list.reset(new ResourcePackFolderModel(resourcePacksDir()));
m_resource_pack_list->disableInteraction(isRunning());
connect(this, &BaseInstance::runningStatusChanged, m_resource_pack_list.get(), &ModFolderModel::disableInteraction);
}
@ -997,7 +999,7 @@ std::shared_ptr<ModFolderModel> MinecraftInstance::texturePackList() const
{
if (!m_texture_pack_list)
{
m_texture_pack_list.reset(new ModFolderModel(texturePacksDir()));
m_texture_pack_list.reset(new TexturePackFolderModel(texturePacksDir()));
m_texture_pack_list->disableInteraction(isRunning());
connect(this, &BaseInstance::runningStatusChanged, m_texture_pack_list.get(), &ModFolderModel::disableInteraction);
}