diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-09-04 14:45:09 +0200 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-09-20 10:26:15 +0200 |
commit | 07dcefabcbe3436ae6de09bc8c99120ab3f0a745 (patch) | |
tree | e46b72d7236054a3689958b882806f1a899dcafa /launcher/ui/pages | |
parent | 40c68595d7d5eccd1f264b2dc1e768b3faad6f16 (diff) | |
download | PrismLauncher-07dcefabcbe3436ae6de09bc8c99120ab3f0a745.tar.gz PrismLauncher-07dcefabcbe3436ae6de09bc8c99120ab3f0a745.tar.bz2 PrismLauncher-07dcefabcbe3436ae6de09bc8c99120ab3f0a745.zip |
feat: add texture pack parsing
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/ui/pages')
-rw-r--r-- | launcher/ui/pages/instance/TexturePackPage.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/launcher/ui/pages/instance/TexturePackPage.h b/launcher/ui/pages/instance/TexturePackPage.h index fa219eda..69b836ca 100644 --- a/launcher/ui/pages/instance/TexturePackPage.h +++ b/launcher/ui/pages/instance/TexturePackPage.h @@ -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; + } }; |