Example #1
0
        private static PadSchema Mouse(int controller)
        {
            var controllerDefRanges = new SnesMouseController().Definition.AxisRanges;

            return(new PadSchema
            {
                Size = new Size(345, 225),
                Buttons = new PadSchemaControl[]
                {
                    new AnalogSchema(6, 14, $"P{controller} Mouse X")
                    {
                        AxisRange = controllerDefRanges[0],
                        SecondaryAxisRange = controllerDefRanges[1]
                    },
                    new ButtonSchema(275, 15, controller, "Mouse Left")
                    {
                        DisplayName = "Left"
                    },
                    new ButtonSchema(275, 45, controller, "Mouse Right")
                    {
                        DisplayName = "Right"
                    }
                }
            });
        }
Example #2
0
        private static PadSchema Mouse(int controller)
        {
            var defAxes = new SnesMouseController().Definition.Axes;

            return(new PadSchema
            {
                Size = new Size(345, 225),
                Buttons = new PadSchemaControl[]
                {
                    new AnalogSchema(6, 14, $"P{controller} Mouse X")
                    {
                        Spec = defAxes.SpecAtIndex(0),
                        SecondarySpec = defAxes.SpecAtIndex(1)
                    },
                    new ButtonSchema(275, 15, controller, "Mouse Left")
                    {
                        DisplayName = "Left"
                    },
                    new ButtonSchema(275, 45, controller, "Mouse Right")
                    {
                        DisplayName = "Right"
                    }
                }
            });
        }
Example #3
0
        private static PadSchema Mouse(int controller)
        {
            var controllerDefRanges = new SnesMouseController().Definition.FloatRanges;

            return(new PadSchema
            {
                IsConsole = false,
                DefaultSize = new Size(345, 225),
                Buttons = new[]
                {
                    new PadSchema.ButtonSchema
                    {
                        Name = $"P{controller} Mouse X",
                        AxisRange = controllerDefRanges[0],
                        SecondaryAxisRange = controllerDefRanges[1],
                        DisplayName = "",
                        Location = new Point(6, 14),
                        Type = PadSchema.PadInputType.AnalogStick
                    },
                    new PadSchema.ButtonSchema
                    {
                        Name = $"P{controller} Mouse Left",
                        DisplayName = "Left",
                        Location = new Point(275, 15),
                        Type = PadSchema.PadInputType.Boolean
                    },
                    new PadSchema.ButtonSchema
                    {
                        Name = $"P{controller} Mouse Right",
                        DisplayName = "Right",
                        Location = new Point(275, 45),
                        Type = PadSchema.PadInputType.Boolean
                    }
                }
            });
        }