Disable "Check for Updates" and "Download Mods" while the game is running
Signed-off-by: Gingeh <39150378+Gingeh@users.noreply.github.com>
This commit is contained in:
		@@ -46,7 +46,7 @@ class ExternalResourcesPage : public QMainWindow, public BasePage {
 | 
			
		||||
   protected slots:
 | 
			
		||||
    void itemActivated(const QModelIndex& index);
 | 
			
		||||
    void filterTextChanged(const QString& newContents);
 | 
			
		||||
    void runningStateChanged(bool running);
 | 
			
		||||
    virtual void runningStateChanged(bool running);
 | 
			
		||||
 | 
			
		||||
    virtual void addItem();
 | 
			
		||||
    virtual void removeItem();
 | 
			
		||||
 
 | 
			
		||||
@@ -106,6 +106,13 @@ CoreModFolderPage::CoreModFolderPage(BaseInstance* inst, std::shared_ptr<ModFold
 | 
			
		||||
    : ModFolderPage(inst, mods, parent)
 | 
			
		||||
{}
 | 
			
		||||
 | 
			
		||||
void ModFolderPage::runningStateChanged(bool running)
 | 
			
		||||
{
 | 
			
		||||
    ExternalResourcesPage::runningStateChanged(running);
 | 
			
		||||
    ui->actionDownloadItem->setEnabled(!running);
 | 
			
		||||
    ui->actionUpdateItem->setEnabled(!running);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool ModFolderPage::shouldDisplay() const
 | 
			
		||||
{
 | 
			
		||||
    return true;
 | 
			
		||||
 
 | 
			
		||||
@@ -53,6 +53,7 @@ class ModFolderPage : public ExternalResourcesPage {
 | 
			
		||||
    virtual QString helpPage() const override { return "Loader-mods"; }
 | 
			
		||||
 | 
			
		||||
    virtual bool shouldDisplay() const override;
 | 
			
		||||
    virtual void runningStateChanged(bool running);
 | 
			
		||||
 | 
			
		||||
   private slots:
 | 
			
		||||
    void installMods();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user