Slide № 188
diff --git src/app/ui/OptionsPlayer.jsx src/app/ui/OptionsPlayer.jsx
index a2e1d2e..2333c9f 100644
--- src/app/ui/OptionsPlayer.jsx
+++ src/app/ui/OptionsPlayer.jsx
@@ -1,176 +1,191 @@
const enhance = compose(
connect((state) => ({
options: state.options,
scratch: Options.scratchPosition(state.options),
})),
connectIO({
onSetPanel: () => (value) => OptionsIO.setOptions({ 'player.P1.panel': value }),
onSetScratch: () => (position) => OptionsIO.setScratch(position),
onSetSpeed: () => (speed) => OptionsIO.setSpeed(speed),
onSetLeadTime: () => (leadTime) => OptionsIO.setLeadTime(leadTime),
onSetLaneCover: () => (laneCover) => OptionsIO.setLaneCover(laneCover),
onToggleBackgroundAnimationsEnabled: ({ options }) => () => (
OptionsIO.setOptions({
'system.bga.enabled': Options.toggleOption(options['system.bga.enabled'])
})
),
onToggleAutoVelocityEnabled: ({ options }) => () => (
OptionsIO.setOptions({
'player.P1.auto-velocity': Options.toggleOption(options['player.P1.auto-velocity'])
})
+ ),
+ onToggleGauge: ({ options }) => () => (
+ OptionsIO.setOptions({
+ 'player.P1.gauge': Options.toggleGauge(options['player.P1.gauge'])
+ })
)
}),
pure
)
export const OptionsPlayer = React.createClass({
propTypes: {
options: React.PropTypes.object,
scratch: React.PropTypes.string,
onClose: React.PropTypes.func,
onSetPanel: React.PropTypes.func,
onSetScratch: React.PropTypes.func,
onSetSpeed: React.PropTypes.func,
onSetLaneCover: React.PropTypes.func,
onToggleBackgroundAnimationsEnabled: React.PropTypes.func,
onToggleAutoVelocityEnabled: React.PropTypes.func,
+ onToggleGauge: React.PropTypes.func,
onSetLeadTime: React.PropTypes.func
},
render () {
return
label="Speed"
hidden={Options.isAutoVelocityEnabled(this.props.options)}
>
value={this.props.options['player.P1.speed']}
onChange={this.props.onSetSpeed}
/>
You can also change the speed in-game
using the Up and Down arrow keys.
label="LeadTime"
hidden={!Options.isAutoVelocityEnabled(this.props.options)}
>
value={Options.leadTime(this.props.options)}
onChange={this.props.onSetLeadTime}
style={{ width: '5em' }}
/>
Speed will be automatically adjusted
to maintain a consistent note velocity.
options={SCRATCH_OPTIONS}
onSelect={this.props.onSetScratch}
value={this.props.scratch}
/>
options={PANEL_OPTIONS}
onSelect={this.props.onSetPanel}
value={this.props.options['player.P1.panel']}
/>
value={Options.laneCover(this.props.options)}
onChange={this.props.onSetLaneCover}
style={{ width: '5em' }}
/>
className="OptionsPlayerͷhelp"
title="Can be negative, in this case the play area is pulled up."
>
The amount of play area to hide from the top.
checked={Options.isBackgroundAnimationsEnabled(this.props.options)}
onToggle={this.props.onToggleBackgroundAnimationsEnabled}
>
Enable background animations (720p, alpha)
checked={Options.isAutoVelocityEnabled(this.props.options)}
onToggle={this.props.onToggleAutoVelocityEnabled}
>
Maintain absolute note velocity (advanced)
Save & Exit
}
})