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

#include <C4PlayerControl.h>

Public Types

enum  TriggerModes {
  CTM_Default = 0, CTM_Hold = 1 << 0, CTM_Release = 1 << 1, CTM_AlwaysUnhandled = 1 << 2,
  CTM_HandleDownStatesOnly = 1 << 3, CTM_ClearRecentKeys = 1 << 4
}
 

Public Member Functions

 C4PlayerControlAssignment ()
 
 ~C4PlayerControlAssignment ()
 
void CompileFunc (StdCompiler *pComp)
 
void CopyKeyFrom (const C4PlayerControlAssignment &src_assignment)
 
bool ResolveRefs (class C4PlayerControlAssignmentSet *pParentSet, C4PlayerControlDefs *pControlDefs)
 
bool IsComboMatched (const C4PlayerControlRecentKeyList &DownKeys, const C4PlayerControlRecentKeyList &RecentKeys) const
 
void SetInherited (bool to_val)
 
void SetInheritedAssignment (const C4PlayerControlAssignment *to_val)
 
void ResetKeyToInherited ()
 
bool IsKeyChanged () const
 
void SetControlName (const char *control_name)
 
void SetKey (const C4KeyCodeEx &key)
 
bool operator== (const C4PlayerControlAssignment &cmp) const
 
bool operator< (const C4PlayerControlAssignment &cmp) const
 
const char * GetControlName () const
 
int32_t GetControl () const
 
const char * GetGUIName (const C4PlayerControlDefs &defs) const
 
const char * GetGUIDesc (const C4PlayerControlDefs &defs) const
 
bool IsGUIDisabled () const
 
int32_t GetGUIGroup () const
 
bool IsRefsResolved () const
 
void ResetRefsResolved ()
 
bool IsAlwaysUnhandled () const
 
int32_t GetTriggerMode () const
 
const C4KeyCodeExGetTriggerKey () const
 
bool HasCombo () const
 
bool IsOverrideAssignments () const
 
bool IsInherited () const
 
const C4PlayerControlAssignmentGetInheritedAssignment () const
 
StdStrBuf GetKeysAsString (bool human_readable, bool short_name) const
 

Detailed Description

Definition at line 145 of file C4PlayerControl.h.

Member Enumeration Documentation

Enumerator
CTM_Default 
CTM_Hold 
CTM_Release 
CTM_AlwaysUnhandled 
CTM_HandleDownStatesOnly 
CTM_ClearRecentKeys 

Definition at line 149 of file C4PlayerControl.h.

150  {
151  CTM_Default = 0, // standard behaviour: The control will be triggered
152  CTM_Hold = 1 << 0, // the control will be put into "down"-mode
153  CTM_Release = 1 << 1, // the hold mode of the control will be released
154  CTM_AlwaysUnhandled = 1 << 2, // the key will not block handling of other keys even if it got handled
155  CTM_HandleDownStatesOnly = 1 << 3, // used when an already handled release key is processed to reset down states of overridden keys only
156  CTM_ClearRecentKeys = 1 << 4 // if this assignment is triggered, RecentKeys are reset so no more combos can be generated
157  };

Constructor & Destructor Documentation

C4PlayerControlAssignment::C4PlayerControlAssignment ( )
inline

Definition at line 193 of file C4PlayerControl.h.

193  :
194  TriggerKey(), fOverrideAssignments(false), is_inherited(false), fRefsResolved(false),
195  iGUIGroup(0), iControl(CON_None), iPriority(0), iTriggerMode(CTM_Default),
196  inherited_assignment(nullptr)
197  {}
C4PlayerControlAssignment::~C4PlayerControlAssignment ( )
inline

Definition at line 198 of file C4PlayerControl.h.

198 {}

Member Function Documentation

void C4PlayerControlAssignment::CompileFunc ( StdCompiler pComp)

Definition at line 214 of file C4PlayerControl.cpp.

References CTM_AlwaysUnhandled, CTM_ClearRecentKeys, CTM_Default, CTM_Hold, CTM_Release, StdCompiler::excNotFound(), StdCompiler::isDeserializer(), mkNamingAdapt(), mkParAdapt(), mkSTLContainerAdapt(), StdCompiler::Name(), StdCompiler::NameEnd(), StdCompiler::RCT_All, StdCompiler::RCT_Idtf, and StdCompiler::Value().

