diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-03-02 10:08:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-02 10:08:45 +0000 |
commit | 9265c319a96b3dd5681767c196a397fbbae9164a (patch) | |
tree | 2f2602a604d64201f1d626dc8655d6edfa0b3e0d /launcher/ui/pages/instance/TexturePackPage.h | |
parent | 9f202caf9356ebaf5fd845210adea5e935d4350f (diff) | |
parent | 89255e34bd0651ab226518090667bef92066d80c (diff) | |
download | PrismLauncher-9265c319a96b3dd5681767c196a397fbbae9164a.tar.gz PrismLauncher-9265c319a96b3dd5681767c196a397fbbae9164a.tar.bz2 PrismLauncher-9265c319a96b3dd5681767c196a397fbbae9164a.zip |
Merge pull request #788 from flowln/other_resource_downloaders_two
Add resource pack, texture pack and shader pack downloaders
Diffstat (limited to 'launcher/ui/pages/instance/TexturePackPage.h')
-rw-r--r-- | launcher/ui/pages/instance/TexturePackPage.h | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/launcher/ui/pages/instance/TexturePackPage.h b/launcher/ui/pages/instance/TexturePackPage.h index 69b836ca..47a8fa60 100644 --- a/launcher/ui/pages/instance/TexturePackPage.h +++ b/launcher/ui/pages/instance/TexturePackPage.h @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: GPL-3.0-only +// SPDX-FileCopyrightText: 2023 flowln <flowlnlnln@gmail.com> +// +// SPDX-License-Identifier: GPL-3.0-only AND Apache-2.0 /* - * PolyMC - Minecraft Launcher + * Prism Launcher - Minecraft Launcher * Copyright (c) 2022 Jamie Mansfield <jmansfield@cadixdev.org> * * This program is free software: you can redistribute it and/or modify @@ -39,18 +41,12 @@ #include "ui_ExternalResourcesPage.h" #include "minecraft/mod/TexturePackFolderModel.h" -#include "minecraft/mod/TexturePack.h" class TexturePackPage : public ExternalResourcesPage { Q_OBJECT public: - explicit TexturePackPage(MinecraftInstance *instance, std::shared_ptr<TexturePackFolderModel> model, QWidget *parent = 0) - : ExternalResourcesPage(instance, model, parent) - { - ui->actionViewConfigs->setVisible(false); - } - virtual ~TexturePackPage() {} + explicit TexturePackPage(MinecraftInstance *instance, std::shared_ptr<TexturePackFolderModel> model, QWidget* parent = nullptr); QString displayName() const override { return tr("Texture packs"); } QIcon icon() const override { return APPLICATION->getThemedIcon("resourcepacks"); } @@ -63,13 +59,6 @@ public: } 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; - } + bool onSelectionChanged(const QModelIndex& current, const QModelIndex& previous) override; + void downloadTPs(); }; |