This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void RebindAction(FName ActionName, FKey NewKey) { | |
// Adapted from Rama's VictoryBPFunctionLibrary (https://wiki.unrealengine.com/Rebinding_Keys_At_Runtime_in_Packaged_Game) | |
UInputSettings* Settings = const_cast<UInputSettings*>(GetDefault<UInputSettings>()); | |
if (Settings) { | |
TArray<FInputActionKeyMapping>& Actions = Settings->ActionMappings; | |
for (FInputActionKeyMapping& Each : Actions) | |
{ | |
if (Each.ActionName == ActionName) { | |
Each.Key = NewKey; | |
UE_LOG(LogTemp, Warning, TEXT("%s is triggered by %s"), *Each.ActionName.ToString(), *Each.Key.ToString()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#depends on underscore | |
_.isConstructor = (thing) -> | |
if thing.name && thing.name[0].toUpperCase() == thing.name[0] | |
true | |
else | |
false | |
class Instrumentor | |
constructor: (namespace) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "StdAfx.h" | |
#include <Setupapi.h> | |
#pragma comment(lib, "Setupapi.lib") | |
#include "SerialPort.h" | |
SerialPort::SerialPort(void) : end_of_line_char_('\n') | |
{ | |
} |