1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 12:42:11 +00:00
OpenMW/apps/openmw/mwgui/waitdialog.hpp

68 lines
1.5 KiB
C++
Raw Normal View History

2012-09-18 16:29:03 +00:00
#ifndef MWGUI_WAIT_DIALOG_H
#define MWGUI_WAIT_DIALOG_H
#include "window_base.hpp"
namespace MWGui
{
class WaitDialogProgressBar : public WindowBase
{
public:
WaitDialogProgressBar(MWBase::WindowManager& parWindowManager);
virtual void open();
void setProgress(int cur, int total);
protected:
MyGUI::ProgressBar* mProgressBar;
MyGUI::TextBox* mProgressText;
};
2012-09-18 16:29:03 +00:00
class WaitDialog : public WindowBase
{
public:
WaitDialog(MWBase::WindowManager& parWindowManager);
2012-09-18 18:53:32 +00:00
virtual void open();
2012-09-18 16:29:03 +00:00
void onFrame(float dt);
void bedActivated() { setCanRest(true); }
2012-09-19 01:11:23 +00:00
bool getSleeping() { return mWaiting && mSleeping; }
2012-09-29 07:41:34 +00:00
void wakeUp();
2012-09-19 01:11:23 +00:00
2012-09-18 18:53:32 +00:00
protected:
MyGUI::TextBox* mDateTimeText;
MyGUI::TextBox* mRestText;
MyGUI::TextBox* mHourText;
MyGUI::ScrollBar* mHourSlider;
MyGUI::Button* mUntilHealedButton;
MyGUI::Button* mWaitButton;
MyGUI::Button* mCancelButton;
bool mWaiting;
bool mSleeping;
int mCurHour;
int mHours;
float mRemainingTime;
WaitDialogProgressBar mProgressBar;
2012-09-18 18:53:32 +00:00
void onUntilHealedButtonClicked(MyGUI::Widget* sender);
void onWaitButtonClicked(MyGUI::Widget* sender);
void onCancelButtonClicked(MyGUI::Widget* sender);
void onHourSliderChangedPosition(MyGUI::ScrollBar* sender, size_t position);
void setCanRest(bool canRest);
void startWaiting();
void stopWaiting();
2012-09-18 16:29:03 +00:00
};
}
#endif