00001
00002
00003
00004
00005
00006
00007
00008
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef dashboardH
00026 #define dashboardH
00027
00028 #include "paradialog.h"
00029 #include "windowing.h"
00030
00031 class ContainerBase;
00032 class VehicleType;
00033 class Vehicle;
00034 class Building;
00035 class SingleWeapon;
00036 class MapDisplay;
00037 class GameMap;
00038 class MapField;
00039
00040 class DashboardPanel : public LayoutablePanel {
00041 private:
00042 void containerDeleted( ContainerBase* c );
00043 protected:
00044 Vehicle* veh;
00045 Building* bld;
00046
00047 DashboardPanel ( PG_Widget *parent, const PG_Rect &r, const ASCString& panelName_, bool loadTheme );
00048
00049 void painter ( const PG_Rect &src, const ASCString& name, const PG_Rect &dst);
00050 void registerSpecialDisplay( const ASCString& name );
00051
00052 void reset(GameMap& map);
00053
00054 bool containerRenamed( PG_LineEdit* lineEdit );
00055
00056 bool viewExperienceOverview();
00057
00058 public:
00059 void eval();
00060 void showUnitData( Vehicle* veh, Building* bld, MapField* fld, bool redraw = false );
00061
00062 };
00063
00064 class WindInfoPanel : public DashboardPanel {
00065 Surface windArrow;
00066 int dir;
00067 protected:
00068 void painter ( const PG_Rect &src, const ASCString& name, const PG_Rect &dst);
00069 public:
00070 WindInfoPanel (PG_Widget *parent, const PG_Rect &r ) ;
00071 };
00072
00073 class UnitInfoPanel : public DashboardPanel {
00074 protected:
00075 bool onClick ( PG_MessageObject* obj, const SDL_MouseButtonEvent* event );
00076 void showUnitInfo( const VehicleType* vt );
00077 bool unitNaming();
00078 public:
00079 UnitInfoPanel (PG_Widget *parent, const PG_Rect &r ) ;
00080 };
00081
00082
00083 class MapDisplayPG;
00084
00085 class MapInfoPanel : public DashboardPanel {
00086 MapDisplayPG* mapDisplay;
00087 PG_Slider* zoomSlider;
00088 bool changeActive;
00089
00090 void layerChanged( bool state, const ASCString& label );
00091 bool scrollTrack( long pos );
00092 bool checkBox( bool state, const char* name );
00093 void zoomChanged( int zoom );
00094
00095 bool showWeaponRange();
00096 bool showMovementRange();
00097 protected:
00098 void painter ( const PG_Rect &src, const ASCString& name, const PG_Rect &dst);
00099 public:
00100 MapInfoPanel (PG_Widget *parent, const PG_Rect &r, MapDisplayPG* mapDisplay ) ;
00101 };
00102
00103
00104 class ActionInfoPanel : public DashboardPanel {
00105 public:
00106 ActionInfoPanel (PG_Widget *parent, const PG_Rect &r ) ;
00107
00108 void update( GameMap* map );
00109 };
00110
00111 #endif