mirror of
https://github.com/trudnai/Steve2.git
synced 2024-05-31 15:41:35 +00:00
Set Apple II font on launch
This commit is contained in:
parent
f9abef0123
commit
7abc95f4d8
File diff suppressed because it is too large
Load Diff
|
@ -956,7 +956,45 @@ class ViewController: NSViewController {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
func SetSplashScreenFont() {
|
||||
for view in splashScreen.subviews {
|
||||
if view is NSTextField {
|
||||
let textField = view as! NSTextField
|
||||
if let fontSize = textField.font?.pointSize {
|
||||
textField.font = NSFont(name: "PrintChar21", size: fontSize)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set Apple ][ font
|
||||
if let fontSize = textDisplay.font?.pointSize {
|
||||
textDisplay.font = NSFont(name: "PrintChar21", size: fontSize)
|
||||
ViewController.charConvTblFlashOn = ViewController.charConvTblFlashOn40
|
||||
ViewController.charConvTblFlashOff = ViewController.charConvTblFlashOff40
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func SetCol40() {
|
||||
// Set Apple ][ font
|
||||
if let fontSize = textDisplay.font?.pointSize {
|
||||
textDisplay.font = NSFont(name: "PrintChar21", size: fontSize)
|
||||
ViewController.charConvTblFlashOn = ViewController.charConvTblFlashOn40
|
||||
ViewController.charConvTblFlashOff = ViewController.charConvTblFlashOff40
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func SetCol80() {
|
||||
// Set Apple ][ font
|
||||
if let fontSize = textDisplay.font?.pointSize {
|
||||
textDisplay.font = NSFont(name: "PRNumber3", size: fontSize)
|
||||
ViewController.charConvTblFlashOn = ViewController.charConvTblCol80
|
||||
ViewController.charConvTblFlashOff = ViewController.charConvTblCol80
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func UpdateText() {
|
||||
|
||||
// TODO: Render text Screen in native C
|
||||
|
@ -965,17 +1003,11 @@ class ViewController: NSViewController {
|
|||
if videoMode.col80 != currentVideoMode.col80 {
|
||||
currentVideoMode.col80 = videoMode.col80
|
||||
|
||||
if let fontSize = textDisplay.font?.pointSize {
|
||||
if videoMode.col80 == 1 {
|
||||
textDisplay.font = NSFont(name: "PRNumber3", size: fontSize)
|
||||
ViewController.charConvTblFlashOn = ViewController.charConvTblCol80
|
||||
ViewController.charConvTblFlashOff = ViewController.charConvTblCol80
|
||||
}
|
||||
else {
|
||||
textDisplay.font = NSFont(name: "PrintChar21", size: fontSize)
|
||||
ViewController.charConvTblFlashOn = ViewController.charConvTblFlashOn40
|
||||
ViewController.charConvTblFlashOff = ViewController.charConvTblFlashOff40
|
||||
}
|
||||
if videoMode.col80 == 1 {
|
||||
SetCol80()
|
||||
}
|
||||
else {
|
||||
SetCol40()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1366,7 +1398,11 @@ class ViewController: NSViewController {
|
|||
// timer = CADisplayLink(target: self, selector: #selector(gameloop))
|
||||
// timer.add(to: RunLoop.main, forMode: .default)
|
||||
|
||||
|
||||
|
||||
// Set Apple ][ font
|
||||
SetCol40()
|
||||
SetSplashScreenFont()
|
||||
|
||||
openLog()
|
||||
|
||||
hires.clearScreen();
|
||||
|
|
Loading…
Reference in New Issue
Block a user