Class TInputShortcutList
Unit
Declaration
type TInputShortcutList = class(specialize TObjectList<TInputShortcut>)
Description
Group of TInputShortcut, to easily manage (search, load, save...) the inputs.
Hierarchy
- TObject
- TList
- TObjectList
- TInputShortcutList
Overview
Methods
function FindName(const Name: string): TInputShortcut; |
|
function SeekMatchingShortcut(const Event: TInputPressRelease): TInputShortcut; |
|
procedure RestoreDefaults; |
|
function SeekConflict(out ConflictDescription: string): boolean; |
|
procedure LoadFromConfig(const Config: TCastleConfig; ConfigPath: String = ''); |
|
procedure SaveToConfig(const Config: TCastleConfig; ConfigPath: String = ''); |
Description
Methods
function FindName(const Name: string): TInputShortcut; |
|
Find shortcut by name, returns |
function SeekMatchingShortcut(const Event: TInputPressRelease): TInputShortcut; |
|
Seeks for a shortcut that has matching key or mouse button or mouse wheel. |
procedure RestoreDefaults; |
|
function SeekConflict(out ConflictDescription: string): boolean; |
|
procedure LoadFromConfig(const Config: TCastleConfig; ConfigPath: String = ''); |
|
Load customized input shortcuts from a config file, for example from UserConfig. This should be used to load inputs previously saved with SaveToConfig. Provide the same value of ConfigPath as you used with SaveToConfig. |
procedure SaveToConfig(const Config: TCastleConfig; ConfigPath: String = ''); |
|
Save customized input shortcuts to a config file, for example to a UserConfig. This will create an XML element <input> under an indicated ConfigPath in the config file. Be sure to save each unique TInputShortcutList with a different ConfigPath, to not collide in the config file. Note that we only save to config file the values when they differ from default. E.g. TInputShortcut.Key1 will be explicitly saved only if it is different than TInputShortcut.DefaultKey1. Otherwise the information about this Key1 for this TInputShortcut will be removed from the config file (to force using default next time this config is loaded). |
Generated by PasDoc 0.16.0.