00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef ascmainscreenH
00027 #define ascmainscreenH
00028
00029 #include "paradialog.h"
00030 #include "util/messaginghub.h"
00031 #include "mainscreenwidget.h"
00032
00033 class Menu;
00034 class NewGuiHost;
00035 class MapDisplayPG;
00036 class DashboardPanel;
00037 class UnitWeaponRangeLayer;
00038 class UnitMovementRangeLayer;
00039 class GameMap;
00040 class MapCoordinate;
00041 class WindInfoPanel;
00042 class MapInfoPanel;
00043 class ActionInfoPanel;
00044
00045
00057 class ASC_MainScreenWidget : public MainScreenWidget {
00058 int standardActionsLocked;
00059 public:
00060 ASC_MainScreenWidget( PG_Application& application );
00061 enum Panels { ButtonPanel, WindInfo, UnitInfo, OverviewMap, MapControl, ActionInfo };
00062 void spawnPanel ( Panels panel );
00063
00065 bool spawnPanel ( const ASCString& panelName );
00066
00067 NewGuiHost* getGuiHost() { return guiHost; };
00068 DashboardPanel* getUnitInfoPanel() { return unitInfoPanel; };
00069
00070 void showMovementRange( GameMap* gamemap, const MapCoordinate& pos );
00071 void showWeaponRange( GameMap* gamemap, const MapCoordinate& pos );
00072
00073 ~ASC_MainScreenWidget() { };
00074 protected:
00075 NewGuiHost* guiHost;
00076 Menu* menu;
00077 DashboardPanel* unitInfoPanel;
00078 WindInfoPanel* windInfoPanel;
00079 MapInfoPanel* mapInfoPanel;
00080 ActionInfoPanel* actionInfoPanel;
00081
00082 UnitWeaponRangeLayer* weaponRangeLayer;
00083 UnitMovementRangeLayer* movementRangeLayer;
00084
00085 bool eventKeyDown(const SDL_KeyboardEvent* key);
00086 ASCString getBackgroundImageFilename() { return "gamebackground.png"; };
00087
00088 void lockStandardActions( int dir, int options);
00089
00090 list<int> lockOptionStack;
00091 private:
00092 void mapLayerChanged(bool b, const ASCString& name );
00093
00094 };
00095
00097 extern void displaymessage2( const char* formatstring, ... );
00098
00099 extern ASC_MainScreenWidget* mainScreenWidget ;
00100
00101 #endif
00102