215 {
216  if (!pComp->Name("Assignment")) { pComp->NameEnd(); pComp->excNotFound("Assignment"); }
217  pComp->Value(mkNamingAdapt(mkSTLContainerAdapt(KeyCombo), "Key", KeyComboVec()));
218  pComp->Value(mkNamingAdapt(fComboIsSequence, "ComboIsSequence", false));
219  pComp->Value(mkNamingAdapt(mkParAdapt(sControlName, StdCompiler::RCT_Idtf), "Control", "None"));
220  pComp->Value(mkNamingAdapt(mkParAdapt(sGUIName, StdCompiler::RCT_All), "GUIName", ""));
221  pComp->Value(mkNamingAdapt(mkParAdapt(sGUIDesc, StdCompiler::RCT_All), "GUIDesc", ""));
222  pComp->Value(mkNamingAdapt(iGUIGroup,"GUIGroup",0));
223  pComp->Value(mkNamingAdapt(fGUIDisabled, "GUIDisabled", false));
224  pComp->Value(mkNamingAdapt(iPriority, "Priority", 0));
225  const StdBitfieldEntry<int32_t> TriggerModeNames[] =
226  {
227  { "Default", CTM_Default },
228  { "Hold", CTM_Hold },
229  { "Release", CTM_Release },
230  { "AlwaysUnhandled", CTM_AlwaysUnhandled },
231  { "ClearRecentKeys", CTM_ClearRecentKeys },
232  { nullptr, 0 }
233  };
234  pComp->Value(mkNamingAdapt(mkBitfieldAdapt< int32_t>(iTriggerMode, TriggerModeNames), "TriggerMode", CTM_Default));
235  pComp->Value(mkNamingAdapt(fOverrideAssignments, "OverrideAssignments", false));
236  pComp->NameEnd();
237  // newly loaded structures are not resolved
238  if (pComp->isDeserializer()) fRefsResolved = false;
239 }
Definition: StdAdaptors.h:848
virtual bool Name(const char *szName)
Definition: StdCompiler.h:87
StdNamingAdapt< T > mkNamingAdapt(T &&rValue, const char *szName)
Definition: StdAdaptors.h:93
void excNotFound(const char *szMessage,...)
Definition: StdCompiler.h:243
void Value(const T &rStruct)
Definition: StdCompiler.h:171
virtual bool isDeserializer()
Definition: StdCompiler.h:63
StdSTLContainerAdapt< C > mkSTLContainerAdapt(C &rTarget, StdCompiler::Sep eSep=StdCompiler::SEP_SEP)
Definition: StdAdaptors.h:679
StdParameterAdapt< T, P > mkParAdapt(T &&rObj, P &&rPar)
Definition: StdAdaptors.h:456
virtual void NameEnd(bool fBreak=false)
Definition: StdCompiler.h:88

Here is the call graph for this function:

void C4PlayerControlAssignment::CopyKeyFrom ( const C4PlayerControlAssignment src_assignment)

Definition at line 265 of file C4PlayerControl.cpp.

Referenced by ResetKeyToInherited().

266 {
267  // just copy key settings; keep control and priorities
268  KeyCombo = src_assignment.KeyCombo;
269  TriggerKey = src_assignment.TriggerKey;
270  fComboIsSequence = src_assignment.fComboIsSequence;
271  if (!src_assignment.fRefsResolved) fRefsResolved = false;
272 }

Here is the caller graph for this function:

int32_t C4PlayerControlAssignment::GetControl ( ) const
inline

Definition at line 214 of file C4PlayerControl.h.

Referenced by C4PlayerControlAssignmentSet::GetAssignmentsByKey(), GetGUIDesc(), GetGUIName(), and C4PlayerControlAssignmentSet::GetTriggerKeys().

214 { return iControl; }

Here is the caller graph for this function:

const char* C4PlayerControlAssignment::GetControlName ( ) const
inline

Definition at line 213 of file C4PlayerControl.h.

References StdStrBuf::getData().

Referenced by C4PlayerControlAssignmentSet::MergeFrom(), and ResolveRefs().

213 { return sControlName.getData(); }
const char * getData() const
Definition: StdBuf.h:450

Here is the call graph for this function:

Here is the caller graph for this function:

const char * C4PlayerControlAssignment::GetGUIDesc ( const C4PlayerControlDefs defs) const

Definition at line 468 of file C4PlayerControl.cpp.

