00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef INJURIESDIALOG_HH_
00017 #define INJURIESDIALOG_HH_
00018
00019 #include "paragui.h"
00020 #include "pgwindow.h"
00021 #include "pgbutton.h"
00022 #include "pglabel.h"
00023 #include "pglineedit.h"
00024 #include "pgcheckbutton.h"
00025
00026 #include "../../common/Player.hh"
00027
00028 class DECLSPEC InjuriesDialog : public PG_Window
00029 {
00030 public:
00040 InjuriesDialog(PG_Widget* parent,
00041 const PG_Rect& r, const char* windowtitle,
00042 Player* player,
00043 const char* style="MessageBox");
00044
00045 virtual ~InjuriesDialog();
00046
00047 void LoadThemeStyle(const char* widgettype);
00048
00053 inline int WaitForClick() {
00054 return RunModal();
00055 }
00056
00057 bool getMissNextMatch();
00058 int getNigglingInjuries();
00059 int getMaReducted();
00060 int getAvReducted();
00061 int getAgReducted();
00062 int getStReducted();
00063
00064 private:
00065 template<typename T>
00066 std::string to_string( const T & Value );
00067
00071 bool handleButton(PG_Button* button);
00072 bool handleEditCharacteristicReducted(PG_LineEdit* edit);
00073
00074 void displayError(const char* msg);
00075 void Init(const char* style);
00076
00077
00078
00079
00080 PG_Widget* parent_;
00081
00082 Player* player_;
00083
00084 PG_Button* btnOk_;
00085 PG_Button* btnCancel_;
00086 PG_CheckButton* cbtnMissNextMatch_;
00087
00088 PG_Label* lblNigglingInjuries_;
00089 PG_Label* lblMaReducted_;
00090 PG_Label* lblAvReducted_;
00091 PG_Label* lblAgReducted_;
00092 PG_Label* lblStReducted_;
00093
00094 PG_LineEdit* leNigglingInjuries_;
00095 PG_LineEdit* leMaReducted_;
00096 PG_LineEdit* leAvReducted_;
00097 PG_LineEdit* leAgReducted_;
00098 PG_LineEdit* leStReducted_;
00099 };
00100
00101 #endif