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 tfield;
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, tfield* 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 public:
00078 UnitInfoPanel (PG_Widget *parent, const PG_Rect &r ) ;
00079 };
00080
00081
00082 class MapDisplayPG;
00083
00084 class MapInfoPanel : public DashboardPanel {
00085 MapDisplayPG* mapDisplay;
00086 PG_Slider* zoomSlider;
00087 bool changeActive;
00088
00089 void layerChanged( bool state, const ASCString& label );
00090 bool scrollTrack( long pos );
00091 bool checkBox( bool state, const char* name );
00092 void zoomChanged( int zoom );
00093
00094 bool showWeaponRange();
00095 bool showMovementRange();
00096 protected:
00097 void painter ( const PG_Rect &src, const ASCString& name, const PG_Rect &dst);
00098 public:
00099 MapInfoPanel (PG_Widget *parent, const PG_Rect &r, MapDisplayPG* mapDisplay ) ;
00100 };
00101
00102
00103 #endif