References GetControl(), C4PlayerControlDefs::GetControlByIndex(), StdStrBuf::getData(), C4PlayerControlDef::GetGUIDesc(), and StdStrBuf::getLength().

469 {
470  // local desc?
471  if (sGUIDesc.getLength()) return sGUIDesc.getData();
472  // otherwise, fall back to def
473  const C4PlayerControlDef *def = defs.GetControlByIndex(GetControl());
474  if (def) return def->GetGUIDesc();
475  // no def and no desc...
476  return nullptr;
477 }
const char * getData() const
Definition: StdBuf.h:450
const C4PlayerControlDef * GetControlByIndex(int32_t idx) const
const char * GetGUIDesc() const
size_t getLength() const
Definition: StdBuf.h:453
int32_t GetControl() const

Here is the call graph for this function:

int32_t C4PlayerControlAssignment::GetGUIGroup ( ) const

Definition at line 484 of file C4PlayerControl.cpp.

485 {
486  return iGUIGroup;
487 }
const char * C4PlayerControlAssignment::GetGUIName ( const C4PlayerControlDefs defs) const

Definition at line 452 of file C4PlayerControl.cpp.

References GetControl(), C4PlayerControlDefs::GetControlByIndex(), StdStrBuf::getData(), C4PlayerControlDef::GetGUIName(), and StdStrBuf::getLength().

453 {
454  // local name?
455  if (sGUIName.getLength())
456  {
457  // special: None defaults to empty name
458  if (sGUIName == "None") return "";
459  return sGUIName.getData();
460  }
461  // otherwise, fall back to def
462  const C4PlayerControlDef *def = defs.GetControlByIndex(GetControl());
463  if (def) return def->GetGUIName();
464  // no def and no name...
465  return nullptr;
466 }
const char * getData() const
Definition: StdBuf.h:450
const char * GetGUIName() const
const C4PlayerControlDef * GetControlByIndex(int32_t idx) const
size_t getLength() const
Definition: StdBuf.h:453
int32_t GetControl() const

Here is the call graph for this function:

const C4PlayerControlAssignment* C4PlayerControlAssignment::GetInheritedAssignment ( ) const
inline

Definition at line 227 of file C4PlayerControl.h.

227 { return inherited_assignment; }
StdStrBuf C4PlayerControlAssignment::GetKeysAsString ( bool  human_readable,
bool  short_name 
) const

Definition at line 434 of file C4PlayerControl.cpp.

References StdStrBuf::Append(), StdStrBuf::AppendChar(), and StdStrBuf::Take().

435 {
436  // create a short, human-readable string of the assigned key
437  // to be displayed e.g. in tutorial messages explaining controls
438  StdStrBuf result;
439  if (!KeyCombo.size()) return result;
440  // trigger key
441  KeyComboVec::const_iterator i=KeyCombo.begin();
442  result.Take(i->Key.ToString(human_readable, short_name));
443  // extra keys of combo
444  while (++i != KeyCombo.end())
445  {
446  result.AppendChar(fComboIsSequence ? ',' : '+');
447  result.Append(i->Key.ToString(human_readable, short_name));
448  }
449  return result;
450 }
void AppendChar(char cChar)
Definition: StdBuf.h:596
void Take(char *pnData)
Definition: StdBuf.h:465
void Append(const char *pnData, size_t iChars)
Definition: StdBuf.h:527

Here is the call graph for this function:

const C4KeyCodeEx& C4PlayerControlAssignment::GetTriggerKey ( ) const
inline

Definition at line 223 of file C4PlayerControl.h.

Referenced by C4PlayerControlAssignmentSet::GetAssignmentsByKey(), and C4PlayerControlAssignmentSet::GetTriggerKeys().

223 { return TriggerKey; }

Here is the caller graph for this function:

int32_t C4PlayerControlAssignment::GetTriggerMode ( ) const
inline

Definition at line 222 of file C4PlayerControl.h.

Referenced by C4PlayerControlAssignmentSet::GetAssignmentsByKey(), and C4PlayerControlAssignmentSet::MergeFrom().

222 { return iTriggerMode; }

Here is the caller graph for this function:

bool C4PlayerControlAssignment::HasCombo ( ) const
inline

Definition at line 224 of file C4PlayerControl.h.

Referenced by C4PlayerControlAssignmentSet::GetAssignmentsByKey(), and IsComboMatched().

224 { return KeyCombo.size()>1; }

Here is the caller graph for this function:

bool C4PlayerControlAssignment::IsAlwaysUnhandled ( ) const
inline

Definition at line 221 of file C4PlayerControl.h.

References CTM_AlwaysUnhandled.

bool C4PlayerControlAssignment::IsComboMatched ( const C4PlayerControlRecentKeyList DownKeys,
const C4PlayerControlRecentKeyList RecentKeys 
) const

Definition at line 373 of file C4PlayerControl.cpp.

References HasCombo(), C4KeyCodeEx::Key, Key_GetMouseEvent(), Key_IsMouse(), KEY_MOUSE_Move, C4PlayerControlRecentKey::matched_key, C4PlayerControl::MaxSequenceKeyDelay, C4TimeMilliseconds::Now(), and C4PlayerControlRecentKey::tTime.

Referenced by C4PlayerControlAssignmentSet::GetAssignmentsByKey().

374 {
375  assert(HasCombo());
376  // check if combo is currently fulfilled (assuming TriggerKey is already matched)
377  if (fComboIsSequence)
378  {
380  // combo is a sequence: The last keys of RecentKeys must match the sequence
381  // the last ComboKey is the TriggerKey, which is omitted because it has already been matched and is not to be found in RecentKeys yet
382  KeyComboVec::const_reverse_iterator i = KeyCombo.rbegin()+1;
383  for (C4PlayerControlRecentKeyList::const_reverse_iterator ri = RecentKeys.rbegin(); i!=KeyCombo.rend(); ++ri)
384  {
385  // no more keys pressed but combo didn't end? -> no combo match
386  if (ri == RecentKeys.rend()) return false;
387  const C4PlayerControlRecentKey &rk = *ri;
388  // user waited for too long?
389  C4TimeMilliseconds tKeyRecent = rk.tTime;
390  if (tKeyLast - tKeyRecent > C4PlayerControl::MaxSequenceKeyDelay) return false;
391  // key doesn't match?
392  const KeyComboItem &k = *i;
393  if (!(rk.matched_key == k.Key))
394  {
395  // mouse movement commands do not break sequences
397  return false;
398  }
399  // key OK
400  ++i;
401  }
402  }
403  else
404  {
405  // combo requires keys to be down simultanuously: check that all keys of the combo are in the down-list
406  for (KeyComboVec::const_iterator i = KeyCombo.begin(); i!=KeyCombo.end(); ++i)
407  {
408  const KeyComboItem &k = *i;
409  bool fFound = false;
410  for (C4PlayerControlRecentKeyList::const_iterator di = DownKeys.begin(); di!=DownKeys.end(); ++di)
411  {
412  const C4PlayerControlRecentKey &dk = *di;
413  if (dk.matched_key == k.Key) { fFound = true; break; }
414  }
415  if (!fFound) return false;
416  }
417  }
418  // combo OK!
419  return true;
420 }
uint8_t Key_GetMouseEvent(C4KeyCode key)
C4TimeMilliseconds tTime
bool Key_IsMouse(C4KeyCode key)
C4KeyCode Key
const C4KeyCode KEY_MOUSE_Move
static C4TimeMilliseconds Now()

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4PlayerControlAssignment::IsGUIDisabled ( ) const

Definition at line 479 of file C4PlayerControl.cpp.

480 {
481  return fGUIDisabled;
482 }
bool C4PlayerControlAssignment::IsInherited ( ) const
inline

Definition at line 226 of file C4PlayerControl.h.

226 { return is_inherited; }
bool C4PlayerControlAssignment::IsKeyChanged ( ) const

Definition at line 246 of file C4PlayerControl.cpp.

247 {
248  // no inherited assignment? Then the key is always custom
249  if (!inherited_assignment) return true;
250  // otherwise, compare
251  return KeyCombo != inherited_assignment->KeyCombo || fComboIsSequence != inherited_assignment->fComboIsSequence;
252 }
bool C4PlayerControlAssignment::IsOverrideAssignments ( ) const
inline

Definition at line 225 of file C4PlayerControl.h.

Referenced by C4PlayerControlAssignmentSet::MergeFrom().

225 { return fOverrideAssignments; }

Here is the caller graph for this function:

bool C4PlayerControlAssignment::IsRefsResolved ( ) const
inline

Definition at line 219 of file C4PlayerControl.h.

Referenced by ResolveRefs().

219 { return fRefsResolved; }

Here is the caller graph for this function:

bool C4PlayerControlAssignment::operator< ( const C4PlayerControlAssignment cmp) const
inline

Definition at line 212 of file C4PlayerControl.h.

212 { return iPriority > cmp.iPriority; } // assignments are processed in DESCENDING priority!
bool C4PlayerControlAssignment::operator== ( const C4PlayerControlAssignment cmp) const

Definition at line 422 of file C4PlayerControl.cpp.

423 {
424  // doesn't compare resolved TriggerKey/iControl
425  return KeyCombo == cmp.KeyCombo
426  && sControlName == cmp.sControlName
427  && sGUIName == cmp.sGUIName
428  && sGUIDesc == cmp.sGUIDesc
429  && fGUIDisabled == cmp.fGUIDisabled
430  && iTriggerMode == cmp.iTriggerMode
431  && iPriority == cmp.iPriority;
432 }
void C4PlayerControlAssignment::ResetKeyToInherited ( )

Definition at line 241 of file C4PlayerControl.cpp.

References CopyKeyFrom().

242 {
243  if (inherited_assignment) CopyKeyFrom(*inherited_assignment);
244 }
void CopyKeyFrom(const C4PlayerControlAssignment &src_assignment)

Here is the call graph for this function:

void C4PlayerControlAssignment::ResetRefsResolved ( )
inline

Definition at line 220 of file C4PlayerControl.h.

220 { fRefsResolved = false; } // Mark references to other assignments as not resolved
bool C4PlayerControlAssignment::ResolveRefs ( class C4PlayerControlAssignmentSet pParentSet,
C4PlayerControlDefs pControlDefs 
)

Definition at line 274 of file C4PlayerControl.cpp.

References FormatString(), C4PlayerControlAssignmentSet::GetAssignmentByControlName(), C4PlayerControlDefs::GetControlIndexByIdentifier(), GetControlName(), StdStrBuf::getData(), C4PlayerControlAssignmentSet::GetName(), IsRefsResolved(), KEY_Default, KEYS_Control, KEYS_Shift, LogF(), LogFatal(), ResolveRefs(), SCharLastPos(), and SEqual2().

Referenced by ResolveRefs().

275 {
276  // avoid circular chains
277  static int32_t recursion_check = 0;
278  if (recursion_check > 10)
279  {
280  LogFatal(FormatString("Maximum recursion limit reached while resolving player control assignments of set %s in assignment for key %s. This is probably due to a circular control chain.", pParentSet->GetName(), GetControlName()).getData());
281  return false;
282  }
283  ++recursion_check;
284  // resolve control name
285  iControl = pControlDefs->GetControlIndexByIdentifier(sControlName.getData());
286  // resolve keys
287  KeyComboVec NewCombo;
288  for (KeyComboVec::iterator i = KeyCombo.begin(); i != KeyCombo.end(); ++i)
289  {
290  KeyComboItem &rKeyComboItem = *i;
291  const char *szKeyName = rKeyComboItem.sKeyName.getData();
292  // check if this is a key reference. A key reference must be preceded by CON_
293  // it may also be preceded by modifiers (Shift+), which are already set in rKeyComboItem.Key.dwShift
294  bool is_key_reference = false;
295  int last_shift_delim_pos;
296  if (szKeyName && *szKeyName)
297  {
298  if ((last_shift_delim_pos=SCharLastPos('+', szKeyName)) > -1) szKeyName += last_shift_delim_pos+1;
299  if (SEqual2(szKeyName, "CON_"))
300  {
301  is_key_reference = true;
302  szKeyName +=4;
303  }
304  }
305  if (is_key_reference)
306  {
307  // this is a key reference
308  // - find referenced target assignment
309  C4PlayerControlAssignment *pRefAssignment = pParentSet->GetAssignmentByControlName(szKeyName);
310  if (pRefAssignment)
311  {
312  // resolve itself if necessary
313  if (!pRefAssignment->IsRefsResolved()) if (!pRefAssignment->ResolveRefs(pParentSet, pControlDefs)) { --recursion_check; return false; }
314  // insert all keys of that combo into own combo
315  // add any extra shift states from reference
316  DWORD ref_shift = rKeyComboItem.Key.dwShift;
317  if (ref_shift)
318  {
319  for (KeyComboVec::iterator j = pRefAssignment->KeyCombo.begin(); j != pRefAssignment->KeyCombo.end(); ++j)
320  {
321  KeyComboItem assignment_combo_item = *j;
322  assignment_combo_item.Key.dwShift |= ref_shift;
323  NewCombo.push_back(assignment_combo_item);
324  }
325  }
326  else
327  {
328  NewCombo.insert(NewCombo.end(), pRefAssignment->KeyCombo.begin(), pRefAssignment->KeyCombo.end());
329  }
330  }
331  else
332  {
333  // undefined reference? Not fatal, but inform user
334  LogF("WARNING: Control %s of set %s contains reference to unassigned control %s.", GetControlName(), pParentSet->GetName(), rKeyComboItem.sKeyName.getData());
335  NewCombo.clear();
336  }
337  }
338  else
339  {
340  // non-reference: check if the assignment was valid
341 #ifndef USE_CONSOLE
342  if (rKeyComboItem.Key == KEY_Default)
343  LogF("WARNING: Control %s of set %s contains undefined key \"%s\".", GetControlName(), pParentSet->GetName(), szKeyName);
344 #endif
345  // ...and just keep this item.
346  NewCombo.push_back(rKeyComboItem);
347  }
348  }
349  KeyCombo = NewCombo;
350  // adjust Control and Shift into key states for non-sequence combo keys
351  // e.g. LeftControl,A should become LeftControl,Ctrl+A.
352  if (KeyCombo.size() > 1 && !fComboIsSequence)
353  {
354  int32_t shift = 0;
355  for (KeyComboVec::iterator i = KeyCombo.begin(); i != KeyCombo.end(); ++i)
356  {
357  if (i->Key.Key == K_CONTROL_L || i->Key.Key == K_CONTROL_R) shift |= KEYS_Control;
358  if (i->Key.Key == K_SHIFT_L || i->Key.Key == K_SHIFT_R) shift |= KEYS_Shift;
359  shift |= i->Key.dwShift;
360  }
361  for (KeyComboVec::iterator i = KeyCombo.begin(); i != KeyCombo.end(); ++i) i->Key.dwShift |= shift;
362  }
363  // remove control/shift duplications
364  for (KeyComboVec::iterator i = KeyCombo.begin(); i != KeyCombo.end(); ++i) i->Key.FixShiftKeys();
365  // the trigger key is always last of the chain
366  if (KeyCombo.size()) TriggerKey = KeyCombo.back().Key; else TriggerKey = C4KeyCodeEx();
367  // done
368  fRefsResolved = true;
369  --recursion_check;
370  return true;
371 }
const char * getData() const
Definition: StdBuf.h:450
int32_t GetControlIndexByIdentifier(const char *szIdentifier) const
int SCharLastPos(char cTarget, const char *szInStr)
Definition: Standard.cpp:217
const C4KeyCode KEY_Default
bool ResolveRefs(class C4PlayerControlAssignmentSet *pParentSet, C4PlayerControlDefs *pControlDefs)
bool LogFatal(const char *szMessage)
Definition: C4Log.cpp:230
const char * GetControlName() const
bool SEqual2(const char *szStr1, const char *szStr2)
Definition: Standard.cpp:168
uint32_t DWORD
bool LogF(const char *strMessage,...)
Definition: C4Log.cpp:253
StdStrBuf FormatString(const char *szFmt,...)
Definition: StdBuf.cpp:277

Here is the call graph for this function:

Here is the caller graph for this function:

void C4PlayerControlAssignment::SetControlName ( const char *  control_name)
inline

Definition at line 208 of file C4PlayerControl.h.

References StdStrBuf::Copy().

208 { sControlName.Copy(control_name); }
void Copy()
Definition: StdBuf.h:475

Here is the call graph for this function:

void C4PlayerControlAssignment::SetInherited ( bool  to_val)
inline

Definition at line 204 of file C4PlayerControl.h.

204 { is_inherited = to_val; }
void C4PlayerControlAssignment::SetInheritedAssignment ( const C4PlayerControlAssignment to_val)
inline

Definition at line 205 of file C4PlayerControl.h.

205 { inherited_assignment = to_val; }
void C4PlayerControlAssignment::SetKey ( const C4KeyCodeEx key)

Definition at line 254 of file C4PlayerControl.cpp.

255 {
256  // set as one-key-combo
257  KeyCombo.resize(1);
258  KeyCombo[0].Key = key;
259  KeyCombo[0].Key.fRepeated = false;
260  KeyCombo[0].sKeyName.Clear();
261  fComboIsSequence = false;
262  TriggerKey = key;
263 }

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