ControlBar.h 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010
  1. /*
  2. ** Command & Conquer Generals(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. ////////////////////////////////////////////////////////////////////////////////
  19. // //
  20. // (c) 2001-2003 Electronic Arts Inc. //
  21. // //
  22. ////////////////////////////////////////////////////////////////////////////////
  23. // FILE: ControlBar.h /////////////////////////////////////////////////////////////////////////////
  24. // Author: Colin Day, March 2002
  25. // Desc: Context sensitive command interface
  26. ///////////////////////////////////////////////////////////////////////////////////////////////////
  27. #pragma once
  28. #ifndef __CONTROLBAR_H_
  29. #define __CONTROLBAR_H_
  30. // USER INCLUDES //////////////////////////////////////////////////////////////////////////////////
  31. #include "Common/AudioEventRTS.h"
  32. #include "Common/GameType.h"
  33. #include "Common/Overridable.h"
  34. #include "Common/Science.h"
  35. #include "GameClient/Color.h"
  36. // FORWARD REFERENCES /////////////////////////////////////////////////////////////////////////////
  37. class Drawable;
  38. class GameWindow;
  39. class Image;
  40. class Object;
  41. class ThingTemplate;
  42. class WeaponTemplate;
  43. class SpecialPowerTemplate;
  44. class WindowVideoManager;
  45. class WindowVideoManager;
  46. class AnimateWindowManager;
  47. class GameWindow;
  48. class WindowLayout;
  49. class Player;
  50. class PlayerTemplate;
  51. class AudioEventRTS;
  52. class ControlBarSchemeManager;
  53. class UpgradeTemplate;
  54. class ControlBarResizer;
  55. class GameWindowTransitionsHandler;
  56. enum ProductionID;
  57. enum CommandSourceType;
  58. enum ProductionType;
  59. enum GadgetGameMessage;
  60. enum ScienceType;
  61. enum TimeOfDay;
  62. enum RadiusCursorType;
  63. //-------------------------------------------------------------------------------------------------
  64. /** Command options */
  65. //-------------------------------------------------------------------------------------------------
  66. enum CommandOption
  67. {
  68. COMMAND_OPTION_NONE = 0x00000000,
  69. NEED_TARGET_ENEMY_OBJECT = 0x00000001, // command now needs user to select enemy target
  70. NEED_TARGET_NEUTRAL_OBJECT = 0x00000002, // command now needs user to select neutral target
  71. NEED_TARGET_ALLY_OBJECT = 0x00000004, // command now needs user to select ally target
  72. #ifdef ALLOW_SURRENDER
  73. NEED_TARGET_PRISONER = 0x00000008, // needs user to now select prisoner object
  74. #endif
  75. ALLOW_SHRUBBERY_TARGET = 0x00000010, // allow neutral shrubbery as a target
  76. NEED_TARGET_POS = 0x00000020, // command now needs user to select target position
  77. NEED_UPGRADE = 0x00000040, // command requires upgrade to be enabled
  78. NEED_SPECIAL_POWER_SCIENCE = 0x00000080, // command requires a science in the special power specified
  79. OK_FOR_MULTI_SELECT = 0x00000100, // command is ok to show when multiple objects selected
  80. CONTEXTMODE_COMMAND = 0x00000200, // a context sensitive command mode that requires code to determine whether cursor is valid or not.
  81. CHECK_LIKE = 0x00000400, // dynamically change the UI element push button to be "check like"
  82. ALLOW_MINE_TARGET = 0x00000800, // allow (land)mines as a target
  83. ATTACK_OBJECTS_POSITION = 0x00001000, // for weapons that need an object target but attack the position indirectly (like burning trees)
  84. OPTION_ONE = 0x00002000, // User data -- option 1
  85. OPTION_TWO = 0x00004000, // User data -- option 2
  86. OPTION_THREE = 0x00008000, // User data -- option 3
  87. NOT_QUEUEABLE = 0x00010000, // Option not build queueable meaning you can only build it when queue is empty!
  88. SINGLE_USE_COMMAND = 0x00020000, // Once used, it can never be used again!
  89. COMMAND_FIRED_BY_SCRIPT = 0x00040000, // Used only by code to tell special powers that they have been fired by a script.
  90. SCRIPT_ONLY = 0x00080000, // Only a script can use this command (not by users)
  91. IGNORES_UNDERPOWERED = 0x00100000, // this button isn't disabled if its object is merely underpowered
  92. USES_MINE_CLEARING_WEAPONSET= 0x00200000, // uses the special mine-clearing weaponset, even if not current
  93. NUM_COMMAND_OPTIONS // keep this last
  94. };
  95. #ifdef DEFINE_COMMAND_OPTION_NAMES
  96. static const char *TheCommandOptionNames[] =
  97. {
  98. "NEED_TARGET_ENEMY_OBJECT",
  99. "NEED_TARGET_NEUTRAL_OBJECT",
  100. "NEED_TARGET_ALLY_OBJECT",
  101. #ifdef ALLOW_SURRENDER
  102. "NEED_TARGET_PRISONER",
  103. #else
  104. "unused-reserved",
  105. #endif
  106. "ALLOW_SHRUBBERY_TARGET",
  107. "NEED_TARGET_POS",
  108. "NEED_UPGRADE",
  109. "NEED_SPECIAL_POWER_SCIENCE",
  110. "OK_FOR_MULTI_SELECT",
  111. "CONTEXTMODE_COMMAND",
  112. "CHECK_LIKE",
  113. "ALLOW_MINE_TARGET",
  114. "ATTACK_OBJECTS_POSITION",
  115. "OPTION_ONE",
  116. "OPTION_TWO",
  117. "OPTION_THREE",
  118. "NOT_QUEUEABLE",
  119. "SINGLE_USE_COMMAND",
  120. "---DO-NOT-USE---", //COMMAND_FIRED_BY_SCRIPT
  121. "SCRIPT_ONLY",
  122. "IGNORES_UNDERPOWERED",
  123. "USES_MINE_CLEARING_WEAPONSET",
  124. NULL
  125. };
  126. #endif // end DEFINE_COMMAND_OPTION_NAMES
  127. // convenient bit masks to group some command options together
  128. const UnsignedInt COMMAND_OPTION_NEED_TARGET =
  129. NEED_TARGET_ENEMY_OBJECT |
  130. NEED_TARGET_NEUTRAL_OBJECT |
  131. NEED_TARGET_ALLY_OBJECT |
  132. NEED_TARGET_POS |
  133. CONTEXTMODE_COMMAND;
  134. const UnsignedInt COMMAND_OPTION_NEED_OBJECT_TARGET =
  135. NEED_TARGET_ENEMY_OBJECT |
  136. NEED_TARGET_NEUTRAL_OBJECT |
  137. NEED_TARGET_ALLY_OBJECT;
  138. //-------------------------------------------------------------------------------------------------
  139. /** These are the list of commands that can be assigned to buttons that will appear
  140. * in the context sensitive GUI for a selected unit. Not all commands are available
  141. * on all units, in fact, many commands are for a particular single command. It will
  142. * be up to the command GUI to translate the command assigned to a button into the
  143. * appropriate game command and get it across the network to the game logic to perform the
  144. * actual command logic
  145. *
  146. * IMPORTANT: Make sure the GUICommandType enum and the TheGuiCommandNames[] have the same
  147. * entries in the same order */
  148. //-------------------------------------------------------------------------------------------------
  149. enum GUICommandType
  150. {
  151. GUI_COMMAND_NONE = 0, ///< invalid command
  152. GUI_COMMAND_DOZER_CONSTRUCT, ///< dozer construct
  153. GUI_COMMAND_DOZER_CONSTRUCT_CANCEL, ///< cancel a dozer construction process
  154. GUI_COMMAND_UNIT_BUILD, ///< build a unit
  155. GUI_COMMAND_CANCEL_UNIT_BUILD, ///< cancel a unit build
  156. GUI_COMMAND_PLAYER_UPGRADE, ///< put an upgrade that applies to the player in the queue
  157. GUI_COMMAND_OBJECT_UPGRADE, ///< put an object upgrade in the queue
  158. GUI_COMMAND_CANCEL_UPGRADE, ///< cancel an upgrade
  159. GUI_COMMAND_ATTACK_MOVE, ///< attack move command
  160. GUI_COMMAND_GUARD, ///< guard command
  161. GUI_COMMAND_GUARD_WITHOUT_PURSUIT, ///< guard command, no pursuit out of guard area
  162. GUI_COMMAND_GUARD_FLYING_UNITS_ONLY, ///< guard command, ignore nonflyers
  163. GUI_COMMAND_STOP, ///< stop moving
  164. GUI_COMMAND_WAYPOINTS, ///< create a set of waypoints for this unit
  165. GUI_COMMAND_EXIT_CONTAINER, ///< an inventory box for a container like a structure or transport
  166. GUI_COMMAND_EVACUATE, ///< dump all our contents
  167. GUI_COMMAND_EXECUTE_RAILED_TRANSPORT, ///< execute railed transport sequence
  168. GUI_COMMAND_BEACON_DELETE, ///< delete a beacon
  169. GUI_COMMAND_SET_RALLY_POINT, ///< set rally point for a structure
  170. GUI_COMMAND_SELL, ///< sell a structure
  171. GUI_COMMAND_FIRE_WEAPON, ///< fire a weapon
  172. GUI_COMMAND_SPECIAL_POWER, ///< do a special power
  173. GUI_COMMAND_PURCHASE_SCIENCE, ///< purchase science
  174. GUI_COMMAND_HACK_INTERNET, ///< Hey author, write me!
  175. GUI_COMMAND_TOGGLE_OVERCHARGE, ///< Overcharge command for power plants
  176. #ifdef ALLOW_SURRENDER
  177. GUI_COMMAND_POW_RETURN_TO_PRISON, ///< POW Truck, return to prison
  178. #endif
  179. GUI_COMMAND_COMBATDROP, ///< rappel contents to ground or bldg
  180. GUI_COMMAND_SWITCH_WEAPON, ///< switch weapon use
  181. //Context senstive command modes
  182. GUICOMMANDMODE_HIJACK_VEHICLE,
  183. GUICOMMANDMODE_CONVERT_TO_CARBOMB,
  184. #ifdef ALLOW_SURRENDER
  185. GUICOMMANDMODE_PICK_UP_PRISONER, ///< POW Truck assigned to pick up a specific prisoner
  186. #endif
  187. // context-insensitive command mode(s)
  188. GUICOMMANDMODE_PLACE_BEACON,
  189. GUI_COMMAND_SPECIAL_POWER_FROM_COMMAND_CENTER, ///< do a special power from localPlayer's command center, regardless of selection
  190. // add more commands here, don't forget to update the string command list below too ...
  191. GUI_COMMAND_NUM_COMMANDS // keep this last
  192. };
  193. #ifdef DEFINE_GUI_COMMMAND_NAMES
  194. static const char *TheGuiCommandNames[] =
  195. {
  196. "NONE",
  197. "DOZER_CONSTRUCT",
  198. "DOZER_CONSTRUCT_CANCEL",
  199. "UNIT_BUILD",
  200. "CANCEL_UNIT_BUILD",
  201. "PLAYER_UPGRADE",
  202. "OBJECT_UPGRADE",
  203. "CANCEL_UPGRADE",
  204. "ATTACK_MOVE",
  205. "GUARD",
  206. "GUARD_WITHOUT_PURSUIT",
  207. "GUARD_FLYING_UNITS_ONLY",
  208. "STOP",
  209. "WAYPOINTS",
  210. "EXIT_CONTAINER",
  211. "EVACUATE",
  212. "EXECUTE_RAILED_TRANSPORT",
  213. "BEACON_DELETE",
  214. "SET_RALLY_POINT",
  215. "SELL",
  216. "FIRE_WEAPON",
  217. "SPECIAL_POWER",
  218. "PURCHASE_SCIENCE",
  219. "HACK_INTERNET",
  220. "TOGGLE_OVERCHARGE",
  221. #ifdef ALLOW_SURRENDER
  222. "POW_RETURN_TO_PRISON",
  223. #endif
  224. "COMBATDROP",
  225. "SWITCH_WEAPON",
  226. "HIJACK_VEHICLE",
  227. "CONVERT_TO_CARBOMB",
  228. #ifdef ALLOW_SURRENDER
  229. "PICK_UP_PRISONER",
  230. #endif
  231. "PLACE_BEACON",
  232. "SPECIAL_POWER_FROM_COMMAND_CENTER",
  233. NULL
  234. };
  235. #endif // end DEFINE_GUI_COMMAND_NAMES
  236. enum CommandButtonMappedBorderType
  237. {
  238. COMMAND_BUTTON_BORDER_NONE = 0,
  239. COMMAND_BUTTON_BORDER_BUILD,
  240. COMMAND_BUTTON_BORDER_UPGRADE,
  241. COMMAND_BUTTON_BORDER_ACTION,
  242. COMMAND_BUTTON_BORDER_SYSTEM,
  243. COMMAND_BUTTON_BORDER_COUNT // keep this last
  244. };
  245. static const LookupListRec CommandButtonMappedBorderTypeNames[] =
  246. {
  247. { "NONE", COMMAND_BUTTON_BORDER_NONE },
  248. { "BUILD", COMMAND_BUTTON_BORDER_BUILD },
  249. { "UPGRADE", COMMAND_BUTTON_BORDER_UPGRADE },
  250. { "ACTION", COMMAND_BUTTON_BORDER_ACTION },
  251. { "SYSTEM", COMMAND_BUTTON_BORDER_SYSTEM },
  252. { NULL, 0 }// keep this last!
  253. };
  254. //-------------------------------------------------------------------------------------------------
  255. /** Command buttons are used to load the buttons we place on throughout the command bar
  256. * interface in different context sensitive windows depending on the situation and
  257. * type of the object selected */
  258. //-------------------------------------------------------------------------------------------------
  259. class CommandButton : public Overridable
  260. {
  261. MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( CommandButton, "CommandButton" );
  262. public:
  263. CommandButton( void );
  264. // virtual destructor prototype provided by MemoryPoolObject
  265. /// INI parsing
  266. const FieldParse *getFieldParse() const { return s_commandButtonFieldParseTable; }
  267. static const FieldParse s_commandButtonFieldParseTable[]; ///< the parse table
  268. static void parseCommand( INI* ini, void *instance, void *store, const void *userData );
  269. Bool isContextCommand() const; ///< determines if this is a context sensitive command.
  270. Bool isValidRelationshipTarget(Relationship r) const;
  271. Bool isValidObjectTarget(const Player* sourcePlayer, const Object* targetObj) const;
  272. Bool isValidObjectTarget(const Object* sourceObj, const Object* targetObj) const;
  273. Bool isValidObjectTarget(const Drawable* source, const Drawable* target) const;
  274. // Note: It is perfectly valid for either (or both!) of targetObj and targetLocation to be NULL.
  275. // This is a convenience function to make several calls to other functions.
  276. Bool isValidToUseOn(const Object *sourceObj, const Object *targetObj, const Coord3D *targetLocation, CommandSourceType commandSource) const;
  277. Bool isReady(const Object *sourceObj) const;
  278. const AsciiString& getName() const { return m_name; }
  279. const AsciiString& getCursorName() const { return m_cursorName; }
  280. const AsciiString& getInvalidCursorName() const { return m_invalidCursorName; }
  281. const AsciiString& getTextLabel() const { return m_textLabel; }
  282. const AsciiString& getDescriptionLabel() const { return m_descriptionLabel; }
  283. const AsciiString& getPurchasedLabel() const { return m_purchasedLabel; }
  284. const AsciiString& getConflictingLabel() const { return m_conflictingLabel; }
  285. const AudioEventRTS* getUnitSpecificSound() const { return &m_unitSpecificSound; }
  286. GUICommandType getCommandType() const { return m_command; }
  287. UnsignedInt getOptions() const { return m_options; }
  288. OVERRIDE<ThingTemplate> getThingTemplate() const { return m_thingTemplate; }
  289. const UpgradeTemplate* getUpgradeTemplate() const { return m_upgradeTemplate; }
  290. const SpecialPowerTemplate* getSpecialPowerTemplate() const { return m_specialPower; }
  291. RadiusCursorType getRadiusCursorType() const { return m_radiusCursor; }
  292. WeaponSlotType getWeaponSlot() const { return m_weaponSlot; }
  293. Int getMaxShotsToFire() const { return m_maxShotsToFire; }
  294. const ScienceVec& getScienceVec() const { return m_science; }
  295. CommandButtonMappedBorderType getCommandButtonMappedBorderType() const { return m_commandButtonBorder; }
  296. const Image* getButtonImage() const { return m_buttonImage; }
  297. void cacheButtonImage();
  298. GameWindow* getWindow() const { return m_window; }
  299. Int getFlashCount() const { return m_flashCount; }
  300. const CommandButton* getNext() const { return m_next; }
  301. void setName(const AsciiString& n) { m_name = n; }
  302. void setButtonImage( const Image *image ) { m_buttonImage = image; }
  303. // bleah. shouldn't be const, but is. sue me. (srj)
  304. void copyImagesFrom( const CommandButton *button, Bool markUIDirtyIfChanged ) const;
  305. // bleah. shouldn't be const, but is. sue me. (srj)
  306. void setFlashCount(Int c) const { m_flashCount = c; }
  307. // only for ControlBar!
  308. void friend_addToList(CommandButton** list) { m_next = *list; *list = this; }
  309. CommandButton* friend_getNext() { return m_next; }
  310. private:
  311. AsciiString m_name; ///< template name
  312. GUICommandType m_command; ///< type of command this button
  313. CommandButton* m_next;
  314. UnsignedInt m_options; ///< command options (see CommandOption enum)
  315. const ThingTemplate* m_thingTemplate; ///< for commands that use thing templates in command data
  316. const UpgradeTemplate* m_upgradeTemplate; ///< for commands that use upgrade templates in command data
  317. const SpecialPowerTemplate* m_specialPower; ///< actual special power template
  318. RadiusCursorType m_radiusCursor; ///< radius cursor, if any
  319. AsciiString m_cursorName; ///< cursor name for placement (NEED_TARGET_POS) or valid version (CONTEXTMODE_COMMAND)
  320. AsciiString m_invalidCursorName; ///< cursor name for invalid version
  321. AsciiString m_textLabel; ///< string manager text label
  322. AsciiString m_descriptionLabel; ///< The description of the current command, read in from the ini
  323. AsciiString m_purchasedLabel; ///< Description for the current command if it has already been purchased.
  324. AsciiString m_conflictingLabel; ///< Description for the current command if it can't be selected due to multually-exclusive choice.
  325. WeaponSlotType m_weaponSlot; ///< for commands that refer to a weapon slot
  326. Int m_maxShotsToFire; ///< for commands that fire weapons
  327. ScienceVec m_science; ///< actual science
  328. CommandButtonMappedBorderType m_commandButtonBorder;
  329. AsciiString m_buttonImageName;
  330. GameWindow* m_window; ///< used during the run-time assignment of a button to a gadget button window
  331. AudioEventRTS m_unitSpecificSound; ///< Unit sound played whenever button is clicked.
  332. // bleah. shouldn't be mutable, but is. sue me. (srj)
  333. mutable const Image* m_buttonImage; ///< button image
  334. // bleah. shouldn't be mutable, but is. sue me. (srj)
  335. mutable Int m_flashCount; ///< the number of times a cameo is supposed to flash
  336. };
  337. //-------------------------------------------------------------------------------------------------
  338. /** Command sets are collections of configurable command buttons. They are used in the
  339. * command context sensitive window in the battle user interface */
  340. //-------------------------------------------------------------------------------------------------
  341. enum { MAX_COMMANDS_PER_SET = 12 }; // user interface max button limit for commands
  342. enum { MAX_RIGHT_HUD_UPGRADE_CAMEOS = 5};
  343. enum {
  344. MAX_PURCHASE_SCIENCE_RANK_1 = 3,
  345. MAX_PURCHASE_SCIENCE_RANK_3 = 12,
  346. MAX_PURCHASE_SCIENCE_RANK_8 = 1,
  347. };
  348. enum { MAX_STRUCTURE_INVENTORY_BUTTONS = 10 }; // there are this many physical buttons in "inventory" windows for structures
  349. enum { MAX_BUILD_QUEUE_BUTTONS = 9 };// physical button count for the build queue
  350. enum { MAX_SPECIAL_POWER_SHORTCUTS = 5};
  351. class CommandSet : public Overridable
  352. {
  353. MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE( CommandSet, "CommandSet" )
  354. public:
  355. CommandSet( const AsciiString& name );
  356. // virtual destructor prototype provided by MemoryPoolObject
  357. const AsciiString& getName() const { return m_name; }
  358. const CommandButton* getCommandButton(Int i) const;
  359. // only for the control bar.
  360. CommandSet* friend_getNext() { return m_next; }
  361. const FieldParse* friend_getFieldParse() const { return m_commandSetFieldParseTable; }
  362. void friend_addToList(CommandSet** listHead);
  363. private:
  364. static const FieldParse m_commandSetFieldParseTable[]; ///< the parse table
  365. static void parseCommandButton( INI* ini, void *instance, void *store, const void *userData );
  366. AsciiString m_name; ///< name of this command set
  367. const CommandButton *m_command[ MAX_COMMANDS_PER_SET ]; ///< the set of command buttons that make this set
  368. CommandSet *m_next;
  369. };
  370. //-------------------------------------------------------------------------------------------------
  371. /** The Side selece window data is used to animate on the proper generals select */
  372. //-------------------------------------------------------------------------------------------------
  373. class SideSelectWindowData
  374. {
  375. public:
  376. SideSelectWindowData(void)
  377. {
  378. //Added By Sadullah Nader
  379. //Initializations
  380. generalSpeak = NULL;
  381. m_currColor = 0;
  382. m_gereralsNameWin = NULL;
  383. m_lastTime = 0;
  384. m_pTemplate = NULL;
  385. m_sideNameWin = NULL;
  386. m_startTime = 0;
  387. m_state = 0;
  388. m_upgradeImage1 = NULL;
  389. m_upgradeImage1Win = NULL;
  390. m_upgradeImage2 = NULL;
  391. m_upgradeImage2Win = NULL;
  392. m_upgradeImage3 = NULL;
  393. m_upgradeImage3Win = NULL;
  394. m_upgradeImage4 = NULL;
  395. m_upgradeImage4Win = NULL;
  396. m_upgradeImageSize.x = m_upgradeImageSize.y = 0;
  397. m_upgradeLabel1Win = NULL;
  398. m_upgradeLabel2Win = NULL;
  399. m_upgradeLabel3Win = NULL;
  400. m_upgradeLabel4Win = NULL;
  401. sideWindow = NULL;
  402. //
  403. }
  404. ~SideSelectWindowData(void);
  405. void init( ScienceType science, GameWindow *control );
  406. void reset( void );
  407. void update( void );
  408. void draw( void );
  409. GameWindow *sideWindow;
  410. GameWindow *m_animWindowWin;
  411. AudioEventRTS *generalSpeak;
  412. private:
  413. enum
  414. {
  415. STATE_NONE = 0,
  416. STATE_1,
  417. STATE_2,
  418. STATE_3,
  419. STATE_4,
  420. STATE_5,
  421. STATE_6
  422. };
  423. const PlayerTemplate *m_pTemplate;
  424. GameWindow *m_gereralsNameWin;
  425. GameWindow *m_sideNameWin;
  426. GameWindow *m_upgradeLabel1Win;
  427. GameWindow *m_upgradeLabel2Win;
  428. GameWindow *m_upgradeLabel3Win;
  429. GameWindow *m_upgradeLabel4Win;
  430. GameWindow *m_upgradeImage1Win;
  431. GameWindow *m_upgradeImage2Win;
  432. GameWindow *m_upgradeImage3Win;
  433. GameWindow *m_upgradeImage4Win;
  434. Image *m_upgradeImage1;
  435. Image *m_upgradeImage2;
  436. Image *m_upgradeImage3;
  437. Image *m_upgradeImage4;
  438. IRegion2D m_leftLineFromButton;
  439. IRegion2D m_rightLineFromButton;
  440. IRegion2D m_upgradeLine1a;
  441. IRegion2D m_upgradeLine2a;
  442. IRegion2D m_upgradeLine3a;
  443. IRegion2D m_upgradeLine4a;
  444. IRegion2D m_upgradeLine1;
  445. IRegion2D m_upgradeLine2;
  446. IRegion2D m_upgradeLine3;
  447. IRegion2D m_upgradeLine4;
  448. IRegion2D m_upgradeLine1MidReg;
  449. IRegion2D m_upgradeLine2MidReg;
  450. IRegion2D m_upgradeLine3MidReg;
  451. IRegion2D m_upgradeLine4MidReg;
  452. IRegion2D m_upgrade1Clip;
  453. IRegion2D m_upgrade2Clip;
  454. IRegion2D m_upgrade3Clip;
  455. IRegion2D m_upgrade4Clip;
  456. Color m_currColor;
  457. ICoord2D m_line1End;
  458. ICoord2D m_line2End;
  459. ICoord2D m_upgradeLine1Mid;
  460. ICoord2D m_upgradeLine2Mid;
  461. ICoord2D m_upgradeLine3Mid;
  462. ICoord2D m_upgradeLine4Mid;
  463. ICoord2D m_upgradeLine1End;
  464. ICoord2D m_upgradeLine2End;
  465. ICoord2D m_upgradeLine3End;
  466. ICoord2D m_upgradeLine4End;
  467. ICoord2D m_upgradeImagePos1;
  468. ICoord2D m_upgradeImagePos2;
  469. ICoord2D m_upgradeImagePos3;
  470. ICoord2D m_upgradeImagePos4;
  471. ICoord2D m_upgradeImageSize;
  472. Int m_state;
  473. UnsignedInt m_lastTime;
  474. UnsignedInt m_startTime;
  475. };
  476. //-------------------------------------------------------------------------------------------------
  477. /** A command bar context is a window or set of windows that make up a context sensitive
  478. * display of commands and information to the user based on what objects are selected
  479. * and their capabilities */
  480. //-------------------------------------------------------------------------------------------------
  481. enum ControlBarContext
  482. {
  483. CB_CONTEXT_NONE, ///< default view for center bar and portrait window
  484. // CB_CONTEXT_PURCHASE_SCIENCE,
  485. CB_CONTEXT_COMMAND, ///< set of commands (attack-move,stop,deploy etc)
  486. CB_CONTEXT_STRUCTURE_INVENTORY, ///< garrisonable building inventory interface
  487. CB_CONTEXT_BEACON, ///< beacon interface
  488. CB_CONTEXT_UNDER_CONSTRUCTION, ///< building under construction
  489. CB_CONTEXT_MULTI_SELECT, ///< for when we have multiple objects selected
  490. CB_CONTEXT_OBSERVER_INFO, ///< for when we want to populate the player info
  491. CB_CONTEXT_OBSERVER_LIST, ///< for when we want to update the observer list
  492. CB_CONTEXT_OCL_TIMER, ///< Countdown for OCL spewers
  493. NUM_CB_CONTEXTS
  494. };
  495. //-------------------------------------------------------------------------------------------------
  496. /** Context parents, are parent windows in the control bar interface that are the key
  497. * parts we care about to make the whole interface a context sensitive one. We will
  498. * hide and un-hide these windows and their interface controls in order to make
  499. * the control bar context sensitive to the object that is selected */
  500. //-------------------------------------------------------------------------------------------------
  501. enum ContextParent
  502. {
  503. CP_MASTER, ///< *The* control bar window as a whole
  504. CP_PURCHASE_SCIENCE,
  505. CP_COMMAND, ///< configurable command buttons parent
  506. CP_BUILD_QUEUE, ///< build queue parent
  507. CP_BEACON, ///< beacon parent
  508. CP_UNDER_CONSTRUCTION, ///< building under construction parent
  509. CP_OBSERVER_INFO, ///< Observer Info window parent
  510. CP_OBSERVER_LIST, ///< Observer player list parent
  511. CP_OCL_TIMER, ///< Countdown for OCL spewers
  512. NUM_CONTEXT_PARENTS
  513. };
  514. //-------------------------------------------------------------------------------------------------
  515. //-------------------------------------------------------------------------------------------------
  516. enum CBCommandStatus
  517. {
  518. CBC_COMMAND_NOT_USED = 0, ///< gui control message was *not* used
  519. CBC_COMMAND_USED ///< gui control message was used
  520. };
  521. // ------------------------------------------------------------------------------------------------
  522. /** Command availability is used during the context update so that we can set the
  523. * GUI button to be enabled/disabled/checked/unchecked to represent the current
  524. * state of that command availability */
  525. // ------------------------------------------------------------------------------------------------
  526. enum CommandAvailability
  527. {
  528. COMMAND_RESTRICTED,
  529. COMMAND_AVAILABLE,
  530. COMMAND_ACTIVE,
  531. COMMAND_HIDDEN,
  532. COMMAND_NOT_READY,
  533. COMMAND_CANT_AFFORD,
  534. };
  535. enum ControlBarStages
  536. {
  537. CONTROL_BAR_STAGE_DEFAULT = 0, ///< full view for the world to see
  538. CONTROL_BAR_STAGE_SQUISHED, ///< squished just for expeirenced players
  539. CONTROL_BAR_STAGE_LOW, ///< control bar a la minimalist
  540. CONTROL_BAR_STAGE_HIDDEN, ///< yo, where be da control bar at?
  541. MAX_CONTROL_BAR_STAGES
  542. };
  543. //-------------------------------------------------------------------------------------------------
  544. //-------------------------------------------------------------------------------------------------
  545. class ControlBar : public SubsystemInterface
  546. {
  547. public:
  548. ControlBar( void );
  549. virtual ~ControlBar( void );
  550. virtual void init( void ); ///< from subsystem interface
  551. virtual void reset( void ); ///< from subsystem interface
  552. virtual void update( void ); ///< from subsystem interface
  553. /// mark the UI as dirty so the context of everything is re-evaluated
  554. void markUIDirty( void ) { m_UIDirty = TRUE; }
  555. /// a drawable has just become selected
  556. void onDrawableSelected( Drawable *draw );
  557. /// a drawable has just become de-selected
  558. void onDrawableDeselected( Drawable *draw );
  559. void onPlayerRankChanged(const Player *p);
  560. void onPlayerSciencePurchasePointsChanged(const Player *p);
  561. /** if this button is part of the context sensitive command system, process a button click
  562. the gadgetMessage is either a GBM_SELECTED or GBM_SELECTED_RIGHT */
  563. CBCommandStatus processContextSensitiveButtonClick( GameWindow *button,
  564. GadgetGameMessage gadgetMessage );
  565. /** if this button is part of the context sensitive command system, process the Transition
  566. gadgetMessage is either a GBM_MOUSE_LEAVING or GBM_MOUSE_ENTERING */
  567. CBCommandStatus processContextSensitiveButtonTransition( GameWindow *button,
  568. GadgetGameMessage gadgetMessage );
  569. /// is the drawable the currently selected drawable for the context sensitive UI?
  570. Bool isDrivingContextUI( Drawable *draw ) const { return draw == m_currentSelectedDrawable; }
  571. //-----------------------------------------------------------------------------------------------
  572. // the remaining methods are used to construct the command buttons and command sets for
  573. // the command bar
  574. //-----------------------------------------------------------------------------------------------
  575. /// find existing command button if present
  576. const CommandButton *findCommandButton( const AsciiString& name );
  577. /// find existing command set
  578. const CommandSet *findCommandSet( const AsciiString& name );
  579. void showPurchaseScience( void );
  580. void hidePurchaseScience( void );
  581. void togglePurchaseScience( void );
  582. void showSpecialPowerShortcut( void );
  583. void hideSpecialPowerShortcut( void );
  584. void animateSpecialPowerShortcut( Bool isOn );
  585. /// set the control bar to the proper scheme based off a player template that's passed in
  586. ControlBarSchemeManager *getControlBarSchemeManager( void ) { return m_controlBarSchemeManager; }
  587. void setControlBarSchemeByPlayer(Player *p);
  588. void setControlBarSchemeByName(const AsciiString& name);
  589. void setControlBarSchemeByPlayerTemplate(const PlayerTemplate *pt);
  590. /// We need to sometime change what the images look like depending on what scheme we're using
  591. void updateBuildQueueDisabledImages( const Image *image );
  592. /// We need to sometime change what the images look like depending on what scheme we're using
  593. void updateRightHUDImage( const Image *image );
  594. /// We need to be able to update the command marker image based on which scheme we're using.
  595. void updateCommandMarkerImage( const Image *image );
  596. void updateSlotExitImage( const Image *image);
  597. void updateUpDownImages( const Image *toggleButtonUpIn, const Image *toggleButtonUpOn, const Image *toggleButtonUpPushed, const Image *toggleButtonDownIn, const Image *toggleButtonDownOn, const Image *toggleButtonDownPushed,const Image *generalButtonEnable, const Image *generalButtonHighlight );
  598. void preloadAssets( TimeOfDay timeOfDay ); ///< preload the assets
  599. /// We want to be able to have the control bar scheme set the color of the build up clock
  600. void updateBuildUpClockColor( Color color);
  601. WindowVideoManager *m_videoManager; ///< Video manager to take care of all animations on screen.
  602. AnimateWindowManager *m_animateWindowManager; ///< The animate window manager
  603. AnimateWindowManager *m_animateWindowManagerForGenShortcuts; ///< The animate window manager
  604. void updatePurchaseScience( void );
  605. AnimateWindowManager *m_generalsScreenAnimate; ///< The animate window manager
  606. // Initialize the Observer controls Must be called after we've already loaded the window
  607. void initObserverControls( void );
  608. void setObserverLookAtPlayer (Player *p) { m_observerLookAtPlayer = p;}
  609. Player *getObserverLookAtPlayer (void ) { return m_observerLookAtPlayer;}
  610. void populateObserverInfoWindow ( void );
  611. void populateObserverList( void );
  612. Bool isObserverControlBarOn( void ) { return m_isObserverCommandBar;}
  613. // ControlBarResizer *getControlBarResizer( void ) {return m_controlBarResizer;}
  614. // Functions for repositioning/resizing the control bar
  615. void switchControlBarStage( ControlBarStages stage );
  616. void toggleControlBarStage( void );
  617. const Image *getStarImage( void );
  618. Color getBorderColor( void ){return m_commandBarBorderColor;}
  619. void updateBorderColor( Color color) {m_commandBarBorderColor = color; }
  620. /// set the command data into the button
  621. void setControlCommand( GameWindow *button, const CommandButton *commandButton );
  622. void getForegroundMarkerPos(Int *x, Int *y);
  623. void getBackgroundMarkerPos(Int *x, Int *y);
  624. static void parseCommandSetDefinition( INI *ini );
  625. static void parseCommandButtonDefinition( INI *ini );
  626. void drawTransitionHandler( void );
  627. const Image *getArrowImage( void ){ return m_genArrow; }
  628. void setArrowImage( const Image *arrowImage ){ m_genArrow = arrowImage; }
  629. void initSpecialPowershortcutBar( Player *player);
  630. void triggerRadarAttackGlow( void );
  631. protected:
  632. void updateRadarAttackGlow ( void );
  633. void setDefaultControlBarConfig( void );
  634. void setSquishedControlBarConfig( void );
  635. void setLowControlBarConfig( void );
  636. void setHiddenControlBar( void );
  637. /// find existing command button if present
  638. CommandButton* findNonConstCommandButton( const AsciiString& name );
  639. /// allocate a new command button, link to list, initialize to default, and return
  640. CommandButton *newCommandButton( const AsciiString& name );
  641. CommandButton *newCommandButtonOverride( CommandButton *buttonToOverride );
  642. /// allocate a new command set, link to list, initialize to default, and return it
  643. CommandSet *newCommandSet( const AsciiString& name );
  644. CommandSet *newCommandSetOverride( CommandSet *setToOverride );
  645. /// evaluate what the user should see based on what selected drawables we have in our UI
  646. void evaluateContextUI( void );
  647. /// add the common commands of this drawable to the common command set
  648. void addCommonCommands( Drawable *draw, Bool firstDrawable );
  649. /// switch the interface context to the new mode and populate as needed
  650. void switchToContext( ControlBarContext context, Drawable *draw );
  651. /// set the command data into the button
  652. void setControlCommand( const AsciiString& buttonWindowName, GameWindow *parent,
  653. const CommandButton *commandButton );
  654. /// show/hide the portrait window image using the image pointer to set
  655. void setPortraitByImage( const Image *image );
  656. /// show/hide the portrait window image using the image from the object
  657. void setPortraitByObject( Object *obj );
  658. /// show rally point at world location, a NULL location will hide any visible rally point marker
  659. void showRallyPoint( const Coord3D *loc );
  660. /// post process step, after all commands and command sets are loaded
  661. void postProcessCommands( void );
  662. // the following methods are for resetting data for vaious contexts
  663. void resetCommonCommandData( void ); /// reset shared command data
  664. void resetContainData( void ); /// reset container data we use to tie controls to objects IDs for containment
  665. void resetBuildQueueData( void ); /// reset the build queue data we use to die queue entires to control
  666. // the following methods are for populating the context GUI controls for a particular context
  667. static void populateButtonProc( Object *obj, void *userData );
  668. void populatePurchaseScience(Player* player);
  669. void populateCommand( Object *obj );
  670. void populateMultiSelect( void );
  671. void populateBuildQueue( Object *producer );
  672. void populateStructureInventory( Object *building );
  673. void populateBeacon( Object *beacon );
  674. void populateUnderConstruction( Object *objectUnderConstruction );
  675. void populateOCLTimer( Object *creatorObject );
  676. void doTransportInventoryUI( Object *transport, const CommandSet *commandSet );
  677. static void populateInvDataCallback( Object *obj, void *userData );
  678. // the following methods are for updating the currently showing context
  679. CommandAvailability getCommandAvailability( const CommandButton *command, Object *obj, GameWindow *win, Bool forceDisabledEvaluation = FALSE ) const;
  680. void updateContextMultiSelect( void );
  681. void updateContextPurchaseScience( void );
  682. void updateContextCommand( void );
  683. void updateContextStructureInventory( void );
  684. void updateContextBeacon( void );
  685. void updateContextUnderConstruction( void );
  686. void updateContextOCLTimer( void );
  687. // the following methods are for the special power shortcut window
  688. void populateSpecialPowerShortcut( Player *player);
  689. void updateSpecialPowerShortcut( void );
  690. static const Image* calculateVeterancyOverlayForThing( const ThingTemplate *thingTemplate );
  691. static const Image* calculateVeterancyOverlayForObject( const Object *obj );
  692. // the following methods do command processing for GUI selections
  693. CBCommandStatus processCommandUI( GameWindow *control, GadgetGameMessage gadgetMessage );
  694. CBCommandStatus processCommandTransitionUI( GameWindow *control, GadgetGameMessage gadgetMessage );
  695. // methods to help out with each context
  696. void updateConstructionTextDisplay( Object *obj );
  697. void updateOCLTimerTextDisplay( UnsignedInt totalSeconds, Real percent );
  698. void setUpDownImages( void );
  699. // methods for flashing cameos
  700. public:
  701. void setFlash( Bool b ) { m_flash = b; }
  702. // get method for list of commandbuttons
  703. const CommandButton *getCommandButtons( void ) { return m_commandButtons; }
  704. protected:
  705. ICoord2D m_defaultControlBarPosition; ///< Stored the original position of the control bar on the screen
  706. ControlBarStages m_currentControlBarStage;
  707. Bool m_UIDirty; ///< the context UI must be re-evaluated
  708. CommandButton *m_commandButtons; ///< list of possible commands to have
  709. CommandSet *m_commandSets; ///< list of all command sets defined
  710. ControlBarSchemeManager *m_controlBarSchemeManager; ///< The Scheme singleton
  711. GameWindow *m_contextParent[ NUM_CONTEXT_PARENTS ]; ///< "parent" window for buttons that are part of the context sensitive interface
  712. Drawable *m_currentSelectedDrawable; ///< currently selected drawable for the context sensitive interface
  713. ControlBarContext m_currContext; ///< our current displayed context
  714. DrawableID m_rallyPointDrawableID; ///< rally point drawable for visual rally point
  715. Real m_displayedConstructPercent; ///< construct percent last displayed to user
  716. UnsignedInt m_displayedOCLTimerSeconds; ///< OCL Timer seconds remaining last displayed to user
  717. UnsignedInt m_displayedQueueCount; ///< queue count last displayed to user
  718. UnsignedInt m_lastRecordedInventoryCount; ///< last known UI state of an inventory count
  719. GameWindow *m_rightHUDWindow; ///< window of the right HUD display
  720. GameWindow *m_rightHUDCameoWindow; ///< window of the right HUD display
  721. GameWindow *m_rightHUDUpgradeCameos[MAX_RIGHT_HUD_UPGRADE_CAMEOS];
  722. GameWindow *m_rightHUDUnitSelectParent;
  723. GameWindow *m_communicatorButton; ///< button for the communicator
  724. WindowLayout *m_scienceLayout; ///< the Science window layout
  725. GameWindow *m_sciencePurchaseWindowsRank1[ MAX_PURCHASE_SCIENCE_RANK_1 ]; ///< command window controls for easy access
  726. GameWindow *m_sciencePurchaseWindowsRank3[ MAX_PURCHASE_SCIENCE_RANK_3 ]; ///< command window controls for easy access
  727. GameWindow *m_sciencePurchaseWindowsRank8[ MAX_PURCHASE_SCIENCE_RANK_8 ]; ///< command window controls for easy access
  728. GameWindow *m_specialPowerShortcutButtons[ MAX_SPECIAL_POWER_SHORTCUTS ];
  729. GameWindow *m_specialPowerShortcutButtonParents[ MAX_SPECIAL_POWER_SHORTCUTS ];
  730. Int m_currentlyUsedSpecialPowersButtons; ///< Value will be <= MAX_SPECIAL_POWER_SHORTCUTS;
  731. WindowLayout *m_specialPowerLayout;
  732. GameWindow *m_specialPowerShortcutParent;
  733. GameWindow *m_commandWindows[ MAX_COMMANDS_PER_SET ]; ///< command window controls for easy access
  734. const CommandButton *m_commonCommands[ MAX_COMMANDS_PER_SET ]; ///< shared commands we will use for multi-selection
  735. // removed from multiplayer branch
  736. //GameWindow *m_commandMarkers[ MAX_COMMANDS_PER_SET ]; ///< When we don't have a command, they want to show an image
  737. // removed from multiplayer branch
  738. //void showCommandMarkers( void ); ///< function that compare's what's being shown in m_commandWindows and shows the ones that are hidden.
  739. public:
  740. // method for hiding communicator window CCB
  741. void hideCommunicator( Bool b );
  742. protected:
  743. struct ContainEntry
  744. {
  745. GameWindow *control;
  746. ObjectID objectID;
  747. };
  748. static ContainEntry m_containData[ MAX_COMMANDS_PER_SET ]; ///< inventory buttons integrated into the regular command set for buildings/transports
  749. struct QueueEntry
  750. {
  751. GameWindow *control; ///< window that the GUI control is tied to
  752. ProductionType type; ///< type of queue data
  753. union
  754. {
  755. ProductionID productionID; ///< production id for unit productions
  756. const UpgradeTemplate *upgradeToResearch; ///< upgrade template for upgrade productions
  757. };
  758. };
  759. QueueEntry m_queueData[ MAX_BUILD_QUEUE_BUTTONS ]; ///< what the build queue represents
  760. //cameo flash
  761. Bool m_flash; ///< tells update whether or not to check for flash
  762. Bool m_sideSelectAnimateDown;
  763. ICoord2D m_animateDownWin1Size;
  764. ICoord2D m_animateDownWin2Size;
  765. ICoord2D m_animateDownWin1Pos;
  766. ICoord2D m_animateDownWin2Pos;
  767. GameWindow *m_animateDownWindow;
  768. UnsignedInt m_animTime;
  769. Color m_buildUpClockColor;
  770. Bool m_isObserverCommandBar; ///< If this is true, the command bar behaves greatly differnt
  771. Player *m_observerLookAtPlayer; ///< The current player we're looking at, Null if we're not looking at anyone.
  772. WindowLayout *m_buildToolTipLayout; ///< The window that will slide on/display tooltips
  773. Bool m_showBuildToolTipLayout; ///< every frame we test to see if we aregoing to continue showing this or not.
  774. public:
  775. void showBuildTooltipLayout( GameWindow *cmdButton );
  776. void hideBuildTooltipLayout( void );
  777. void deleteBuildTooltipLayout( void );
  778. Bool getShowBuildTooltipLayout( void ){return m_showBuildToolTipLayout; }
  779. void populateBuildTooltipLayout( const CommandButton *commandButton, GameWindow *tooltipWin = NULL );
  780. void repopulateBuildTooltipLayout( void );
  781. private:
  782. // Command Bar button border bars stuff
  783. Color m_commandButtonBorderBuildColor;
  784. Color m_commandButtonBorderActionColor;
  785. Color m_commandButtonBorderUpgradeColor;
  786. Color m_commandButtonBorderSystemColor;
  787. Color m_commandBarBorderColor;
  788. void setCommandBarBorder( GameWindow *button, CommandButtonMappedBorderType type);
  789. public:
  790. void updateCommanBarBorderColors(Color build, Color action, Color upgrade, Color system );
  791. private:
  792. /// find existing command set
  793. CommandSet *findNonConstCommandSet( const AsciiString& name );
  794. const Image *m_genStarOn;
  795. const Image *m_genStarOff;
  796. const Image *m_toggleButtonUpIn;
  797. const Image *m_toggleButtonUpOn;
  798. const Image *m_toggleButtonUpPushed;
  799. const Image *m_toggleButtonDownIn;
  800. const Image *m_toggleButtonDownOn;
  801. const Image *m_toggleButtonDownPushed;
  802. GameWindowTransitionsHandler *m_transitionHandler;
  803. const Image *m_genArrow;
  804. static const Image *m_rankVeteranIcon;
  805. static const Image *m_rankEliteIcon;
  806. static const Image *m_rankHeroicIcon;
  807. const Image *m_generalButtonEnable;
  808. const Image *m_generalButtonHighlight;
  809. Bool m_genStarFlash;
  810. Int m_lastFlashedAtPointValue;
  811. ICoord2D m_controlBarForegroundMarkerPos;
  812. ICoord2D m_controlBarBackgroundMarkerPos;
  813. Bool m_radarAttackGlowOn;
  814. Int m_remainingRadarAttackGlowFrames;
  815. GameWindow *m_radarAttackGlowWindow;
  816. // ControlBarResizer *m_controlBarResizer;
  817. };
  818. // EXTERNALS //////////////////////////////////////////////////////////////////////////////////////
  819. extern ControlBar *TheControlBar;
  820. #endif // end __CONTROLBAR_H_