added config manager (closes #18) and fixed crash at win
This commit is contained in:
		
							parent
							
								
									a7e2d1c201
								
							
						
					
					
						commit
						d339dd0a06
					
				
					 8 changed files with 331 additions and 120 deletions
				
			
		| 
						 | 
				
			
			@ -1,20 +1,20 @@
 | 
			
		|||
{
 | 
			
		||||
	"touchscreen": {
 | 
			
		||||
		"enabled": true,
 | 
			
		||||
		"mode": "crosspad",
 | 
			
		||||
		"deadzone": 50,
 | 
			
		||||
		"buffer": false
 | 
			
		||||
	},
 | 
			
		||||
	"keyboard": {
 | 
			
		||||
		"enabled": true,
 | 
			
		||||
		"buffer": false
 | 
			
		||||
	},
 | 
			
		||||
	"gamepad": {
 | 
			
		||||
		"enabled": true,
 | 
			
		||||
		"deadzone": 0.5,
 | 
			
		||||
		"buffer": true
 | 
			
		||||
	},
 | 
			
		||||
	"appearance": {
 | 
			
		||||
		"grid": "none"
 | 
			
		||||
	}
 | 
			
		||||
	"input.touchscreen.crosspad.enabled": true,
 | 
			
		||||
	"input.touchscreen.crosspad.overlay": true,
 | 
			
		||||
 | 
			
		||||
	"input.touchscreen.joystick.enabled": false,
 | 
			
		||||
	"input.touchscreen.joystick.overlay": true,
 | 
			
		||||
	"input.touchscreen.joystick.deadzone": 10,
 | 
			
		||||
 | 
			
		||||
	"input.touchscreen.swipe.enabled": false,
 | 
			
		||||
	"input.touchscreen.swipe.deadzone": 50,
 | 
			
		||||
 | 
			
		||||
	"input.gamepad.enabled": true,
 | 
			
		||||
	"input.gamepad.deadzone": 0.5,
 | 
			
		||||
 | 
			
		||||
	"input.keyboard.enabled": true,
 | 
			
		||||
 | 
			
		||||
	"input.buffer": false,
 | 
			
		||||
 | 
			
		||||
	"appearance.grid": "none"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,26 +1,121 @@
 | 
			
		|||
{
 | 
			
		||||
	"touchscreen": {
 | 
			
		||||
		"mode": [
 | 
			
		||||
			"crosspad",
 | 
			
		||||
			"joystick",
 | 
			
		||||
			"swipe"
 | 
			
		||||
		],
 | 
			
		||||
		"deadzone": {
 | 
			
		||||
			"min": 1,
 | 
			
		||||
			"max": 100
 | 
			
		||||
		}
 | 
			
		||||
	"input": {
 | 
			
		||||
		"name": "Input settings"
 | 
			
		||||
	},
 | 
			
		||||
	"gamepad": {
 | 
			
		||||
		"deadzone": {
 | 
			
		||||
			"min": 0,
 | 
			
		||||
			"max": 1
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	"input.touchscreen": {
 | 
			
		||||
		"name": "Touchscreen settings"
 | 
			
		||||
	},
 | 
			
		||||
	"appearance": {
 | 
			
		||||
		"grid": [
 | 
			
		||||
			"grid",
 | 
			
		||||
			"checkerboard",
 | 
			
		||||
			"none"
 | 
			
		||||
 | 
			
		||||
	"input.touchscreen.crosspad": {
 | 
			
		||||
		"name": "Crosspad mode"
 | 
			
		||||
	},
 | 
			
		||||
	"input.touchscreen.crosspad.enabled": {
 | 
			
		||||
		"name": "Enable crosspad",
 | 
			
		||||
		"type": "boolean",
 | 
			
		||||
		"excludes": [
 | 
			
		||||
			"input.touchscreen.joystick.enabled",
 | 
			
		||||
			"input.touchscreen.swipe.enabled"
 | 
			
		||||
		]
 | 
			
		||||
	},
 | 
			
		||||
	"input.touchscreen.crosspad.overlay": {
 | 
			
		||||
		"name": "Show overlay",
 | 
			
		||||
		"type": "boolean",
 | 
			
		||||
		"parent": "input.touchscreen.crosspad.enabled"
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	"input.touchscreen.joystick": {
 | 
			
		||||
		"name": "Joystick mode"
 | 
			
		||||
	},
 | 
			
		||||
	"input.touchscreen.joystick.enabled": {
 | 
			
		||||
		"name": "Enable joystick",
 | 
			
		||||
		"type": "boolean",
 | 
			
		||||
		"excludes": [
 | 
			
		||||
			"input.touchscreen.crosspad.enabled",
 | 
			
		||||
			"input.touchscreen.swipe.enabled"
 | 
			
		||||
		]
 | 
			
		||||
	},
 | 
			
		||||
	"input.touchscreen.joystick.overlay": {
 | 
			
		||||
		"name": "Show overlay",
 | 
			
		||||
		"type": "boolean",
 | 
			
		||||
		"parent": "input.touchscreen.joystick.enabled"
 | 
			
		||||
	},
 | 
			
		||||
	"input.touchscreen.joystick.deadzone": {
 | 
			
		||||
		"name": "Deadzone",
 | 
			
		||||
		"type": "number",
 | 
			
		||||
		"parent": "input.touchscreen.joystick.enabled",
 | 
			
		||||
		"bounds": {
 | 
			
		||||
			"min": 1,
 | 
			
		||||
			"max": 100,
 | 
			
		||||
			"inc": 1
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	"input.touchscreen.swipe": {
 | 
			
		||||
		"name": "Swipe mode"
 | 
			
		||||
	},
 | 
			
		||||
	"input.touchscreen.swipe.enabled": {
 | 
			
		||||
		"name": "Enable swipe",
 | 
			
		||||
		"type": "boolean",
 | 
			
		||||
		"excludes": [
 | 
			
		||||
			"input.touchscreen.crosspad.enabled",
 | 
			
		||||
			"input.touchscreen.joystick.enabled"
 | 
			
		||||
		]
 | 
			
		||||
	},
 | 
			
		||||
	"input.touchscreen.swipe.deadzone": {
 | 
			
		||||
		"name": "Deadzone",
 | 
			
		||||
		"type": "number",
 | 
			
		||||
		"parent": "input.touchscreen.swipe.enabled",
 | 
			
		||||
		"bounds": {
 | 
			
		||||
			"min": 1,
 | 
			
		||||
			"max": 100,
 | 
			
		||||
			"inc": 1
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	"input.gamepad": {
 | 
			
		||||
		"name": "Gamepad settings"
 | 
			
		||||
	},
 | 
			
		||||
	"input.gamepad.enabled": {
 | 
			
		||||
		"name": "Enable gamepad",
 | 
			
		||||
		"type": "boolean"
 | 
			
		||||
	},
 | 
			
		||||
	"input.gamepad.deadzone": {
 | 
			
		||||
		"name": "Deadzone",
 | 
			
		||||
		"type": "number",
 | 
			
		||||
		"parent": "input.gamepad.enabled",
 | 
			
		||||
		"bounds": {
 | 
			
		||||
			"min": 0,
 | 
			
		||||
			"max": 1,
 | 
			
		||||
			"inc": 0.1
 | 
			
		||||
		}
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	"input.keyboard": {
 | 
			
		||||
		"name": "Keyboard settings"
 | 
			
		||||
	},
 | 
			
		||||
	"input.keyboard.enabled": {
 | 
			
		||||
		"name": "Enable keyboard",
 | 
			
		||||
		"type": "boolean"
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	"input.buffer": {
 | 
			
		||||
		"name": "Enable input buffering",
 | 
			
		||||
		"type": "boolean"
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	"appearance": {
 | 
			
		||||
		"name": "Appearance"
 | 
			
		||||
	},
 | 
			
		||||
	"appearance.grid": {
 | 
			
		||||
		"name": "Grid type",
 | 
			
		||||
		"type": "choice",
 | 
			
		||||
		"bounds": {
 | 
			
		||||
			"choices": [
 | 
			
		||||
				"none",
 | 
			
		||||
				"grid",
 | 
			
		||||
				"checkerboard"
 | 
			
		||||
			]
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue