/// <summary>
        /// Small wizard to determine what kind of Dpad the controller belonging to the InputManager has
        /// </summary>
        /// <param name="input">InputManager which to determine the Dpad of</param>
        /// <returns>DpadType enum</returns>
        private DpadType DetermineDpadType(DirectInputManager input)
        {
            while (input.GetPressedButton() == -1 && input.GetDpadValue() == -1)
            {
                if (Game.IsKeyPressed(System.Windows.Forms.Keys.Escape))
                {
                    return((DpadType)3);
                }
                UI.ShowSubtitle("Press and hold at least one Dpad button for 1 second. Press the Esc key to cancel.", 120);
                Script.Wait(100);
            }

            UI.ShowSubtitle("Now keep holding that Dpad button.");
            Script.Wait(1000);

            int button           = input.GetPressedButton();
            int digitalDpadvalue = input.GetDpadValue();

            if (digitalDpadvalue != -1)
            {
                return(DpadType.DigitalDpad);
            }
            else if (button != -1)
            {
                return(DpadType.ButtonsDpad);
            }
            return(DpadType.Unknown);
        }
        /// <summary>
        /// Helper method to configure a single DeviceButton and add it the configuration
        /// </summary>
        /// <param name="btn">The target DeviceButton</param>
        /// <param name="data">The ScriptSettings object which it needs to be saved too</param>
        /// <param name="input">InputManager object to handle input</param>
        /// <param name="guid">The GUID of the controller</param>
        private bool Configure(DeviceButton btn, ScriptSettings data, DirectInputManager input, string guid)
        {
            while (input.GetPressedButton() == -1)
            {
                if (Game.IsKeyPressed(System.Windows.Forms.Keys.Escape))
                {
                    return(false);
                }
                UI.ShowSubtitle("Press and hold the " + GetBtnText(btn) + " button on the controller for 1 second. Press the Esc key to cancel.", 120);
                Script.Wait(100);
            }

            int button = input.GetPressedButton();

            UI.ShowSubtitle("Please hold the " + GetBtnText(btn) + " button to confirm it.");
            Script.Wait(1000);

            if (button != input.GetPressedButton())
            {
                UI.ShowSubtitle("Now hold the " + GetBtnText(btn) + " button to confirm.");
                Script.Wait(1000);
                Configure(btn, data, input, guid);
            }
            else
            {
                data.SetValue(guid, btn.ToString(), button);
                while (input.GetPressedButton() != -1)
                {
                    UI.ShowSubtitle("Now let go the button to configure the next one.");
                    Script.Wait(100);
                }
                Script.Wait(1000);
            }

            return(true);
        }