C4ConfigControls Class Reference

#include <C4Config.h>

Collaboration diagram for C4ConfigControls:

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

◆ CompileFunc()

void C4ConfigControls::CompileFunc ( StdCompiler pComp)

Definition at line 258 of file C4Config.cpp.

References StdCompiler::Default(), StdCompiler::isSerializer(), mkNamingAdapt(), 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:

◆ ResetKeys()

void C4ConfigControls::ResetKeys ( )

Definition at line 639 of file C4Config.cpp.

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

Member Data Documentation

◆ GamepadGuiControl

◆ MouseAutoScroll

int32_t C4ConfigControls::MouseAutoScroll

Definition at line 230 of file C4Config.h.

Referenced by C4Viewport::AdjustPosition().

◆ UserSets

C4PlayerControlAssignmentSets C4ConfigControls::UserSets

Definition at line 231 of file C4Config.h.

Referenced by C4Game::InitPlayerControlUserSettings().

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