initial port for Cevo game in C++ (libs)
This commit is contained in:
commit
8436242032
375 files changed
+46282
No files matched your search
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
namespace Cevo {
|
||||
|
||||
// Equivalent of Common.Delay.pas's TDelay: a simple one-shot countdown.
|
||||
class Delay {
|
||||
public:
|
||||
void start();
|
||||
void stop();
|
||||
bool isEnabled() const { return m_enabled; }
|
||||
// NOTE: matches the original's TDelay.SetEnabled, which ignores its
|
||||
// argument and always enables - kept as-is (transcribed literally).
|
||||
void setEnabled(bool value);
|
||||
bool isOverflowed() const;
|
||||
bool isRunning() const;
|
||||
|
||||
int durationMs = 1000;
|
||||
|
||||
private:
|
||||
QDateTime m_startTime;
|
||||
bool m_enabled = false;
|
||||
};
|
||||
|
||||
} // namespace Cevo
|
||||
Reference in new issue
Block a user