RCS Build Aid

RCS Build Aid

343k Downloads

Should ignore hotkeys when cursor is in a text field

rkagerer opened this issue ยท 0 comments

commented

RCS Build Aid inappropriately responds to hotkeys when focus is in text fields (such as the part search box, the craft name box, and the craft description box).

That means if you hit the keys Num5, I, J, K, L, etc. while typing a part name, RCS Build Aid starts doing things. It should not.

I patched this in my personal build by putting the following at the top of Update() in RCSBuildAid.cs. I opened this ticket as I see the Development source has still not been changed (would do a Pull request but am not familiar enough with clunky 'ol GitHub).

GameObject obj = EventSystem.current.currentSelectedGameObject;

bool inputFieldIsFocused = (obj != null && obj.GetComponent<InputField>() != null && obj.GetComponent<InputField>().isFocused);

disableShortcuts = inputFieldIsFocused; //EditorLogic.fetch.MouseOverTextFields ();