OpenClonk
C4KeyEventData Struct Reference

#include <C4KeyboardInput.h>

Public Types

enum  { KeyPos_None = 0x7fffff }
 

Public Member Functions

 C4KeyEventData ()=default
 
 C4KeyEventData (int32_t iStrength, int32_t game_x, int32_t game_y, int32_t vp_x, int32_t vp_y)
 
void CompileFunc (StdCompiler *pComp)
 
bool operator== (const struct C4KeyEventData &cmp) const
 

Public Attributes

int32_t iStrength {0}
 
int32_t game_x {KeyPos_None}
 
int32_t game_y {KeyPos_None}
 
int32_t vp_x {KeyPos_None}
 
int32_t vp_y {KeyPos_None}
 

Detailed Description

Definition at line 243 of file C4KeyboardInput.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
KeyPos_None 

Definition at line 245 of file C4KeyboardInput.h.

245 { KeyPos_None = 0x7fffff }; // value used to denote invalid/none key positions

Constructor & Destructor Documentation

◆ C4KeyEventData() [1/2]

C4KeyEventData::C4KeyEventData ( )
default

◆ C4KeyEventData() [2/2]

C4KeyEventData::C4KeyEventData ( int32_t  iStrength,
int32_t  game_x,
int32_t  game_y,
int32_t  vp_x,
int32_t  vp_y 
)
inline

Definition at line 249 of file C4KeyboardInput.h.

References C4KeyCodeEx::CompileFunc(), and C4KeyCodeEx::operator==().

Here is the call graph for this function:

Member Function Documentation

◆ CompileFunc()

void C4KeyEventData::CompileFunc ( StdCompiler pComp)

Definition at line 590 of file C4KeyboardInput.cpp.

References StdCompiler::Separator(), and StdCompiler::Value().

591 {
592  pComp->Value(iStrength);
593  pComp->Separator();
594  pComp->Value(game_x);
595  pComp->Separator();
596  pComp->Value(game_y);
597  pComp->Separator();
598  pComp->Value(vp_x);
599  pComp->Separator();
600  pComp->Value(vp_y);
601 }
virtual bool Separator(Sep eSep=SEP_SEP)
Definition: StdCompiler.h:119
void Value(const T &rStruct)
Definition: StdCompiler.h:161
Here is the call graph for this function:

◆ operator==()

bool C4KeyEventData::operator== ( const struct C4KeyEventData cmp) const

Definition at line 603 of file C4KeyboardInput.cpp.

References game_x, game_y, iStrength, vp_x, and vp_y.

604 {
605  return iStrength == cmp.iStrength
606  && game_x == cmp.game_x && game_y == cmp.game_y
607  && vp_x == cmp.vp_x && vp_y == cmp.vp_y;
608 
609 }

Member Data Documentation

◆ game_x

◆ game_y

◆ iStrength

◆ vp_x

◆ vp_y


The documentation for this struct was generated from the following files: