Remove "Hook Steam button"

Making it pretty much mandatory if not manually set through .ini
experimental
Peter Repukat 7 years ago
parent 70c1a7917d
commit e4b7207c61

@ -56,7 +56,7 @@ void GloSC::writeIni(QString entryName) const
settings.setValue("bEnableOverlay", 0 + ui.cbOverlay->isChecked());
settings.setValue("bEnableControllers", 0 + ui.cbControllers->isChecked());
settings.setValue("bUseDesktopConfig", 0 + ui.cbUseDesktop->isChecked());
settings.setValue("bHookSteam", 0 + ui.cbHookSteam->isChecked());
settings.setValue("bHookSteam", hook_steam_);
settings.setValue("version", GLOSC_VERSION);
settings.endGroup();
@ -142,10 +142,9 @@ void GloSC::animate(int to)
anim->start(QPropertyAnimation::DeleteWhenStopped);
}
void GloSC::on_cbUseDesktop_toggled(bool checked) const
void GloSC::on_cbUseDesktop_toggled(bool checked)
{
ui.cbHookSteam->setEnabled(!checked);
ui.cbHookSteam->setChecked(!checked);
hook_steam_ = !checked;
}
void GloSC::on_pbCreateNew_clicked()
@ -154,7 +153,7 @@ void GloSC::on_pbCreateNew_clicked()
ui.cbOverlay->setChecked(true);
ui.cbControllers->setChecked(true);
ui.cbHookSteam->setChecked(true);
hook_steam_ = true;
ui.cbLaunchGame->setChecked(false);
ui.lePath->setText("");
@ -445,7 +444,7 @@ void GloSC::on_pbUWP_clicked()
}
void GloSC::on_lwInstances_currentRowChanged(int row) const
void GloSC::on_lwInstances_currentRowChanged(int row)
{
if (row < 0)
return;
@ -461,13 +460,11 @@ void GloSC::on_lwInstances_currentRowChanged(int row) const
ui.cbUseDesktop->setChecked(settings.value("bUseDesktopConfig").toBool());
if (ui.cbUseDesktop->isChecked())
{
ui.cbHookSteam->setChecked(false);
ui.cbHookSteam->setEnabled(false);
hook_steam_ = false;
}
else
{
ui.cbHookSteam->setEnabled(true);
ui.cbHookSteam->setChecked(settings.value("bHookSteam").toBool());
hook_steam_ = true;
}
settings.endGroup();
@ -489,22 +486,5 @@ void GloSC::on_lwInstances_itemSelectionChanged()
if (width() != wide_x)
{
animate(wide_x);
} else {
ui.configBox->setGraphicsEffect(&opEff);
QPropertyAnimation* anim = new QPropertyAnimation(&opEff, "opacity");
anim->setEasingCurve(QEasingCurve::OutExpo);
anim->setDuration(160);
anim->setStartValue(1.f);
anim->setEndValue(0.f);
connect(anim, &QPropertyAnimation::finished, this, [this]()
{
QPropertyAnimation* anim2 = new QPropertyAnimation(&opEff, "opacity");
anim2->setEasingCurve(QEasingCurve::InExpo);
anim2->setDuration(160);
anim2->setStartValue(0.f);
anim2->setEndValue(1.f);
anim2->start(QPropertyAnimation::DeleteWhenStopped);
});
anim->start(QPropertyAnimation::DeleteWhenStopped);
}
}
}

@ -43,6 +43,8 @@ class GloSC : public QMainWindow
public:
GloSC(QWidget *parent = Q_NULLPTR);
bool hook_steam_ = true;
private:
Ui::GloSCClass ui;
@ -65,6 +67,7 @@ private:
void animate(int to);
private slots:
void on_cbUseDesktop_toggled(bool checked) const;
void on_pbCreateNew_clicked();

@ -169,24 +169,7 @@
</property>
<property name="text">
<string>Use Desktop-Config
Disables hooking, per application bindings won't work</string>
</property>
</widget>
<widget class="QCheckBox" name="cbHookSteam">
<property name="geometry">
<rect>
<x>10</x>
<y>160</y>
<width>371</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>Hook Steam
Enforces bindings reliably by hooking into Steam</string>
</property>
<property name="checked">
<bool>true</bool>
Doesn't work if GloSC window is in focus</string>
</property>
</widget>
<widget class="QCheckBox" name="cbLaunchGame">

Loading…
Cancel
Save