OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4MessageInput.cpp File Reference
#include "C4Include.h"
#include "gui/C4MessageInput.h"
#include "game/C4Game.h"
#include "object/C4Object.h"
#include "gui/C4Gui.h"
#include "editor/C4Console.h"
#include "game/C4Application.h"
#include "lib/C4Log.h"
#include "player/C4Player.h"
#include "gui/C4GameLobby.h"
#include "game/C4GraphicsSystem.h"
#include "player/C4PlayerList.h"
#include "control/C4GameControl.h"
#include "graphics/C4GraphicsResource.h"
Include dependency graph for C4MessageInput.cpp:

Go to the source code of this file.

Functions

bool IsSmallInputQuery (const char *szInputQuery)
 

Variables

C4MessageInput MessageInput
 

Function Documentation

bool IsSmallInputQuery ( const char *  szInputQuery)

Definition at line 41 of file C4MessageInput.cpp.

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

42 {
43  if (!szInputQuery) return true;
44  int32_t w,h;
45  if (SCharCount('|', szInputQuery)) return false;
46  if (!::GraphicsResource.TextFont.GetTextExtent(szInputQuery, w,h, true))
47  return false; // ???
48  return w<C4GUI::GetScreenWdt()/5;
49 }
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:290

Here is the call graph for this function:

Variable Documentation