Skip to content

Commit

Permalink
Merge pull request #3 from kouky/custom-settings
Browse files Browse the repository at this point in the history
Public initializers for setting types
  • Loading branch information
kouky committed Mar 4, 2016
2 parents c18c7d7 + 15c858d commit e855e2a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion PrimaryFlightDisplay.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = "PrimaryFlightDisplay"
spec.version = "0.5.0"
spec.version = "0.5.1"
spec.summary = "Primary Flight Display SpriteKit Framework for Mac + iOS."
spec.homepage = "https://github.com/kouky/PrimaryFlightDisplay"
spec.license = { type: 'MIT', file: 'LICENSE' }
Expand Down
2 changes: 1 addition & 1 deletion Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.5.0</string>
<string>0.5.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
18 changes: 18 additions & 0 deletions Sources/Settings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public struct DefaultSettings: SettingsType {
public var altimeter: TapeIndicatorStyleType = DefaultAltimeterStyle()
public var airSpeedIndicator: TapeIndicatorStyleType = DefaultAirspeedIndicatorStyle()
public var headingIndicator: TapeIndicatorStyleType = DefaultHeadingIndicatorStyle()

public init() {}
}

// MARK: HorizonStyle
Expand All @@ -40,6 +42,8 @@ public struct DefaultHorizonStyle: HorizonStyleType {
public var skyColor = SKColor(red: 0.078, green: 0.490, blue: 0.816, alpha: 1.00)
public var groundColor = SKColor(red: 0.667, green: 0.855, blue: 0.196, alpha: 1.00)
public var zeroPitchLineColor = SKColor(red: 0.8, green: 0.8, blue: 0.8, alpha: 1)

public init() {}
}

// MARK: AttitudeReferenceIndexStyle
Expand All @@ -60,6 +64,8 @@ public struct DefaultAttitudeReferenceIndexStyle: AttitudeReferenceIndexStyleTyp
public var sideBarWidth = 120
public var sideBarHeight = 20
public var sideBarOffset = 70

public init() {}
}

// MARK: PitchLadder
Expand All @@ -82,6 +88,8 @@ public struct DefaultPitchLadderStyle: PitchLadderStyleType {
public var minorLineWidth = 20
public var majorLineWidth = 50
public var markerTextOffset = 10

public init() {}
}

// MARK: BankIndicator
Expand Down Expand Up @@ -116,6 +124,8 @@ public struct DefaultBankIndicatorStyle: BankIndicatorStyleType {
public var markerTextOffset = 20
public var skyPointerHeight = 12
public var skyPointerWidth = 12

public init() {}
}

// MARK: TapeIndicator
Expand Down Expand Up @@ -166,6 +176,8 @@ public struct DefaultAltimeterStyle: TapeIndicatorStyleType {
public var markerTextOffset = 20
public var markerColor = SKColor.whiteColor()
public var markerTextColor = SKColor.whiteColor()

public init() {}
}

public struct DefaultAirspeedIndicatorStyle: TapeIndicatorStyleType {
Expand All @@ -184,6 +196,8 @@ public struct DefaultAirspeedIndicatorStyle: TapeIndicatorStyleType {
public var markerTextOffset = 20
public var markerColor = SKColor.whiteColor()
public var markerTextColor = SKColor.whiteColor()

public init() {}
}

public struct DefaultHeadingIndicatorStyle: TapeIndicatorStyleType {
Expand All @@ -202,6 +216,8 @@ public struct DefaultHeadingIndicatorStyle: TapeIndicatorStyleType {
public var markerTextOffset = 22
public var markerColor = SKColor.whiteColor()
public var markerTextColor = SKColor.whiteColor()

public init() {}
}

extension TapeIndicatorStyleType {
Expand Down Expand Up @@ -255,4 +271,6 @@ public protocol FontType {
public struct DefaultFont: FontType {
public var family = "Helvetica-Bold"
public var size: CGFloat = 16

public init() {}
}

0 comments on commit e855e2a

Please sign in to comment.