Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
inputpolling [2019/04/19 20:24] – [Sequences] admininputpolling [2020/11/04 14:52] – [Runtime] admin
Line 24: Line 24:
 ===== HotKey ===== ===== HotKey =====
  
-A HotKey is a combination of inputs that are simultanously active. Each HotKey can manage inputs from keyboard, mouse and/or gamepad. +A HotKey is a combination of simultanously active inputs. Each HotKey can manage inputs from keyboard, mouse and/or gamepad. 
 An input is a hardware message: An input is a hardware message:
  
Line 39: Line 39:
 You are allowed to setup your HotKeys at design- and runtime. You are allowed to setup your HotKeys at design- and runtime.
  
 +==== LockTime ====
 +
 +Set the LockTime property (in milliseconds) to suppress a hotkey for a specific time.
 +Because input commands come very often, f.e. if a button on the gamepad was pressed. As long as you hold the button the system will recognize the hotkey for this button.
 +For sequence detection this may be a problem. Therefor we want to lock the gamepad hotkey for a certain time.
 ==== DesignTime ==== ==== DesignTime ====
  
Line 62: Line 67:
 end; end;
  
 +procedure TForm1.FormCreate(Sender: TObject);
 var  var 
   FInput : TGorillaInputController;   FInput : TGorillaInputController;
Line 75: Line 81:
   LHotKey.AddInput(TGorillaInputDeviceType.Keyboard, Ord(GORILLA_INPUT_KEY_C));   LHotKey.AddInput(TGorillaInputDeviceType.Keyboard, Ord(GORILLA_INPUT_KEY_C));
   LHotKey.AddInput(TGorillaInputDeviceType.Keyboard, Ord(GORILLA_INPUT_KEY_RETURN));   LHotKey.AddInput(TGorillaInputDeviceType.Keyboard, Ord(GORILLA_INPUT_KEY_RETURN));
 +end;
 +  
 +procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
 +begin
 +  FInput.DisposeOf();
 +  FInput := nil;
 +end;
 </file> </file>
- 
- 
 ===== Persistent Messages ===== ===== Persistent Messages =====
  
Line 264: Line 275:
 </code> </code>
  
 +__Notes:__
 You are allowed declare an input multiple times in a sequence. You are allowed declare an input multiple times in a sequence.
 +
 Each sequence can hold up to 16 HotKeys. Each sequence can hold up to 16 HotKeys.
 ==== DesignTime ==== ==== DesignTime ====
Line 299: Line 312:
 </file> </file>
  
 +Next: [[Pathfinding|Pathfinding]]