00001 00005 /* 00006 This file is part of Advanced Strategic Command; http://www.asc-hq.de 00007 Copyright (C) 1994-1999 Martin Bickel and Marc Schellenberger 00008 00009 This program is free software; you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation; either version 2 of the License, or 00012 (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; see the file COPYING. If not, write to the 00021 Free Software Foundation, Inc., 59 Temple Place, Suite 330, 00022 Boston, MA 02111-1307 USA 00023 */ 00024 00025 00026 #ifndef ascmainscreenH 00027 #define ascmainscreenH 00028 00029 #include "paradialog.h" 00030 #include "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 00044 class ASC_MainScreenWidget : public MainScreenWidget { 00045 int standardActionsLocked; 00046 public: 00047 ASC_MainScreenWidget( PG_Application& application ); 00048 enum Panels { ButtonPanel, WindInfo, UnitInfo, OverviewMap, MapControl }; 00049 void spawnPanel ( Panels panel ); 00050 void spawnPanel ( const ASCString& panelName ); 00051 00052 NewGuiHost* getGuiHost() { return guiHost; }; 00053 DashboardPanel* getUnitInfoPanel() { return unitInfoPanel; }; 00054 00055 void showMovementRange( GameMap* gamemap, const MapCoordinate& pos ); 00056 void showWeaponRange( GameMap* gamemap, const MapCoordinate& pos ); 00057 00058 ~ASC_MainScreenWidget() { }; 00059 protected: 00060 NewGuiHost* guiHost; 00061 Menu* menu; 00062 DashboardPanel* unitInfoPanel; 00063 WindInfoPanel* windInfoPanel; 00064 MapInfoPanel* mapInfoPanel; 00065 00066 UnitWeaponRangeLayer* weaponRangeLayer; 00067 UnitMovementRangeLayer* movementRangeLayer; 00068 00069 bool eventKeyDown(const SDL_KeyboardEvent* key); 00070 ASCString getBackgroundImageFilename() { return "gamebackground.png"; }; 00071 00072 void lockStandardActions( int dir, int options); 00073 00074 list<int> lockOptionStack; 00075 private: 00076 void mapLayerChanged(bool b, const ASCString& name ); 00077 00078 }; 00079 00081 extern void displaymessage2( const char* formatstring, ... ); 00082 00083 extern ASC_MainScreenWidget* mainScreenWidget ; 00084 00085 #endif 00086
1.4.2