Protoinput:#154
Open
Messenils wants to merge 11 commits into
Open
Conversation
… + rearranged tunell
…/Must be included or it will be 0. then mouse will not move. 10-30 recommended Game.ProtoInput.TranslateXAccelration = 4; //Must be included or it will be 0. then mouse will not move 2-8 recommended Game.ProtoInput.TranslateXSwapSticks = true; //change right stick to left stick Game.ProtoInput.TranslateXScanner = true;; //to do scans on presaved BMPS or statics listed in Xinput.ini file Game.ProtoInput.TranslateXShouldersNextPoint = true;; //use shoulders to scroll between presaved points if true Game.ProtoInput.TranslateXAstatic = true; //points for button A are remembered if true Game.ProtoInput.TranslateXBstatic = true; //points for button B are remembered if true Game.ProtoInput.TranslateXXstatic = true; //points for button X are remembered if true Game.ProtoInput.TranslateXYstatic = true; //points for button Y are remembered if true Game.ProtoInput.TranslateXAPointClick = true;//points for button A will do mouseclick input Game.ProtoInput.TranslateXBPointClick = true;//points for button B will do mouseclick input Game.ProtoInput.TranslateXXPointClick = true;//points for button X will do mouseclick input Game.ProtoInput.TranslateXYPointClick = true;//points for button Y will do mouseclick input Game.ProtoInput.TranslateXAPointMove = true;//points for button A will move mouse to point Game.ProtoInput.TranslateXBPointMove = true;//points for button B will move mouse to point Game.ProtoInput.TranslateXXPointMove = true;//points for button X will move mouse to point Game.ProtoInput.TranslateXYPointMove = true;//points for button Y will move mouse to point //XtranslateKeys all ints Game.ProtoInput.TranslateXButtonA = 69; //int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there Game.ProtoInput.TranslateXButtonB = 69;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there Game.ProtoInput.TranslateXButtonX = 69;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there Game.ProtoInput.TranslateXButtonY = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there Game.ProtoInput.TranslateXButtonRS = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there Game.ProtoInput.TranslateXButtonLS = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there Game.ProtoInput.TranslateXButtonRight = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there Game.ProtoInput.TranslateXButtonLeft = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there Game.ProtoInput.TranslateXButtonUp = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there Game.ProtoInput.TranslateXButtonDown = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there Game.ProtoInput.TranslateXStickR = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there Game.ProtoInput.TranslateXStickL = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there Game.ProtoInput.TranslateXStickRight = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there Game.ProtoInput.TranslateXStickLeft = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there Game.ProtoInput.TranslateXStickUp = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there Game.ProtoInput.TranslateXStickDown = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there Game.ProtoInput.TranslateXButtonOption = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there Game.ProtoInput.TranslateXButtonStart = 67;;//int Keycode. find correct number in output from Protoinputhost.exe saved profiles after mapping there
…slateXtoMKB from being zero, resulting in frozen cursor
… input. added 2 lines for manual input scaling
…input.TranslateMKBtoX
…slateMKBtoX is enabled for instance. new protoinput options: TranslateXtoMKB, with optional pixel mapping. PointerInmouse, sending pointer input messages to games. Reregister option adding game window to raw input. Manual scaling of input messages(oldX, oldY) scaling up messages from old resolution. Forward nucleus grab window to protoinput. New hook GetcursorInfo. Lines: Game.ProtoInput.TranslateXinputtoMKB =true; //true or false. Translates controller to MKB
Game.ProtoInput.TranslateMKBtoXinput = true; //true or false. Translates MKB to controller
Game.ProtoInput.PointerInMouse = true; //true or false. Send different untraditional mouse messages
Game.ProtoInput.ReRegisterInput = true; //true or false. Force add game window to raw input
//scaling. scales from selected resolution
Game.ProtoInput.ScaleFromX = 800; //old resolution to scale from. forexample if game window is resized from 800 to 1600 width then input messages will be scaled with *0.5
Game.ProtoInput.ScaleFromY = 600; //old resolution to scale from. forexample if game window is resized from 600 to 1200 height then input messages will be scaled with *0.5
//forward forcefocus-window from nucleus to protoinput. //only done at inject
Game.ForwardWindowToProtoInput = true; //can only be done on inject. Forwards nucleus grabbed window to protoinput
//XtranslateCFG all bools
//common settings for both translation methods
Game.ProtoInput.TranslateXSensitivity = 8;
Game.ProtoInput.TranslateXDeadzone = 2;
// for both translation methods
Game.ProtoInput.TranslateXSwapSticks = true; //change right stick to left stick
//XtranslateKeys all ints //common settings for both translation methods
Game.ProtoInput.TranslateXButtonA = Nucleus.Key.R;
Game.ProtoInput.TranslateXButtonB = Nucleus.Key.G;
Game.ProtoInput.TranslateXButtonX = Nucleus.Key.E;
Game.ProtoInput.TranslateXButtonY = Nucleus.Key.C;
Game.ProtoInput.TranslateXButtonRS = Nucleus.Key.Shift;
Game.ProtoInput.TranslateXButtonLS = Nucleus.Key.Space;
Game.ProtoInput.TranslateXButtonRight = Nucleus.Key.Right;
Game.ProtoInput.TranslateXButtonLeft = Nucleus.Key.Left;
Game.ProtoInput.TranslateXButtonUp = Nucleus.Key.Up;
Game.ProtoInput.TranslateXButtonDown = Nucleus.Key.Down;
Game.ProtoInput.TranslateXStickR = Nucleus.Key.Z;
Game.ProtoInput.TranslateXStickL = Nucleus.Key.M;
Game.ProtoInput.TranslateXStickRight = Nucleus.Key.D;
Game.ProtoInput.TranslateXStickLeft = Nucleus.Key.A;
Game.ProtoInput.TranslateXStickUp = Nucleus.Key.W;
Game.ProtoInput.TranslateXStickDown = Nucleus.Key.S;
Game.ProtoInput.TranslateXButtonOption = Nucleus.Key.Return;
Game.ProtoInput.TranslateXButtonStart = Nucleus.Key.Escape;
//only on TranslateXinputtoMKB
Game.ProtoInput.TranslateXAccelration = 4;
Game.ProtoInput.TranslateXScanner = true; //to do scans on presaved BMPS or statics listed in Xinput.ini file
Game.ProtoInput.TranslateXShouldersNextPoint = true; //use shoulders to scroll between presaved points if true
Game.ProtoInput.TranslateXAstatic = true; //points for button A are remembered if true
Game.ProtoInput.TranslateXBstatic = true; //points for button B are remembered if true
Game.ProtoInput.TranslateXXstatic = true; //points for button X are remembered if true
Game.ProtoInput.TranslateXYstatic = true; //points for button Y are remembered if true
Game.ProtoInput.TranslateXAPointClick = true;//points for button A will do mouseclick input
Game.ProtoInput.TranslateXBPointClick = true;//points for button B will do mouseclick input
Game.ProtoInput.TranslateXXPointClick = true;//points for button X will do mouseclick input
Game.ProtoInput.TranslateXYPointClick = true;//points for button Y will do mouseclick input
Game.ProtoInput.TranslateXAPointMove = true;//points for button A will move mouse to point
Game.ProtoInput.TranslateXBPointMove = true;//points for button B will move mouse to point
Game.ProtoInput.TranslateXXPointMove = true;//points for button X will move mouse to point
Game.ProtoInput.TranslateXYPointMove = true;//points for button Y will move mouse to point
Game.ProtoInput.OnInputUnlocked = function() //or locked
{
for (var i = 0; i < PlayerList.Count; i++)
{
var player = PlayerList[i];
ProtoInput.SetTranslateMKBtoXinput(player.ProtoInputInstanceHandle, false); //or true
ProtoInput.SetTranslateXinputtoMKB(player.ProtoInputInstanceHandle, false); //or true
ProtoInput.SetPointerInMouse(player.ProtoInputInstanceHandle, false); //or true
}
}
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Game.ProtoInput.TranslateXinputtoMKB =true; //true or false. Translates controller to MKB
Game.ProtoInput.TranslateMKBtoXinput = true; //true or false. Translates MKB to controller
Game.ProtoInput.PointerInMouse = true; //true or false. Send different untraditional mouse messages
Game.ProtoInput.ReRegisterInput = true; //true or false. Force add game window to raw input
//scaling. scales from selected resolution
Game.ProtoInput.ScaleFromX = 800; //old resolution to scale from. forexample if game window is resized from 800 to 1600 width then input messages will be scaled with *0.5
Game.ProtoInput.ScaleFromY = 600; //old resolution to scale from. forexample if game window is resized from 600 to 1200 height then input messages will be scaled with *0.5
//forward forcefocus-window from nucleus to protoinput. //only done at inject
Game.ForwardWindowToProtoInput = true; //can only be done on inject. Forwards nucleus grabbed window to protoinput
//XtranslateCFG all bools
//common settings for both translation methods
Game.ProtoInput.TranslateXSensitivity = 8;
Game.ProtoInput.TranslateXDeadzone = 2;
// for both translation methods
Game.ProtoInput.TranslateXSwapSticks = true; //change right stick to left stick
//XtranslateKeys all ints //common settings for both translation methods
Game.ProtoInput.TranslateXButtonA = Nucleus.Key.R;
Game.ProtoInput.TranslateXButtonB = Nucleus.Key.G;
Game.ProtoInput.TranslateXButtonX = Nucleus.Key.E;
Game.ProtoInput.TranslateXButtonY = Nucleus.Key.C;
Game.ProtoInput.TranslateXButtonRS = Nucleus.Key.Shift;
Game.ProtoInput.TranslateXButtonLS = Nucleus.Key.Space;
Game.ProtoInput.TranslateXButtonRight = Nucleus.Key.Right;
Game.ProtoInput.TranslateXButtonLeft = Nucleus.Key.Left;
Game.ProtoInput.TranslateXButtonUp = Nucleus.Key.Up;
Game.ProtoInput.TranslateXButtonDown = Nucleus.Key.Down;
Game.ProtoInput.TranslateXStickR = Nucleus.Key.Z;
Game.ProtoInput.TranslateXStickL = Nucleus.Key.M;
Game.ProtoInput.TranslateXStickRight = Nucleus.Key.D;
Game.ProtoInput.TranslateXStickLeft = Nucleus.Key.A;
Game.ProtoInput.TranslateXStickUp = Nucleus.Key.W;
Game.ProtoInput.TranslateXStickDown = Nucleus.Key.S;
Game.ProtoInput.TranslateXButtonOption = Nucleus.Key.Return;
Game.ProtoInput.TranslateXButtonStart = Nucleus.Key.Escape;
//only on TranslateXinputtoMKB
Game.ProtoInput.TranslateXAccelration = 4;
Game.ProtoInput.TranslateXScanner = true; //to do scans on presaved BMPS or statics listed in Xinput.ini file
Game.ProtoInput.TranslateXShouldersNextPoint = true; //use shoulders to scroll between presaved points if true
Game.ProtoInput.TranslateXAstatic = true; //points for button A are remembered if true
Game.ProtoInput.TranslateXBstatic = true; //points for button B are remembered if true
Game.ProtoInput.TranslateXXstatic = true; //points for button X are remembered if true
Game.ProtoInput.TranslateXYstatic = true; //points for button Y are remembered if true
Game.ProtoInput.TranslateXAPointClick = true;//points for button A will do mouseclick input
Game.ProtoInput.TranslateXBPointClick = true;//points for button B will do mouseclick input
Game.ProtoInput.TranslateXXPointClick = true;//points for button X will do mouseclick input
Game.ProtoInput.TranslateXYPointClick = true;//points for button Y will do mouseclick input
Game.ProtoInput.TranslateXAPointMove = true;//points for button A will move mouse to point
Game.ProtoInput.TranslateXBPointMove = true;//points for button B will move mouse to point
Game.ProtoInput.TranslateXXPointMove = true;//points for button X will move mouse to point
Game.ProtoInput.TranslateXYPointMove = true;//points for button Y will move mouse to point
Game.ProtoInput.OnInputUnlocked = function() //or locked
{
for (var i = 0; i < PlayerList.Count; i++)
{
var player = PlayerList[i];
ProtoInput.SetTranslateMKBtoXinput(player.ProtoInputInstanceHandle, false); //or true
ProtoInput.SetTranslateXinputtoMKB(player.ProtoInputInstanceHandle, false); //or true
ProtoInput.SetPointerInMouse(player.ProtoInputInstanceHandle, false); //or true
}
}
Also changed line Game.ProtoInput.DrawFakeCursorFix = true; to also enable fake cursor