r5sdk/r5dev/sdklauncher/download_surface.h
Kawe Mazidjatari 41ebc431b2 Finish downloading of game and sdk files
Moved entire logic to dedicated wrappers.
2023-07-28 14:50:46 +02:00

38 lines
961 B
C++

#pragma once
class CDownloadProgress : public Forms::Form
{
public:
CDownloadProgress();
virtual ~CDownloadProgress() = default;
// Updates the progress
void UpdateProgress(uint32_t Progress, bool Finished);
bool IsCanceled();
void SetCanCancel(bool bEnable);
void SetAutoClose(bool Value);
void SetExportLabel(const char* pNewLabel);
private:
// Internal routine to setup the component
void InitializeComponent();
// Internal event on finish click
static void OnFinishClick(Forms::Control* Sender);
static void OnCancelClick(Forms::Control* Sender);
void CancelProgress(); // Cancels the progress
// Internal controls reference
UIX::UIXLabel* m_DownloadLabel;
UIX::UIXButton* m_CancelButton;
UIX::UIXButton* m_FinishButton;
UIX::UIXProgressBar* m_ProgressBar;
bool m_bCanClose; // Whether or not we can close.
bool m_bCanceled; // Whether or not we canceled it.
bool m_bAutoClose; // Whether or not to automatically close.
};