1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
silica-viewer/ProcreateViewer/AppDelegate.swift

23 lines
767 B
Swift
Raw Normal View History

2020-03-10 14:23:54 -04:00
import Cocoa
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations {
@IBAction func showInfoAction(_ sender: Any) {
NSApplication.shared.keyWindow?.contentViewController?.performSegue(withIdentifier: "showInfo", sender: self)
}
2021-05-09 21:44:04 -04:00
@IBAction func showTimelapseAction(_ sender: Any) {
NSApplication.shared.keyWindow?.contentViewController?.performSegue(withIdentifier: "showTimelapse", sender: self)
}
func validateUserInterfaceItem(_ item: NSValidatedUserInterfaceItem) -> Bool {
2021-05-09 21:44:04 -04:00
// Show timelapse and show info buttons
if(item.tag == 67 || item.tag == 68) {
2020-03-11 22:15:05 -04:00
return NSApplication.shared.keyWindow != nil
}
return true
}
2020-03-10 14:23:54 -04:00
}