OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4Menu.h
Go to the documentation of this file.
1 /*
2  * OpenClonk, http://www.openclonk.org
3  *
4  * Copyright (c) 1998-2000, Matthes Bender
5  * Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de/
6  * Copyright (c) 2009-2016, The OpenClonk Team and contributors
7  *
8  * Distributed under the terms of the ISC license; see accompanying file
9  * "COPYING" for details.
10  *
11  * "Clonk" is a registered trademark of Matthes Bender, used with permission.
12  * See accompanying file "TRADEMARK" for details.
13  *
14  * To redistribute this file separately, substitute the full license texts
15  * for the above references.
16  */
17 
18 /* In-game menu as used by objects, players, and fullscreen options */
19 
20 #ifndef INC_C4Menu
21 #define INC_C4Menu
22 
23 #include "object/C4Id.h"
24 #include "graphics/C4FacetEx.h"
25 #include "gui/C4Gui.h"
26 #include "object/C4IDList.h"
27 
28 enum
29 {
32 };
33 enum
34 {
41 };
42 enum
43 {
47 };
48 enum
49 {
55 };
56 enum
57 {
58  C4MN_Item_NoCount = 12345678
59 };
60 enum
61 {
63 };
64 
65 class C4MenuItem : public C4GUI::Element
66 {
67  friend class C4Menu;
68 public:
69  ~C4MenuItem();
70 protected:
72  char Command[_MAX_FNAME+30+1];
73  char Command2[_MAX_FNAME+30+1];
75  int32_t Count;
79  C4Object* pSymbolObj; // drawn instead of symbol, if non-null
80  C4DefGraphics* pSymbolGraphics; // drawn instead of symbol, if non-null
81  uint32_t dwSymbolClr;
82  bool fOwnValue; // if set, a specific value is to be shown
83  int32_t iValue; // specific value to be shown
84  bool fSelected; // item is selected; set by menu
85  int32_t iStyle;
86  class C4Menu *pMenu;
87  int32_t iIndex;
89  int32_t TextDisplayProgress; // dialog menus only: Amount of text which is to be displayed already (-1 for everything)
90 
91 private:
92  bool IsDragElement();
93  int32_t GetSymbolWidth(int32_t iForHeight);
94 
95 protected:
96  virtual void DrawElement(C4TargetFacet &cgo); // draw menu item
97 
98  // ctor
99  C4MenuItem(C4Menu *pMenu, int32_t iIndex, const char *szCaption, const char *szCommand,
100  int32_t iCount, C4Object *pObject, const char *szInfoCaption,
101  C4ID idID, const char *szCommand2, bool fOwnValue, int32_t iValue, int32_t iStyle, bool fIsSelectable);
102  void GrabSymbol(C4FacetSurface &fctSymbol) { Symbol.GrabFrom(fctSymbol); if (Symbol.Surface) dwSymbolClr=Symbol.Surface->GetClr(); }
103  void SetGraphics(C4Object* pObj) { pSymbolObj = pObj; }
104  void SetGraphics(C4DefGraphics* pGfx) { pSymbolGraphics = pGfx; }
105  void RefSymbol(const C4Facet &fctSymbol) { Symbol.Set(fctSymbol); if (Symbol.Surface) dwSymbolClr=Symbol.Surface->GetClr(); }
106  void SetSelected(bool fToVal) { fSelected = fToVal; }
107  void DoTextProgress(int32_t &riByVal); // progress number of shown characters by given amount
108 
109 public:
110  C4ID GetC4ID() const { return id; }
111  int32_t GetValue() const { return iValue; }
112  C4Object *GetObject() const { return Object; }
113  const char *GetCommand() const { return Command; }
114 
115  void ClearPointers(C4Object* pObj) { if(pObj == Object) Object = nullptr; if(pObj == pSymbolObj) pSymbolObj = nullptr; }
116 
117  // GUI calls
118  virtual void MouseInput(class C4GUI::CMouse &rMouse, int32_t iButton, int32_t iX, int32_t iY, DWORD dwKeyParam); // input: mouse movement or buttons
119  virtual void MouseEnter(class C4GUI::CMouse &rMouse); // called when mouse cursor enters element region: Select this item (deselects any other)
120 };
121 
122 class C4Menu : public C4GUI::Dialog
123 {
124  typedef C4GUI::Dialog BaseClass;
125 public:
126  C4Menu();
127  ~C4Menu() { Clear(); }
128 
129  void Clear();
130  virtual void Default();
131 
132 protected:
134  bool Permanent;
136  int32_t Style;
138  int32_t ItemCount;
140  int32_t Extra,ExtraData;
141  int32_t Identification;
142  int32_t Columns; // sync
143  int32_t Lines; // async
144  int32_t Alignment;
145  int32_t VisibleCount;
146  StdStrBuf CloseCommand; // script command that will be executed on menu close
149  C4GUI::ScrollWindow *pClientWindow; // window containing the menu items
150  bool fHasPortrait; // if set, first menu item is used at a portrait at topleft of menu
151  bool fTextProgressing; // if true, text is being shown progressively (dialog menus)
152  bool fEqualIconItemHeight; // for dialog menus only: If set, all options with an icon are forced to have the same height
153  bool fActive; // set if menu is shown - independant of GUI to keep synchronized when there's no GUI
154 public:
155  void ClearPointers(C4Object *pObj);
156  bool Refill();
157  void Execute();
158  void SetPermanent(bool fPermanent);
159  void SetAlignment(int32_t iAlignment);
160  int32_t GetIdentification();
161  int32_t GetItemCount();
162  int32_t GetPosition();
163  int32_t GetSelection();
164  bool IsContextMenu() { return Style == C4MN_Style_Context; }
165  int GetSymbolSize() { return (Style == C4MN_Style_Dialog) ? 64 : C4SymbolSize; }
166  int32_t GetItemHeight() { return ItemHeight; }
168  C4MenuItem* GetItem(int32_t iIndex);
169  virtual C4Object *GetParentObject() { return nullptr; }
170  bool MoveSelection(int32_t iBy, bool fAdjustPosition, bool fDoCalls);
171  bool SetSelection(int32_t iSelection, bool fAdjustPosition, bool fDoCalls);
172  bool SetPosition(int32_t iPosition);
173  void SetSize(int32_t iToWdt, int32_t iToHgt);
174  bool Enter(bool fRight=false);
175  bool IsActive();
176  bool Control(BYTE byCom, int32_t iData);
177  bool KeyControl(BYTE byCom); // direct keyboard callback
178  bool AddRefSym(const char *szCaption, const C4Facet &fctSymbol, const char *szCommand,
179  int32_t iCount=C4MN_Item_NoCount, C4Object *pObject=nullptr,
180  const char *szInfoCaption=nullptr,
181  C4ID idID=C4ID::None, const char *szCommand2=nullptr, bool fOwnValue=false, int32_t iValue=0, bool fIsSelectable=true);
182  bool Add(const char *szCaption, C4FacetSurface &fctSymbol, const char *szCommand,
183  int32_t iCount=C4MN_Item_NoCount, C4Object *pObject=nullptr,
184  const char *szInfoCaption=nullptr,
185  C4ID idID=C4ID::None, const char *szCommand2=nullptr, bool fOwnValue=false, int32_t iValue=0, bool fIsSelectable=true);
186  bool Add(const char *szCaption, C4Object* pGfxObj, const char *szCommand,
187  int32_t iCount=C4MN_Item_NoCount, C4Object *pObject=nullptr,
188  const char *szInfoCaption=nullptr,
189  C4ID idID=C4ID::None, const char *szCommand2=nullptr, bool fOwnValue=false, int32_t iValue=0, bool fIsSelectable=true);
190  bool Add(const char *szCaption, C4DefGraphics* pGfx, const char *szCommand,
191  int32_t iCount=C4MN_Item_NoCount, C4Object *pObject=nullptr,
192  const char *szInfoCaption=nullptr,
193  C4ID idID=C4ID::None, const char *szCommand2=nullptr, bool fOwnValue=false, int32_t iValue=0, bool fIsSelectable=true);
194  void ClearItems();
195  void ResetLocation() { LocationSet = false; }
196  bool SetLocation(int32_t iX, int32_t iY); // set location relative to user viewport
197  bool SetTextProgress(int32_t iToProgress, bool fAdd); // enable/disable progressive text display and set starting pos
198  void SetEqualItemHeight(bool fToVal) { fEqualIconItemHeight = fToVal; } // enable/disable equal item heights
199  bool TryClose(bool fOK, bool fControl);
200  void SetCloseCommand(const char *strCommand);
201  bool IsTextProgressing() const { return fTextProgressing; }
202 
203 #ifdef _DEBUG
204  void AssertSurfaceNotUsed(C4Surface *sfc);
205 #endif
206 
207 private:
208  bool AddItem(C4MenuItem *pNew, const char *szCaption, const char *szCommand,
209  int32_t iCount, C4Object *pObject, const char *szInfoCaption,
210  C4ID idID, const char *szCommand2, bool fOwnValue, int32_t iValue, bool fIsSelectable);
211  bool InitMenu(const char *szEmpty, int32_t iExtra, int32_t iExtraData, int32_t iId, int32_t iStyle);
212 protected:
213  bool DoInitRefSym(const C4Facet &fctSymbol, const char *szEmpty, int32_t iExtra=C4MN_Extra_None, int32_t iExtraData=0, int32_t iId=0, int32_t iStyle=C4MN_Style_Normal);
214  bool DoInit(C4FacetSurface &fctSymbol, const char *szEmpty, int32_t iExtra=C4MN_Extra_None, int32_t iExtraData=0, int32_t iId=0, int32_t iStyle=C4MN_Style_Normal);
215  void DrawBuffer(C4Facet &cgo);
216  void AdjustSelection();
217  void AdjustPosition();
218  bool CheckBuffer();
219  bool RefillInternal();
220  void DrawButton(C4Facet &cgo);
221  void DrawScrollbar(C4Facet &cgo, int32_t iTotal, int32_t iVisible, int32_t iPosition);
222  void DrawFrame(C4Surface * sfcSurface, int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt);
223  void InitLocation(C4Facet &cgo);
224  void InitSize();
225  void UpdateScrollBar(); // call InitSize if a scroll bar is needed but not present or vice vera
226  void UserSelectItem(int32_t Player, C4MenuItem *pItem); // select item (direct) or do control (object menus)
227  void UserEnter(int32_t Player, C4MenuItem *pItem, bool fRight); // enter on an item
228  bool HasMouse(); // returns whether the controlling player has mouse control
229 
230  virtual bool DoRefillInternal(bool &rfRefilled) { return true; };
231  virtual bool MenuCommand(const char *szCommand, bool fIsCloseCommand) { return true; }
232  virtual void OnSelectionChanged(int32_t iNewSelection) {} // do object callbacks if selection changed in user menus
233  virtual bool IsCloseDenied() { return false; } // do MenuQueryCancel-callbacks for user menus
234  virtual void OnUserSelectItem(int32_t Player, int32_t iIndex) {}
235  virtual void OnUserEnter(int32_t Player, int32_t iIndex, bool fRight) {}
236  virtual void OnUserClose() {};
237  virtual bool IsReadOnly() { return false; } // determine whether the menu is just viewed by an observer, and should not issue any calls
238  virtual int32_t GetControllingPlayer() { return NO_OWNER; }
239 
240  virtual const char *GetID() { return 0; } // no ID needed, because it's a viewport dlg
241 
242  bool HasPortrait() { return fHasPortrait; } // dialog menus only: Whether a portrait is shown in the topleft
243 
244 protected:
245  // C4GUI
246  virtual C4Viewport *GetViewport(); // return associated viewport
247  virtual bool IsExternalDrawDialog() { return true; } // drawn by viewport drawing proc
248  virtual bool IsMouseControlled() { return false; }
249  virtual void UpdateOwnPos();
250  void UpdateElementPositions(); // reposition list items so they are stacked vertically
251  virtual int32_t GetZOrdering() { return -1; }
252  virtual void Draw(C4TargetFacet &cgo);
253  virtual void DrawElement(C4TargetFacet &cgo); // draw menu
254  virtual bool IsOwnPtrElement() { return true; }
255  virtual void UserClose(bool fOK);
256 
257  // bottom area needed for extra info
258  virtual int32_t GetMarginBottom() { return ((Extra) ? C4MN_SymbolSize : 0) + C4MN_FrameWidth + BaseClass::GetMarginBottom(); }
259  virtual int32_t GetMarginLeft() { return C4MN_FrameWidth + BaseClass::GetMarginLeft(); }
260  virtual int32_t GetMarginRight() { return C4MN_FrameWidth + BaseClass::GetMarginRight(); }
261 
262  friend class C4Viewport; // for drawing
263  friend class C4MenuItem;
264 };
265 
266 #endif
DWORD GetClr()
Definition: C4Surface.h:135
int32_t Selection
Definition: C4Menu.h:137
void SetSelected(bool fToVal)
Definition: C4Menu.h:106
virtual bool IsCloseDenied()
Definition: C4Menu.h:233
int32_t GetItemHeight()
Definition: C4Menu.h:166
void ResetLocation()
Definition: C4Menu.h:195
int32_t ItemHeight
Definition: C4Menu.h:139
bool IsContextMenu()
Definition: C4Menu.h:164
void InitLocation(C4Facet &cgo)
Definition: C4Menu.cpp:625
bool AddRefSym(const char *szCaption, const C4Facet &fctSymbol, const char *szCommand, int32_t iCount=C4MN_Item_NoCount, C4Object *pObject=nullptr, const char *szInfoCaption=nullptr, C4ID idID=C4ID::None, const char *szCommand2=nullptr, bool fOwnValue=false, int32_t iValue=0, bool fIsSelectable=true)
Definition: C4Menu.cpp:338
bool SetSelection(int32_t iSelection, bool fAdjustPosition, bool fDoCalls)
Definition: C4Menu.cpp:545
bool Add(const char *szCaption, C4FacetSurface &fctSymbol, const char *szCommand, int32_t iCount=C4MN_Item_NoCount, C4Object *pObject=nullptr, const char *szInfoCaption=nullptr, C4ID idID=C4ID::None, const char *szCommand2=nullptr, bool fOwnValue=false, int32_t iValue=0, bool fIsSelectable=true)
Definition: C4Menu.cpp:351
int32_t iIndex
Definition: C4Menu.h:87
bool KeyControl(BYTE byCom)
Definition: C4Menu.cpp:474
virtual void UserClose(bool fOK)
Definition: C4Menu.cpp:1137
const size_t C4MaxTitle
Definition: C4Constants.h:25
void DrawBuffer(C4Facet &cgo)
bool RefillInternal()
Definition: C4Menu.cpp:868
bool Refill()
Definition: C4Menu.cpp:916
void SetSize(int32_t iToWdt, int32_t iToHgt)
Definition: C4Menu.cpp:618
void SetGraphics(C4DefGraphics *pGfx)
Definition: C4Menu.h:104
void SetCloseCommand(const char *strCommand)
Definition: C4Menu.cpp:1145
void UserSelectItem(int32_t Player, C4MenuItem *pItem)
Definition: C4Menu.cpp:1117
void SetAlignment(int32_t iAlignment)
Definition: C4Menu.cpp:858
virtual int32_t GetMarginLeft()
Definition: C4Menu.h:259
~C4MenuItem()
Definition: C4Menu.cpp:67
void DoTextProgress(int32_t &riByVal)
Definition: C4Menu.cpp:72
bool fHasPortrait
Definition: C4Menu.h:150
void SetEqualItemHeight(bool fToVal)
Definition: C4Menu.h:198
virtual void DrawElement(C4TargetFacet &cgo)
Definition: C4Menu.cpp:809
int32_t Style
Definition: C4Menu.h:136
virtual bool MenuCommand(const char *szCommand, bool fIsCloseCommand)
Definition: C4Menu.h:231
int32_t ItemWidth
Definition: C4Menu.h:139
virtual void OnUserSelectItem(int32_t Player, int32_t iIndex)
Definition: C4Menu.h:234
int32_t iStyle
Definition: C4Menu.h:85
bool fTextProgressing
Definition: C4Menu.h:151
virtual bool IsReadOnly()
Definition: C4Menu.h:237
int32_t TextDisplayProgress
Definition: C4Menu.h:89
void DrawFrame(C4Surface *sfcSurface, int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt)
Definition: C4Menu.cpp:853
bool fOwnValue
Definition: C4Menu.h:82
C4Menu()
Definition: C4Menu.cpp:238
virtual const char * GetID()
Definition: C4Menu.h:240
int32_t ExtraData
Definition: C4Menu.h:140
int32_t Alignment
Definition: C4Menu.h:144
uint8_t BYTE
C4MenuItem(C4Menu *pMenu, int32_t iIndex, const char *szCaption, const char *szCommand, int32_t iCount, C4Object *pObject, const char *szInfoCaption, C4ID idID, const char *szCommand2, bool fOwnValue, int32_t iValue, int32_t iStyle, bool fIsSelectable)
Definition: C4Menu.cpp:49
Definition: C4Menu.h:122
C4GUI::ScrollWindow * pClientWindow
Definition: C4Menu.h:149
int GetSymbolSize()
Definition: C4Menu.h:165
virtual C4Viewport * GetViewport()
Definition: C4Menu.cpp:994
char Command[_MAX_FNAME+30+1]
Definition: C4Menu.h:72
bool SetTextProgress(int32_t iToProgress, bool fAdd)
Definition: C4Menu.cpp:959
virtual int32_t GetMarginBottom()
Definition: C4Menu.h:258
bool CheckBuffer()
bool LocationSet
Definition: C4Menu.h:133
void Set(const C4Facet &cpy)
Definition: C4FacetEx.h:46
bool fOK
Definition: C4Gui.h:2082
virtual int32_t GetMarginLeft()
Definition: C4Gui.h:2141
virtual bool DoRefillInternal(bool &rfRefilled)
Definition: C4Menu.h:230
void GrabFrom(C4FacetSurface &rSource)
Definition: C4FacetEx.h:57
C4ID id
Definition: C4Menu.h:76
void ClearPointers(C4Object *pObj)
Definition: C4Menu.h:115
void UserEnter(int32_t Player, C4MenuItem *pItem, bool fRight)
Definition: C4Menu.cpp:1127
int32_t ItemCount
Definition: C4Menu.h:138
bool SetLocation(int32_t iX, int32_t iY)
Definition: C4Menu.cpp:952
void RefSymbol(const C4Facet &fctSymbol)
Definition: C4Menu.h:105
C4MenuItem * GetSelectedItem()
Definition: C4Menu.cpp:584
void SetGraphics(C4Object *pObj)
Definition: C4Menu.h:103
bool HasMouse()
Definition: C4Menu.cpp:1150
void ClearItems()
Definition: C4Menu.cpp:896
C4Object * GetObject() const
Definition: C4Menu.h:112
virtual bool IsOwnPtrElement()
Definition: C4Menu.h:254
class C4Menu * pMenu
Definition: C4Menu.h:86
static const C4ID None
Definition: C4Id.h:42
virtual int32_t GetMarginBottom()
Definition: C4Gui.h:2143
int32_t iValue
Definition: C4Menu.h:83
int32_t Count
Definition: C4Menu.h:75
virtual int32_t GetZOrdering()
Definition: C4Menu.h:251
bool DoInit(C4FacetSurface &fctSymbol, const char *szEmpty, int32_t iExtra=C4MN_Extra_None, int32_t iExtraData=0, int32_t iId=0, int32_t iStyle=C4MN_Style_Normal)
Definition: C4Menu.cpp:301
void ClearPointers(C4Object *pObj)
Definition: C4Menu.cpp:1159
int32_t GetItemCount()
Definition: C4Menu.cpp:518
void UpdateScrollBar()
Definition: C4Menu.cpp:767
const int NO_OWNER
Definition: C4Constants.h:138
bool fSelected
Definition: C4Menu.h:84
bool IsSelectable
Definition: C4Menu.h:88
bool fActive
Definition: C4Menu.h:153
bool SetPosition(int32_t iPosition)
Definition: C4Menu.cpp:605
#define _MAX_FNAME
virtual bool IsExternalDrawDialog()
Definition: C4Menu.h:247
virtual int32_t GetControllingPlayer()
Definition: C4Menu.h:238
int32_t GetSelection()
Definition: C4Menu.cpp:600
virtual int32_t GetMarginRight()
Definition: C4Gui.h:2142
Definition: C4Id.h:28
C4DefGraphics * pSymbolGraphics
Definition: C4Menu.h:80
int32_t GetIdentification()
Definition: C4Menu.cpp:613
virtual int32_t GetMarginRight()
Definition: C4Menu.h:260
void DrawScrollbar(C4Facet &cgo, int32_t iTotal, int32_t iVisible, int32_t iPosition)
virtual void Default()
Definition: C4Menu.cpp:247
C4MenuItem * GetItem(int32_t iIndex)
Definition: C4Menu.cpp:513
int32_t GetValue() const
Definition: C4Menu.h:111
bool IsActive()
Definition: C4Menu.cpp:481
bool TryClose(bool fOK, bool fControl)
Definition: C4Menu.cpp:281
bool DoInitRefSym(const C4Facet &fctSymbol, const char *szEmpty, int32_t iExtra=C4MN_Extra_None, int32_t iExtraData=0, int32_t iId=0, int32_t iStyle=C4MN_Style_Normal)
Definition: C4Menu.cpp:308
void AdjustPosition()
Definition: C4Menu.cpp:589
void GrabSymbol(C4FacetSurface &fctSymbol)
Definition: C4Menu.h:102
C4FacetSurface Symbol
Definition: C4Menu.h:148
virtual void UpdateOwnPos()
Definition: C4Menu.cpp:1109
virtual void OnSelectionChanged(int32_t iNewSelection)
Definition: C4Menu.h:232
C4FacetSurface Symbol
Definition: C4Menu.h:78
char InfoCaption[2 *C4MaxTitle+1]
Definition: C4Menu.h:74
bool HasPortrait()
Definition: C4Menu.h:242
int32_t TimeOnSelection
Definition: C4Menu.h:137
bool Control(BYTE byCom, int32_t iData)
Definition: C4Menu.cpp:421
bool Permanent
Definition: C4Menu.h:134
uint32_t dwSymbolClr
Definition: C4Menu.h:81
virtual void OnUserEnter(int32_t Player, int32_t iIndex, bool fRight)
Definition: C4Menu.h:235
const int C4SymbolSize
Definition: C4Constants.h:58
virtual void Draw(C4TargetFacet &cgo)
Definition: C4Menu.cpp:776
C4Object * pSymbolObj
Definition: C4Menu.h:79
void InitSize()
Definition: C4Menu.cpp:740
void Execute()
Definition: C4Menu.cpp:904
bool fEqualIconItemHeight
Definition: C4Menu.h:152
int32_t Columns
Definition: C4Menu.h:142
virtual void MouseEnter(class C4GUI::CMouse &rMouse)
Definition: C4Menu.cpp:227
bool IsTextProgressing() const
Definition: C4Menu.h:201
virtual void MouseInput(class C4GUI::CMouse &rMouse, int32_t iButton, int32_t iX, int32_t iY, DWORD dwKeyParam)
Definition: C4Menu.cpp:201
bool Enter(bool fRight=false)
Definition: C4Menu.cpp:486
virtual bool IsMouseControlled()
Definition: C4Menu.h:248
int32_t Extra
Definition: C4Menu.h:140
C4Object * Object
Definition: C4Menu.h:77
int32_t VisibleCount
Definition: C4Menu.h:145
void Clear()
Definition: C4Menu.cpp:272
void SetPermanent(bool fPermanent)
Definition: C4Menu.cpp:863
void AdjustSelection()
Definition: C4Menu.cpp:926
bool NeedRefill
Definition: C4Menu.h:135
char Command2[_MAX_FNAME+30+1]
Definition: C4Menu.h:73
~C4Menu()
Definition: C4Menu.h:127
virtual void OnUserClose()
Definition: C4Menu.h:236
C4Surface * Surface
Definition: C4Facet.h:119
void UpdateElementPositions()
Definition: C4Menu.cpp:1004
void DrawButton(C4Facet &cgo)
const char * GetCommand() const
Definition: C4Menu.h:113
uint32_t DWORD
virtual C4Object * GetParentObject()
Definition: C4Menu.h:169
char Caption[C4MaxTitle+1]
Definition: C4Menu.h:147
int32_t GetPosition()
int32_t Lines
Definition: C4Menu.h:143
StdStrBuf CloseCommand
Definition: C4Menu.h:146
int32_t Identification
Definition: C4Menu.h:141
bool MoveSelection(int32_t iBy, bool fAdjustPosition, bool fDoCalls)
Definition: C4Menu.cpp:523
virtual void DrawElement(C4TargetFacet &cgo)
Definition: C4Menu.cpp:123
char Caption[C4MaxTitle+1]
Definition: C4Menu.h:71
C4ID GetC4ID() const
Definition: C4Menu.h:110