OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4GameMessage.cpp
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 /* Text messages drawn inside the viewport */
19 
20 #include "C4Include.h"
21 #include "gui/C4GameMessage.h"
22 
23 #include "object/C4Def.h"
24 #include "object/C4Object.h"
26 #include "player/C4Player.h"
27 #include "player/C4PlayerList.h"
28 #include "graphics/C4Draw.h"
29 
30 const int32_t ObjectMsgDelayFactor = 2, GlobalMsgDelayFactor = 3; // frames per char message display time
31 
32 C4GameMessage::C4GameMessage() : pFrameDeco(nullptr)
33 {
34 
35 }
36 
38 {
39  delete pFrameDeco;
40 }
41 
42 void C4GameMessage::Init(int32_t iType, const StdStrBuf & sText, C4Object *pTarget, int32_t iPlayer, int32_t iX, int32_t iY, uint32_t dwClr, C4ID idDecoID, C4PropList *pSrc, uint32_t dwFlags, int width)
43 {
44  // safety!
45  if (pTarget && !pTarget->Status) pTarget = nullptr;
46  // Set data
47  Text.Copy(sText);
48  Target=pTarget;
49  X=iX; Y=iY; Wdt=width; Hgt=0;
50  Player=iPlayer;
51  ColorDw=dwClr;
52  Type=iType;
54  DecoID=idDecoID;
55  this->dwFlags=dwFlags;
56  PictureDef=nullptr;
58  if (pSrc)
59  {
60  // retain special width/height properties when using a message box on an object-local message
61  if (Target)
62  {
63  C4Value val;
64  if (pSrc->GetProperty(P_Wdt, &val))
65  Wdt = val.getInt();
66  if (pSrc->GetProperty(P_Hgt, &val))
67  Hgt = val.getInt();
68  }
69 
70  // retain object or definition from the proplist
71  PictureDef = pSrc->GetObject();
72  if (!PictureDef) PictureDef = pSrc->GetDef();
74  {
75  PictureDef = pSrc;
77  }
78  }
79  // Permanent message
80  if ('@' == Text[0])
81  {
82  Delay=-1;
83  Text.Move(1, Text.getLength());
84  Text.Shrink(1);
85  }
86  // frame decoration
87  delete pFrameDeco; pFrameDeco = nullptr;
88  if (DecoID)
89  {
91  if (!pFrameDeco->SetByDef(DecoID))
92  {
93  delete pFrameDeco;
94  pFrameDeco = nullptr;
95  }
96  }
97 }
98 
99 void C4GameMessage::Append(const char *szText, bool fNoDuplicates)
100 {
101  // Check for duplicates
102  if (fNoDuplicates)
103  for (const char *pPos = Text.getData(); *pPos; pPos = SAdvancePast(pPos, '|'))
104  if (SEqual2(pPos, szText))
105  return;
106  // Append new line
107  Text.AppendFormat("|%s", szText);
109 }
110 
112 {
113  // Delay / removal
114  if (Delay>0) Delay--;
115  if (Delay==0) return false;
116  // Done
117  return true;
118 }
119 
120 int32_t DrawMessageOffset = -35; // For finding the optimum place to draw startup info & player messages...
121 int32_t PictureWidth = 64;
122 int32_t PictureIndent = 10;
123 
124 void C4GameMessage::Draw(C4TargetFacet &cgo, int32_t iPlayer)
125 {
126  // Globals or player
127  if (Type == C4GM_Global || ((Type == C4GM_GlobalPlayer) && (iPlayer == Player)))
128  {
129  int32_t iTextWdt,iTextHgt;
130  StdStrBuf sText;
131  int32_t x,y,wdt;
132  if (dwFlags & C4GM_XRel) x = X * cgo.Wdt / 100; else x = X;
133  if (dwFlags & C4GM_YRel) y = Y * cgo.Hgt / 100; else y = Y;
134  if (dwFlags & C4GM_WidthRel) wdt = Wdt * cgo.Wdt / 100; else wdt = Wdt;
135  if (~dwFlags & C4GM_NoBreak)
136  {
137  // Word wrap to cgo width
138  if (PictureDef)
139  {
140  if (!wdt) wdt = Clamp<int32_t>(cgo.Wdt/2, 50, std::min<int32_t>(500, cgo.Wdt-10));
141  int32_t iUnbrokenTextWidth = ::GraphicsResource.FontRegular.GetTextWidth(Text.getData(), true);
142  wdt = std::min<int32_t>(wdt, iUnbrokenTextWidth+10);
143  }
144  else
145  {
146  if (!wdt)
147  wdt = Clamp<int32_t>(cgo.Wdt-50, 50, 500);
148  else
149  wdt = Clamp<int32_t>(wdt, 10, cgo.Wdt-10);
150  }
151  iTextWdt = wdt * cgo.Zoom;
152  iTextHgt = ::GraphicsResource.FontRegular.BreakMessage(Text.getData(), iTextWdt, &sText, true);
153  }
154  else
155  {
156  ::GraphicsResource.FontRegular.GetTextExtent(Text.getData(), iTextWdt, iTextHgt, true);
157  sText.Ref(Text);
158  }
159  int32_t iDrawX = cgo.X+x;
160  int32_t iDrawY = cgo.Y+y;
161  // draw message
162  if (PictureDef)
163  {
164  // message with portrait
165  // bottom-placed portrait message: Y-Positioning 0 refers to bottom of viewport
166  if (dwFlags & C4GM_Bottom) iDrawY += cgo.Hgt;
167  else if (dwFlags & C4GM_VCenter) iDrawY += cgo.Hgt/2;
168  if (dwFlags & C4GM_Right) iDrawX += cgo.Wdt;
169  else if (dwFlags & C4GM_HCenter) iDrawX += cgo.Wdt/2;
170  // draw decoration
171  if (pFrameDeco)
172  {
173  iDrawX *= cgo.Zoom; iDrawY *= cgo.Zoom;
174  C4Rect rect(iDrawX-cgo.TargetX, iDrawY-cgo.TargetY, iTextWdt + PictureWidth + PictureIndent + pFrameDeco->iBorderLeft + pFrameDeco->iBorderRight, std::max(iTextHgt, PictureWidth) + pFrameDeco->iBorderTop + pFrameDeco->iBorderBottom);
175  if (dwFlags & C4GM_Bottom) { rect.y -= rect.Hgt; iDrawY -= rect.Hgt; }
176  else if (dwFlags & C4GM_VCenter) { rect.y -= rect.Hgt/2; iDrawY -= rect.Hgt/2; }
177  if (dwFlags & C4GM_Right) { rect.x -= rect.Wdt; iDrawX -= rect.Wdt; }
178  else if (dwFlags & C4GM_HCenter) { rect.x -= rect.Wdt/2; iDrawX -= rect.Wdt/2; }
179  pFrameDeco->Draw(cgo, rect);
180  iDrawX += pFrameDeco->iBorderLeft;
181  iDrawY += pFrameDeco->iBorderTop;
182  }
183  else
184  iDrawY -= iTextHgt;
185  // draw picture
186  // can only be def or object because has been checked on assignment
187 
188  C4Facet facet(cgo.Surface, iDrawX, iDrawY, PictureWidth, PictureWidth);
189  if(PictureDef->GetObject())
190  PictureDef->GetObject()->DrawPicture(facet);
191  else if (PictureDef->GetDef())
192  PictureDef->GetDef()->Draw(facet);
193  else
195 
196  // draw message
198  }
199  else
200  {
201  // message without picture
202  iDrawX += (cgo.Wdt/2) * cgo.Zoom;
203  iDrawY += (2 * cgo.Hgt / 3 + 50) * cgo.Zoom;
204  if (!(dwFlags & C4GM_Bottom)) iDrawY += DrawMessageOffset;
205  pDraw->TextOut(sText.getData(),::GraphicsResource.FontRegular,1.0,cgo.Surface,iDrawX,iDrawY,ColorDw,ACenter);
206  }
207  }
208  // Positioned
209  else if (Type == C4GM_Target || ((Type == C4GM_TargetPlayer) && (iPlayer == Player)))
210  {
211  // adjust position by object; care about parallaxity
212  float iMsgX, iMsgY, newzoom;
213  Target->GetDrawPosition(cgo, iMsgX, iMsgY, newzoom);
214  if(~dwFlags & C4GM_YRel)
215  iMsgY -= Target->Def->Shape.Hgt/2+5;
216  iMsgX+=X; iMsgY+=Y;
217  // check output bounds
218  if (Inside<float>((iMsgX - cgo.X) * newzoom, 0, cgo.Wdt * cgo.Zoom - 1) || (dwFlags & C4GM_XRel))
219  if (Inside<float>((iMsgY - cgo.Y) * newzoom, 0, cgo.Hgt * cgo.Zoom - 1) || (dwFlags & C4GM_YRel))
220  {
221  // if the message is attached to an object and the object
222  // is invisible for that player, the message won't be drawn
223  if (Type == C4GM_Target)
224  if (!Target->IsVisible(iPlayer, false))
225  return;
226  // Word wrap to cgo width
227  StdStrBuf sText;
228  if (~dwFlags & C4GM_NoBreak)
229  {
230  // standard break width
231  int breakWdt = Clamp<int32_t>(cgo.Wdt * cgo.Zoom, 50, 200);
232 
233  // user supplied width?
234  if (Wdt)
235  breakWdt = Wdt;
236 
237  ::GraphicsResource.FontRegular.BreakMessage(Text.getData(), breakWdt, &sText, true);
238  }
239  else
240  sText.Ref(Text);
241 
242  // vertical placement
243  if (dwFlags & C4GM_Bottom)
244  iMsgY += Hgt; // iTHgt will be substracted below
245  else if (dwFlags & C4GM_Top)
246  ;
247  else if (dwFlags & C4GM_VCenter)
248  iMsgY += Hgt / 2;
249 
250  // horizontal placement
251  int alignment = ACenter;
252 
253  if (dwFlags & C4GM_Left)
254  alignment = ALeft;
255  else if (dwFlags & C4GM_Right)
256  {
257  alignment = ARight;
258  iMsgX += Wdt;
259  }
260  else if (dwFlags & C4GM_HCenter)
261  iMsgX += Wdt / 2;
262 
263  // calculate display position and adjust position by output boundaries
264  float iTX, iTY;
265  iTX = (iMsgX - cgo.X) * newzoom;
266  iTY = (iMsgY - cgo.Y) * newzoom;
267  int iTWdt, iTHgt;
268  ::GraphicsResource.FontRegular.GetTextExtent(sText.getData(),iTWdt,iTHgt,true);
269 
270  // adjust zoom if needed
271  float zoom = 1.0;
272  if(dwFlags & C4GM_Zoom)
273  zoom = cgo.Zoom;
274 
275  if (dwFlags & C4GM_Bottom)
276  iTY -= zoom * float(iTHgt);
277  else if (dwFlags & C4GM_VCenter)
278  iTY -= zoom * float(iTHgt/2);
279  else if (~dwFlags & C4GM_Top)
280  iTY -= zoom * float(iTHgt); // above object is standard
281 
282  if (dwFlags & C4GM_Right)
283  iTX += 0.25f * float(iTWdt) * (1.0f - zoom);
284 
285  // adjustment for objects at border of screen?
286  // +0.5f for proper rounding; avoids oscillations near pixel border:
287  if (~dwFlags & C4GM_XRel) iTX = Clamp<float>(iTX, iTWdt/2, cgo.Wdt * cgo.Zoom - iTWdt / 2) + 0.5f;
288  if (~dwFlags & C4GM_YRel) iTY = Clamp<float>(iTY, 0, cgo.Hgt * cgo.Zoom - iTHgt) + 0.5f;
289 
290  // Draw
292  cgo.Surface,
293  cgo.X + iTX,
294  cgo.Y + iTY,
295  ColorDw, alignment);
296  return;
297  }
298  }
299 }
300 
302 {
303  // frame deco might be using updated/deleted def
304  if (pFrameDeco)
305  {
306  if (!pFrameDeco->UpdateGfx())
307  {
308  delete pFrameDeco;
309  pFrameDeco = nullptr;
310  }
311  }
312 }
313 
315 {
316  Default();
317 }
318 
320 {
321  Clear();
322 }
323 
325 {
326  First=nullptr;
327 }
328 
330 {
331  C4GameMessage *cmsg,*next,*prev=nullptr;
332  for (cmsg=First; cmsg; cmsg=next)
333  {
334  next=cmsg->Next;
335  if (cmsg->Target==pObj)
336  { delete cmsg; if (prev) prev->Next=next; else First=next; }
337  else
338  prev=cmsg;
339  }
340 }
341 
343 {
344  C4GameMessage *cmsg,*next;
345  for (cmsg=First; cmsg; cmsg=next)
346  {
347  next=cmsg->Next;
348  delete cmsg;
349  }
350  First=nullptr;
351 }
352 
354 {
355  C4GameMessage *cmsg,*next,*prev=nullptr;
356  for (cmsg=First; cmsg; cmsg=next)
357  {
358  next=cmsg->Next;
359  if (!cmsg->Execute())
360  { delete cmsg; if (prev) prev->Next=next; else First=next; }
361  else
362  prev=cmsg;
363  }
364 }
365 
366 bool C4GameMessageList::New(int32_t iType, const char *szText, C4Object *pTarget, int32_t iPlayer, int32_t iX, int32_t iY, uint32_t dwClr, C4ID idDecoID, C4PropList *pSrc, uint32_t dwFlags, int32_t width)
367 {
368  return New(iType, StdStrBuf(szText), pTarget, iPlayer, iX, iY, dwClr, idDecoID, pSrc, dwFlags, width);
369 }
370 
371 bool C4GameMessageList::New(int32_t iType, const StdStrBuf & sText, C4Object *pTarget, int32_t iPlayer, int32_t iX, int32_t iY, uint32_t dwClr, C4ID idDecoID, C4PropList *pSrc, uint32_t dwFlags, int32_t width)
372 {
373  if (!(dwFlags & C4GM_Multiple))
374  {
375  // Clear messages with same target
376  if (pTarget) ClearPointers(pTarget);
377 
378  // Clear other global messages for the given player
379  if (iType == C4GM_Global || iType == C4GM_GlobalPlayer) ClearPlayers(iPlayer, dwFlags & C4GM_PositioningFlags);
380  }
381 
382  // Object deleted?
383  if (pTarget && !pTarget->Status) return false;
384 
385  // Empty message? (only deleting old message)
386  if (!sText.getLength()) return true;
387 
388  // Add new message
389  C4GameMessage *msgNew = new C4GameMessage;
390  msgNew->Init(iType, sText,pTarget,iPlayer,iX,iY,dwClr, idDecoID, pSrc, dwFlags, width);
391  msgNew->Next=First;
392  First=msgNew;
393 
394  return true;
395 }
396 
397 bool C4GameMessageList::Append(int32_t iType, const char *szText, C4Object *pTarget, int32_t iPlayer, int32_t iX, int32_t iY, uint32_t bCol, bool fNoDuplicates)
398 {
399  C4GameMessage *cmsg = nullptr;
400  if (iType == C4GM_Target)
401  {
402  for (cmsg=::Messages.First; cmsg; cmsg=cmsg->Next)
403  if (pTarget == cmsg->Target)
404  break;
405  }
406  if (iType == C4GM_Global || iType == C4GM_GlobalPlayer)
407  {
408  for (cmsg=::Messages.First; cmsg; cmsg=cmsg->Next)
409  if (iPlayer == cmsg->Player)
410  break;
411  }
412  if (!cmsg || pTarget!=cmsg->Target)
413  {
414  New(iType, szText, pTarget, iPlayer, iX, iY, bCol);
415  }
416  else
417  {
418  cmsg->Append(szText, fNoDuplicates);
419  }
420  return true;
421 }
422 
423 void C4GameMessageList::ClearPlayers(int32_t iPlayer, int32_t dwPositioningFlags)
424 {
425  C4GameMessage *cmsg,*next,*prev=nullptr;
426  for (cmsg=First; cmsg; cmsg=next)
427  {
428  next=cmsg->Next;
429  if ( (cmsg->Type == C4GM_Global || cmsg->Type == C4GM_GlobalPlayer) && cmsg->Player==iPlayer && cmsg->GetPositioningFlags() == dwPositioningFlags)
430  { delete cmsg; if (prev) prev->Next=next; else First=next; }
431  else
432  prev=cmsg;
433  }
434 }
435 
437 {
438  C4GameMessage *cmsg;
439  for (cmsg=First; cmsg; cmsg=cmsg->Next) cmsg->UpdateDef(idUpdDef);
440 }
441 
442 void C4GameMessageList::Draw(C4TargetFacet &gui_cgo, C4TargetFacet &cgo, int32_t iPlayer)
443 {
444  C4GameMessage *cmsg;
445  for (cmsg=First; cmsg; cmsg=cmsg->Next)
446  {
447  if ((cmsg->Target && (cmsg->Target->Category & C4D_Foreground)) || cmsg->Type == C4GM_Global || cmsg->Type == C4GM_GlobalPlayer)
448  cmsg->Draw(gui_cgo,iPlayer);
449  else
450  cmsg->Draw(cgo,iPlayer);
451  }
452 }
453 
454 void GameMsgObjectError(const char *szText, C4Object *pTarget, bool Red)
455 {
456  ::Messages.New(C4GM_TargetPlayer,szText,pTarget,pTarget->Controller,0,0, Red ? C4RGB(0xca, 0, 0) : C4RGB(0xff, 0xff, 0xff));
457 }
458 
const char * getData() const
Definition: StdBuf.h:450
int32_t PictureIndent
void UpdateDef(C4ID idUpdDef)
void ClearPointers(C4Object *pObj)
const int32_t C4GM_Multiple
Definition: C4GameMessage.h:36
float Y
Definition: C4Facet.h:120
float Zoom
Definition: C4Facet.h:167
const int32_t GlobalMsgDelayFactor
bool GetProperty(C4PropertyName k, C4Value *pResult) const
Definition: C4PropList.h:103
C4Game Game
Definition: C4Globals.cpp:52
const int32_t C4GM_PositioningFlags
Definition: C4GameMessage.h:48
void DrawPicture(C4Facet &cgo, bool fSelected=false, C4DrawTransform *transform=nullptr)
Definition: C4Object.cpp:2343
const int32_t C4GM_Top
Definition: C4GameMessage.h:37
const int32_t C4GM_YRel
Definition: C4GameMessage.h:45
bool TextOut(const char *szText, CStdFont &rFont, float fZoom, C4Surface *sfcDest, float iTx, float iTy, DWORD dwFCol=0xffffffff, BYTE byForm=ALeft, bool fDoMarkup=true)
Definition: C4Draw.cpp:570
void Draw(C4TargetFacet &cgo, C4Rect &rcDrawArea)
const int ARight
Definition: C4Surface.h:43
Definition: C4Rect.h:29
bool SetByDef(C4Def *pSrcDef)
void Set0()
Definition: C4Value.h:336
const int32_t C4GM_XRel
Definition: C4GameMessage.h:44
bool GetTextExtent(const char *szText, int32_t &rsx, int32_t &rsy, bool fCheckMarkup=true)
void GameMsgObjectError(const char *szText, C4Object *pTarget, bool Red)
size_t SLen(const char *sptr)
Definition: Standard.h:78
int32_t GetTextWidth(const char *szText, bool fCheckMarkup=true)
Definition: C4FontLoader.h:147
C4GraphicsResource GraphicsResource
const int32_t C4GM_TargetPlayer
Definition: C4GameMessage.h:32
StdCopyStrBuf Text
Definition: C4GameMessage.h:64
const int32_t C4GM_NoBreak
Definition: C4GameMessage.h:34
virtual C4Object * GetObject()
Definition: C4PropList.cpp:644
const int32_t C4GM_Bottom
Definition: C4GameMessage.h:35
void AppendFormat(const char *szFmt,...) GNUC_FORMAT_ATTRIBUTE_O
Definition: StdBuf.cpp:197
virtual C4Def const * GetDef() const
Definition: C4PropList.cpp:662
int32_t Wdt
Definition: C4Rect.h:32
const int32_t C4GM_Zoom
Definition: C4GameMessage.h:46
C4Shape Shape
Definition: C4Def.h:106
C4Def * Def
Definition: C4Object.h:143
bool Append(int32_t iType, const char *szText, C4Object *pTarget, int32_t iPlayer, int32_t iX, int32_t iY, uint32_t bCol, bool fNoDuplicates=false)
int32_t y
Definition: C4Rect.h:32
const int32_t C4GM_MinDelay
Definition: C4GameMessage.h:27
const int ACenter
Definition: C4Surface.h:43
int32_t Player
Definition: C4GameMessage.h:61
C4GUI::FrameDecoration * pFrameDeco
Definition: C4GameMessage.h:69
const int32_t C4GM_Right
Definition: C4GameMessage.h:39
int32_t PictureWidth
const int32_t ObjectMsgDelayFactor
void Draw(C4Facet &cgo, bool fSelected=false, DWORD iColor=0, C4Object *pObj=nullptr, int32_t iPhaseX=0, int32_t iPhaseY=0, C4DrawTransform *trans=nullptr, const char *graphicsName=nullptr)
Definition: C4Def.cpp:601
const int32_t C4GM_VCenter
Definition: C4GameMessage.h:41
const int32_t C4GM_GlobalPlayer
Definition: C4GameMessage.h:30
const int32_t C4GM_Target
Definition: C4GameMessage.h:31
C4Draw * pDraw
Definition: C4Draw.cpp:45
#define C4RGB(r, g, b)
Definition: StdColors.h:28
int32_t Status
Definition: C4PropList.h:170
void Append(const char *szText, bool fNoDuplicates=false)
Definition: C4Id.h:28
void Init(int32_t iType, const StdStrBuf &Text, C4Object *pTarget, int32_t iPlayer, int32_t iX, int32_t iY, uint32_t dwCol, C4ID idDecoID, C4PropList *pSrc, uint32_t dwFlags, int width)
std::tuple< std::string, int > BreakMessage(const char *szMsg, int iWdt, bool fCheckMarkup, float fZoom=1.0f)
int32_t Category
Definition: C4Object.h:113
int32_t getInt() const
Definition: C4Value.h:112
int32_t x
Definition: C4Rect.h:32
void Ref(const char *pnData)
Definition: StdBuf.h:463
int32_t DrawMessageOffset
int32_t GetPositioningFlags() const
Definition: C4GameMessage.h:79
float TargetX
Definition: C4Facet.h:167
void ClearPlayers(int32_t iPlayer, int32_t dwPositioningFlags)
void UpdateDef(C4ID idUpdDef)
float Hgt
Definition: C4Facet.h:120
const int32_t C4GM_WidthRel
Definition: C4GameMessage.h:43
const int32_t C4GM_Global
Definition: C4GameMessage.h:29
C4Value PictureDefVal
Definition: C4GameMessage.h:68
void Shrink(size_t iShrink)
Definition: StdBuf.h:511
const int ALeft
Definition: C4Surface.h:43
C4GameMessage * First
Definition: C4GameMessage.h:88
bool SEqual2(const char *szStr1, const char *szStr2)
Definition: Standard.cpp:175
C4GameMessage * Next
Definition: C4GameMessage.h:65
const int32_t C4GM_HCenter
Definition: C4GameMessage.h:40
void Draw(C4TargetFacet &cgo, int32_t iPlayer)
size_t getLength() const
Definition: StdBuf.h:453
void SetPropList(C4PropList *PropList)
Definition: C4Value.h:141
int32_t Hgt
Definition: C4Rect.h:32
C4GameMessageList Messages
void Move(size_t iFrom, size_t inSize, size_t iTo=0)
Definition: StdBuf.h:479
C4Surface * Surface
Definition: C4Facet.h:119
float TargetY
Definition: C4Facet.h:167
const char * SAdvancePast(const char *szSPos, char cPast)
Definition: Standard.cpp:409
bool DrawPropListSpecImage(C4Facet &fctTarget, C4PropList *pSpec)
Definition: C4Game.cpp:3795
const int32_t C4GM_Left
Definition: C4GameMessage.h:38
int32_t Controller
Definition: C4Object.h:111
C4Object * Target
Definition: C4GameMessage.h:63
void Copy()
Definition: StdBuf.h:475
float Wdt
Definition: C4Facet.h:120
C4PropList * GetPropertyPropList(C4PropertyName k) const
Definition: C4PropList.cpp:877
float X
Definition: C4Facet.h:120
C4PropList * PictureDef
Definition: C4GameMessage.h:67
const int32_t C4D_Foreground
Definition: C4Def.h:55
bool IsVisible(int32_t iForPlr, bool fAsOverlay) const
Definition: C4Object.cpp:4054
bool New(int32_t iType, const StdStrBuf &Text, C4Object *pTarget, int32_t iPlayer, int32_t iX=-1, int32_t iY=-1, uint32_t dwClr=0xffFFFFFF, C4ID idDecoID=C4ID::None, C4PropList *pSrc=nullptr, uint32_t dwFlags=0u, int32_t width=0)
void Draw(C4TargetFacet &gui_cgo, C4TargetFacet &cgo, int32_t iPlayer)
uint32_t dwFlags
Definition: C4GameMessage.h:70
bool GetDrawPosition(const C4TargetFacet &cgo, float &resultx, float &resulty, float &resultzoom) const
Definition: C4Object.cpp:4337