1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-03 17:37:18 +00:00
OpenMW/apps/openmw/mwgui/timeadvancer.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
827 B
C++
Raw Normal View History

#ifndef MWGUI_TIMEADVANCER_H
#define MWGUI_TIMEADVANCER_H
#include <MyGUI_Delegate.h>
namespace MWGui
{
class TimeAdvancer
{
public:
TimeAdvancer(float delay);
void run(int hours, int interruptAt = -1);
void stop();
void onFrame(float dt);
2021-03-29 17:44:23 +00:00
int getHours() const;
bool isRunning() const;
// signals
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
typedef MyGUI::delegates::CMultiDelegate2<int, int> EventHandle_IntInt;
EventHandle_IntInt eventProgressChanged;
EventHandle_Void eventInterrupted;
EventHandle_Void eventFinished;
private:
bool mRunning;
int mCurHour;
int mHours;
int mInterruptAt;
float mDelay;
float mRemainingTime;
};
}
#endif