00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef BBOWLWIDGET_HH_
00017 #define BBOWLWIDGET_HH_
00018
00019 #include "pgthemewidget.h"
00020 #include "pglabel.h"
00021 #include "pglineedit.h"
00022 #include "pglistbox.h"
00023 #include "pgimage.h"
00024 #include "pgbutton.h"
00025
00026 #include "TeamrosterApp.hh"
00027 #include "PlayerLineWidget.hh"
00028 #include "../../common/Team.hh"
00029
00030 class BBowlWidget : public PG_ThemeWidget
00031 {
00032 public:
00033
00034
00035
00036 BBowlWidget(TeamrosterApp *app, PG_Widget *parent,PG_Rect rect);
00037 virtual ~BBowlWidget();
00038
00039 void updateView();
00040
00041 private:
00042 void displayError(const char* msg);
00043 void displayMessage(const char* title, const char* msg);
00044
00045
00046
00047
00048 bool handleSelectItemRace(PG_ListBoxBaseItem* item);
00049
00050 bool handleEditName(PG_LineEdit* edit);
00051 bool handleEditBank(PG_LineEdit* edit);
00052 bool handleEditHeadCoach(PG_LineEdit* edit);
00053
00054 bool handleEditApothecary(PG_LineEdit* edit);
00055 bool handleEditReroll(PG_LineEdit* edit);
00056 bool handleEditFanFactor(PG_LineEdit* edit);
00057 bool handleEditAssistantCoach(PG_LineEdit* edit);
00058 bool handleEditCheerleader(PG_LineEdit* edit);
00059 bool handleButtonSaveClick(PG_Button* button);
00060 bool handleButtonLoadClick(PG_Button* button);
00061 bool handleButtonQuitClick(PG_Button* button);
00062 bool handleButtonBackgroundClick(PG_Button* button);
00063
00064
00065
00066
00067 Team* team_;
00068
00069 PlayerLineWidget* playerWidget_[16];
00070
00071 PG_Application* app_;
00072 PG_Image* raceImg_;
00073 PG_LineEdit* teamName_;
00074 PG_ListBox* race_;
00075 PG_LineEdit* bank_;
00076 PG_LineEdit* headCoach_;
00077 PG_LineEdit* reroll_;
00078 PG_Label* rerollCost_;
00079 PG_Label* rerollTotalCost_;
00080 PG_LineEdit* fanFactor_;
00081 PG_LineEdit* assistantCoach_;
00082 PG_LineEdit* cheerleader_;
00083 PG_LineEdit* apothecary_;
00084 PG_Label* fanFactorCost_;
00085 PG_Label* assistantCoachCost_;
00086 PG_Label* cheerleaderCost_;
00087 PG_Label* apothecaryCost_;
00088 PG_Label* totalTeamValueCost_;
00089
00090 PG_Button* backgroundBtn_;
00091 PG_Button* loadBtn_;
00092 PG_Button* saveBtn_;
00093 PG_Button* quitBtn_;
00094 };
00095
00096 #endif