OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4ConfigControls Class Reference

#include <C4Config.h>

Collaboration diagram for C4ConfigControls:
[legend]

Public Member Functions

void CompileFunc (StdCompiler *pComp)
 
void ResetKeys ()
 

Public Attributes

int32_t GamepadGuiControl
 
int32_t MouseAutoScroll
 
C4PlayerControlAssignmentSets UserSets
 

Detailed Description

Definition at line 226 of file C4Config.h.

Member Function Documentation

void C4ConfigControls::CompileFunc ( StdCompiler pComp)

Definition at line 258 of file C4Config.cpp.

References StdCompiler::Default(), GamepadGuiControl, StdCompiler::isSerializer(), mkNamingAdapt(), MouseAutoScroll, UserSets, and StdCompiler::Value().

259 {
260 #ifndef USE_CONSOLE
261  if (pComp->isSerializer())
262  {
263  // The registry compiler is broken with arrays. It doesn't delete extra items if the config got shorter
264  // Solve it by defaulting the array before writing to it.
265  pComp->Default("UserSets");
266  }
268  pComp->Value(mkNamingAdapt(MouseAutoScroll, "MouseAutoScroll", 0 /* change default 33 to enable */ ));
269  pComp->Value(mkNamingAdapt(GamepadGuiControl, "GamepadGuiControl", 0, false, true));
270 #endif
271 }
int32_t MouseAutoScroll
Definition: C4Config.h:230
StdNamingAdapt< T > mkNamingAdapt(T &&rValue, const char *szName)
Definition: StdAdaptors.h:92
bool isSerializer()
Definition: StdCompiler.h:54
void Value(const T &rStruct)
Definition: StdCompiler.h:161
int32_t GamepadGuiControl
Definition: C4Config.h:229
virtual bool Default(const char *szName)
Definition: StdCompiler.h:88
C4PlayerControlAssignmentSets UserSets
Definition: C4Config.h:231

Here is the call graph for this function:

void C4ConfigControls::ResetKeys ( )

Definition at line 639 of file C4Config.cpp.

References C4PlayerControlAssignmentSets::Clear(), and UserSets.

640 {
641  UserSets.Clear();
642 }
C4PlayerControlAssignmentSets UserSets
Definition: C4Config.h:231

Here is the call graph for this function:

Member Data Documentation

int32_t C4ConfigControls::MouseAutoScroll

Definition at line 230 of file C4Config.h.

Referenced by C4Viewport::AdjustPosition(), and CompileFunc().

C4PlayerControlAssignmentSets C4ConfigControls::UserSets

Definition at line 231 of file C4Config.h.

Referenced by CompileFunc(), C4Game::InitPlayerControlUserSettings(), and ResetKeys().


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