Split AchievementBox UpdateData

AchievementBox now has UpdateData and UpdateProgress, which is called from UpdateData, but may be called elsewhere to update just the progress measurement of the achievement.
This commit is contained in:
LillyJadeKatrin 2024-06-19 22:12:30 -04:00
parent 0cc1d4c62d
commit 75c2360aea
2 changed files with 6 additions and 0 deletions

View File

@ -87,6 +87,11 @@ void AchievementBox::UpdateData()
m_status->setText(tr("Locked"));
}
UpdateProgress();
}
void AchievementBox::UpdateProgress()
{
if (m_achievement->measured_percent > 0.000)
{
m_progress_bar->setRange(0, 100);

View File

@ -20,6 +20,7 @@ class AchievementBox final : public QGroupBox
public:
explicit AchievementBox(QWidget* parent, rc_client_achievement_t* achievement);
void UpdateData();
void UpdateProgress();
private:
QLabel* m_badge;