2016-10-02 20:31:50 +00:00
|
|
|
//
|
|
|
|
// Atari2600Options.swift
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 02/10/2016.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2016 Thomas Harte. All rights reserved.
|
2016-10-02 20:31:50 +00:00
|
|
|
//
|
|
|
|
|
2021-07-13 23:04:24 +00:00
|
|
|
class Atari2600OptionsController: MachineController {
|
2016-10-03 01:56:50 +00:00
|
|
|
var atari2600: CSAtari2600! {
|
|
|
|
get {
|
2018-02-13 02:46:21 +00:00
|
|
|
return self.machine.atari2600
|
2016-10-02 20:31:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@IBOutlet var resetButton: NSButton!
|
|
|
|
@IBOutlet var selectButton: NSButton!
|
|
|
|
@IBOutlet var colourButton: NSButton!
|
|
|
|
@IBOutlet var leftPlayerDifficultyButton: NSButton!
|
|
|
|
@IBOutlet var rightPlayerDifficultyButton: NSButton!
|
|
|
|
|
|
|
|
@IBAction func optionDidChange(_ sender: AnyObject!) {
|
|
|
|
pushSwitchValues()
|
|
|
|
}
|
|
|
|
|
|
|
|
fileprivate func pushSwitchValues() {
|
2017-09-20 03:06:37 +00:00
|
|
|
atari2600.colourButton = colourButton.state == .on
|
|
|
|
atari2600.leftPlayerDifficultyButton = leftPlayerDifficultyButton.state == .on
|
|
|
|
atari2600.rightPlayerDifficultyButton = rightPlayerDifficultyButton.state == .on
|
2016-10-02 20:31:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@IBAction func optionWasPressed(_ sender: NSButton!) {
|
|
|
|
if sender == resetButton {
|
|
|
|
atari2600.pressResetButton()
|
|
|
|
} else {
|
|
|
|
atari2600.pressSelectButton()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|