2023-06-03 01:20:42 +00:00
|
|
|
// Copyright 2023 Dolphin Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifdef USE_RETRO_ACHIEVEMENTS
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
#include "Core/AchievementManager.h"
|
|
|
|
|
|
|
|
class QGroupBox;
|
|
|
|
class QLabel;
|
|
|
|
class QProgressBar;
|
|
|
|
|
|
|
|
class AchievementHeaderWidget final : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit AchievementHeaderWidget(QWidget* parent);
|
|
|
|
void UpdateData();
|
|
|
|
|
|
|
|
private:
|
2023-06-15 07:57:58 +00:00
|
|
|
QLabel* m_user_icon;
|
|
|
|
QLabel* m_game_icon;
|
|
|
|
QLabel* m_name;
|
|
|
|
QLabel* m_points;
|
Update Achievement Dialog Header to use rc_client
Two portions of this need updating.
Anything related to points and unlock counts and scoring uses game_summary now instead of the TallyScore method. Unfortunately this comes with the drawback that I cannot easily at this time access the number of points/unlocks from the other hardcore mode, so things like the second progress bar have been deleted.
Rich presence, which no longer needs to be stored, but can be calculated at request. As the AchievementHeader can now update just the Rich Presence, DoFrame can now simply call a header update with .rp=true and the current Rich Presence will be calculated immediately.
As the two items above are the last remaining things to use a number of the components in AchievementManager, this also deletes: Request V1 (V2 is renamed accordingly), ResponseType, PointSpread, TallyScore, UnlockStatus, and the RP generation and ping methods.
2024-04-06 02:46:40 +00:00
|
|
|
QProgressBar* m_game_progress;
|
2024-07-10 12:52:12 +00:00
|
|
|
QLabel* m_progress_label;
|
2023-06-03 01:20:42 +00:00
|
|
|
QLabel* m_rich_presence;
|
2023-06-15 07:57:58 +00:00
|
|
|
QGroupBox* m_header_box;
|
2023-06-03 01:20:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // USE_RETRO_ACHIEVEMENTS
|