diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-09-20 13:28:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-20 13:28:33 +0200 |
commit | c6bcb6228b421983006d16c93f7cda091dc9679b (patch) | |
tree | 34bdf29ef57976517e5ce3c78e0a9dbe28d678cd /launcher/ui/pages | |
parent | 40c68595d7d5eccd1f264b2dc1e768b3faad6f16 (diff) | |
parent | a24d589845aded0a485ddced900768efaca5328b (diff) | |
download | PrismLauncher-c6bcb6228b421983006d16c93f7cda091dc9679b.tar.gz PrismLauncher-c6bcb6228b421983006d16c93f7cda091dc9679b.tar.bz2 PrismLauncher-c6bcb6228b421983006d16c93f7cda091dc9679b.zip |
Merge pull request #1108 from Scrumplex/better_texture_packs
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; + } }; |