feat: add texture pack parsing
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
@ -39,6 +39,7 @@
|
||||
#include "ui_ExternalResourcesPage.h"
|
||||
|
||||
#include "minecraft/mod/TexturePackFolderModel.h"
|
||||
#include "minecraft/mod/TexturePack.h"
|
||||
|
||||
class TexturePackPage : public ExternalResourcesPage
|
||||
{
|
||||
@ -60,4 +61,15 @@ public:
|
||||
{
|
||||
return m_instance->traits().contains("texturepacks");
|
||||
}
|
||||
|
||||
public slots:
|
||||
bool onSelectionChanged(const QModelIndex& current, const QModelIndex& previous) override
|
||||
{
|
||||
auto sourceCurrent = m_filterModel->mapToSource(current);
|
||||
int row = sourceCurrent.row();
|
||||
auto& rp = static_cast<TexturePack&>(m_model->at(row));
|
||||
ui->frame->updateWithTexturePack(rp);
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user