Skip to content

Commit

Permalink
Move away from Swift Asset symbols for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaddTheSane committed Jan 7, 2024
1 parent 7769a5c commit 2eedcd1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions Boxer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5584,6 +5584,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOLS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -5728,6 +5729,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOLS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_ENABLE_MODULES = YES;
Expand Down
14 changes: 7 additions & 7 deletions Boxer/MT32LCDDisplay.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,37 @@ import Cocoa
class MT32LCDDisplay : NSTextField {
/// The image containing glyph data for the pixel font.
private var pixelFont: NSImage {
return NSImage(resource: ImageResource.MT32ScreenDisplay.mt32LCDFontTemplate)
return NSImage(named: "MT32ScreenDisplay/MT32LCDFontTemplate")!
}

/// The mask image to use for the LCD pixel grid.
/// This will be drawn in for 20 character places.
private var pixelGrid: NSImage {
return NSImage(resource: ImageResource.MT32ScreenDisplay.mt32LCDGridTemplate)
return NSImage(named: "MT32ScreenDisplay/MT32LCDGridTemplate")!
}

/// The background color of the field.
private var screenColor: NSColor {
return NSColor(resource: ColorResource.MT32ScreenDisplay.screen)
return NSColor(named: "MT32ScreenDisplay/screenColor")!
}

private var frameColor: NSColor {
return NSColor(resource: ColorResource.MT32ScreenDisplay.frame)
return NSColor(named: "MT32ScreenDisplay/frameColor")!
}

/// The background color of the LCD pixel grid.
private var gridColor: NSColor {
return NSColor(resource: ColorResource.MT32ScreenDisplay.grid)
return NSColor(named: "MT32ScreenDisplay/gridColor")!
}

/// The colour of lit LCD pixels upon the grid.
private var pixelColor: NSColor {
return NSColor(resource: ColorResource.MT32ScreenDisplay.pixel)
return NSColor(named: "MT32ScreenDisplay/pixelColor")!
}

/// The inner shadow of the screen.
private var innerShadow: NSShadow {
return NSShadow(blurRadius: 10, offset: NSSize(width: 0, height: -2.0), color: NSColor(resource: ColorResource.MT32ScreenDisplay.innerShadow))
return NSShadow(blurRadius: 10, offset: NSSize(width: 0, height: -2.0), color: NSColor(named: "MT32ScreenDisplay/innerShadowColor")!)
}

/// The lighting effects applied on top of the screen.
Expand Down

0 comments on commit 2eedcd1

Please sign in to comment.