userprefs bugfix

master
Claire 2 years ago
parent
commit
98c2b25b9d
  1. 7
      User-Prefs.md

7
User-Prefs.md

@ -73,7 +73,7 @@ First, we're going to create a new instance of [`NSMenu`](https://developer.appl
```swift
@objc func buildMenu(key: String = "default") {
...
// create menu item to hold submenu
// create menu item to hold submenu
let prefMenu = NSMenu(title: "Prefs")
...
}
@ -201,8 +201,13 @@ For the monochrome icons, we just need to make a few small adjustments. Since we
For the other four phases (waxing and waning, crescent and gibbous), we're going to append `-alt` to the filename.
Since we're now setting the value of `key2` after the variable has been created, we need to use `var` instead of `let` when defining `key2`.
```swift
@objc func buildMenu(key: String = "default") {
...
// if key is new2, rename to new
var key2 = key.contains("2") ? "new" : key
...
// otherwise use monochrome icons
else {

Loading…
Cancel
Save