Commit Graph

19 Commits

Author SHA1 Message Date
YoshiRulz 3decfa5019
Use inheritance instead of Type for PadSchema controls
* Rename ButtonSchema to PadSchemaControl, create ButtonSchema subclass, rename
AnalogSchema to AnalogStickSchema, and make PadSchemaControl abstract
* Replace switching on PadSchemaControl.Type (enum PadInputType) with type
checks
* Refactor and merge VirtualpadTool.CheckPads() into .CreatePads() (it was
easier than just using type checks in the old algorithm)
* Move members from PadSchemaControl to subtypes and cleanup
2020-03-31 21:40:36 +10:00
adelikat 1f8171fc9b PadSchema - remove MaxSize as it wasn't being used, rename DefaultSize to just Size 2020-03-22 16:23:01 -05:00
adelikat 0344b0affb make PadSchema.IsConsole not settable, force the use of inheritance 2020-03-22 12:37:28 -05:00
adelikat 4476cc53af VirtualPads - unnest ButtonScehma and PadInputType 2020-03-21 18:12:26 -05:00
adelikat 0ecc1e8023 VirtualPad Schema - default to type Button, and remove now redundant setting of this value 2020-03-21 16:10:01 -05:00
YoshiRulz e12b5d8137
Refactor FloatRange creation and usage
effectively resolves #1200
* Replaced floats in FloatRange with ints (would have used shorts but
SubGBHawk/SubNesHawk use an axis to hack in cycle count or something), added
both Range<int> and Range<float> auto-properties
* Added bool field IsReversed to FloatRange
* Added enum AxisPairOrientation and factory method using it
* Cleaned up usages of FloatRange fields and properties
* Added new properties to PadSchema.ButtonSchema for type
PadInputType.AnalogStick (to hold the two FloatRanges) and used
ControllerDefinitions from cores to dedup these ranges in the schemata
* Made VirtualPadAnalogStick work properly: both the direction and bounds are
correctly set from the controller schemata, the polar conversion measures angles
consistently (though I think it might not work outside -128..127 e.g. for PSX),
and I didn't break the sensitivity override, plus negative percentages might
work now but I didn't allow those
* Renamed FloatRange to AxisRange, but did not rename related symbols
2020-03-14 20:47:45 +10:00
adelikat b390c2829c cleanup virtualpad code 2019-12-31 11:36:22 -06:00
adelikat 436a853c96 Fix typo - Scema -> Schema 2017-04-29 15:41:27 -05:00
adelikat ba4af238b7 VirtualPads - PSX NeGcon support, also slider controls now support vertical orientation 2017-04-29 14:47:51 -05:00
zeromus 0787a3be47 rework virtual pad analog widget to support n64 and psx simultaneously 2015-07-19 21:46:52 -05:00
zeromus 4dc4745122 psx - revise disc swapping method. way cooler now, you get a list of discs in the virtualpad box, and changing between them maps to physical operations more logically. 2014-12-19 03:24:48 +00:00
zeromus c43dd9fc34 psx - revise disc switch schema stuff; add MinValue support to analog button and tweak the pip positioning 2014-12-16 03:15:27 +00:00
adelikat 5c8cf8b141 Virtualpad Target screen - cleanup some unneeded code 2014-07-04 15:12:14 +00:00
adelikat ee6d73aac7 Virtualpads - some code cleanup 2014-06-29 03:14:40 +00:00
adelikat a1926e1a58 Make virtualpads prettier including a Display name that can (should) be set in the schema, and an optional Max Size (defaults to default size if left out), added lots of nes stuff, and basic 2 player famicom (including microphone on player 2) 2014-06-24 23:32:30 +00:00
adelikat 3208440225 Virtual Pads - basic analog button control and wire up to NES arkanoid paddle 2014-06-24 12:58:08 +00:00
adelikat b364b5c48f implement TargetScreen virtual pad and wire up to Nes zapper 2014-06-22 21:50:27 +00:00
adelikat 2009e07e35 Virtualpads - Some Progress 2014-06-22 15:43:45 +00:00
adelikat e9968657ac Virtualpads - some reorg 2014-06-22 14:37:40 +00:00