You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3mp/apps/openmw/mwgui/trainingwindow.hpp

59 lines
1.5 KiB
C++

12 years ago
#ifndef MWGUI_TRAININGWINDOW_H
#define MWGUI_TRAININGWINDOW_H
#include "windowbase.hpp"
12 years ago
#include "referenceinterface.hpp"
#include "timeadvancer.hpp"
#include "waitdialog.hpp"
12 years ago
namespace MWMechanics
{
class NpcStats;
}
12 years ago
namespace MWGui
{
class TrainingWindow : public WindowBase, public ReferenceInterface
{
public:
TrainingWindow();
12 years ago
void onOpen() override;
12 years ago
bool exit() override;
void setPtr(const MWWorld::Ptr& actor) override;
12 years ago
void onFrame(float dt) override;
12 years ago
WindowBase* getProgressBar() { return &mProgressBar; }
void clear() override { resetReference(); }
12 years ago
protected:
void onReferenceUnavailable() override;
12 years ago
void onCancelButtonClicked (MyGUI::Widget* sender);
void onTrainingSelected(MyGUI::Widget* sender);
void onTrainingProgressChanged(int cur, int total);
void onTrainingFinished();
// Retrieve the base skill value if the setting 'training skills based on base skill' is set;
// otherwise returns the modified skill
float getSkillForTraining(const MWMechanics::NpcStats& stats, int skillId) const;
12 years ago
MyGUI::Widget* mTrainingOptions;
MyGUI::Button* mCancelButton;
MyGUI::TextBox* mPlayerGold;
WaitDialogProgressBar mProgressBar;
TimeAdvancer mTimeAdvancer;
bool mTrainingSkillBasedOnBaseSkill; //corresponds to the setting 'training skills based on base skill'
12 years ago
};
}
#endif