All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4MessageInput.cpp File Reference
Include dependency graph for C4MessageInput.cpp:

Go to the source code of this file.


bool IsSmallInputQuery (const char *szInputQuery)


C4MessageInput MessageInput

Function Documentation

bool IsSmallInputQuery ( const char *  szInputQuery)

Definition at line 39 of file C4MessageInput.cpp.

References C4GUI::GetScreenWdt(), CStdFont::GetTextExtent(), GraphicsResource, SCharCount(), and C4GraphicsResource::TextFont.

40 {
41  if (!szInputQuery) return true;
42  int32_t w,h;
43  if (SCharCount('|', szInputQuery)) return false;
44  if (!::GraphicsResource.TextFont.GetTextExtent(szInputQuery, w,h, true))
45  return false; // ???
46  return w<C4GUI::GetScreenWdt()/5;
47 }
int32_t GetScreenWdt()
Definition: C4Gui.h:2821
bool GetTextExtent(const char *szText, int32_t &rsx, int32_t &rsy, bool fCheckMarkup=true)
C4GraphicsResource GraphicsResource
unsigned int SCharCount(char cTarget, const char *szInStr, const char *cpUntil)
Definition: Standard.cpp:298

Here is the call graph for this function:

Variable Documentation