<NME> action-settings.cocoascript
<BEF> var configureRetinaEnabled = nil
var configureRetinaValue = nil
var configureRetinaString = nil
var configureMobile = nil
var configureMinimalExport = nil
var configureAutoplay = nil

var measureSettingsHeight = 470

var block = 40
var paddingLeft = 30
var columnWidth = 375-30*2

var smallFontSize = 13


	var exportWindow = [[NSWindow alloc] init]
	exportWindow.setStyleMask(NSTitledWindowMask + NSFullSizeContentViewWindowMask);
	exportWindow.setBackgroundColor(ViewInventory.colorWindow());
	exportWindow.setTitleVisibility(NSWindowTitleHidden);
	exportWindow.setTitlebarAppearsTransparent(true);
	exportWindow.setFrame_display(NSMakeRect(0, 0, ViewInventory.sizeModalSettings(), measureSettingsHeight-50), false);
	exportWindow.setMovableByWindowBackground(true);
	exportWindow.setHasShadow(true);
	exportWindow.setLevel(NSFloatingWindowLevel);

	initConfigureValues()
	
	var exportWindow = [[NSWindow alloc] init]
	[exportWindow setFrame:NSMakeRect(0, 0, 375, 420) display:false];
	[exportWindow setBackgroundColor:backgroundColor];
	
		
	createLogo(exportWindow)
	createMobileCheckbox(exportWindow)
	createTip(exportWindow)
	createAutocodeCheckbox(exportWindow)
	var retinaValueField = createRetinaValueInput(exportWindow)
	var retinaStringField = createRetinaStringInput(exportWindow)
	

	var menuImage = ViewInventory.addImage(NSMakeRect(0, 274-50-2, 300, 32), "settings/menu")
	[[exportWindow contentView] addSubview:menuImage]



	
	var saveButton = [[NSButton alloc] initWithFrame:NSMakeRect(paddingLeft - 6, 0, 78, 50)];
	[saveButton setTitle:"Save"];
	[saveButton setBezelStyle:NSRoundedBezelStyle];
	[saveButton setKeyEquivalent:"\r"];
			function(sender){
		[exportWindow orderOut:nil]
		[NSApp stopModal]
		
		configureRetinaValue = retinaValues[retinaValueField.indexOfSelectedItem()]
		configureRetinaString = retinaStringField.stringValue()
		saveSettings()
						[NSApp stopModal]
					}
	[[exportWindow contentView] addSubview:saveButton];
	
	
	var cancelButton = [[NSButton alloc] initWithFrame:NSMakeRect(paddingLeft + 78 - 6, 0, 72, 50)];
	[cancelButton setTitle:"Cancel"];
	[cancelButton setBezelStyle:NSRoundedBezelStyle];
	[cancelButton setKeyEquivalent:"\033"]
	// for (var i = 0; i < firstLineViews.length; i++) { [[exportWindow contentView] addSubview:firstLineViews[i]] }
	// var retinaInput = firstLineViews[0]


	[cancelButton setAction:"callAction:"]
	[[exportWindow contentView] addSubview:cancelButton];
	
	
	[NSApp runModalForWindow:exportWindow];
}



	var saveButton = ViewInventory.addButton(NSMakeRect(16, 16, 58, 20), "settings/done",
			function(sender){
				[exportWindow orderOut:nil]
				[NSApp stopModal]
				ToolbarInventory.updateAccessoryControls()

				// var newRetinaValue = retinaInput.stringValue() + ""
				var trimmedRetinaValue = newRetinaValue.trim()
				if (trimmedRetinaValue == "") { [currentDocument showMessage:"Scale variable can't be empty. Back to \"" + userDefaults.myRetinaString + "\""] }
				else if (/^[a-zA-Z]+$/.test(trimmedRetinaValue)) {
					userDefaults.myRetinaString = trimmedRetinaValue
					saveDefaults(Status.userDomain(), userDefaults)
					[currentDocument showMessage:"💾"]
				}
				else { [currentDocument showMessage:"Scale variable should contain only letters. Back to \"" + userDefaults.myRetinaString + "\""] }
	
	saveDefaults(userDefaults)
	
	[currentDocument showMessage:"Settings saved"]
}

function isRetinaRequired() {

	var learnButton = ViewInventory.addButton( NSMakeRect(86, 17, 78, 22), "settings/learn",
			function(sender){
				var url = [NSURL URLWithString:StatisticsInventory.getLearnLink()];
				[[NSWorkspace sharedWorkspace] openURL:url]
	})





var createRetinaStringInput = function(exportWindow) {
	var labelDescription = "Off"
	var labelPlaceholder = "Ex: \"retina\""
	var paddingBottom = 220-17
	
	// var titleRetina = [[NSTextField alloc] initWithFrame:NSMakeRect(paddingLeft+100, paddingBottom + 24, 140, 16)];
//     [titleRetina setEditable:false];
//     [titleRetina setBordered:false];
//     [titleRetina setFont:[NSFont boldSystemFontOfSize:smallFontSize]];
//     [titleRetina setTextColor:lightColor];
//     [titleRetina setDrawsBackground:false];
//     [titleRetina setStringValue:labelDescription];
//     [titleRetina sizeToFit];
//     [[exportWindow contentView] addSubview:titleRetina];
    
	var retinaInput = [[NSTextField alloc] initWithFrame:NSMakeRect(paddingLeft+100, paddingBottom+2, 140, 20)];
    [[retinaInput cell] setPlaceholderString:labelPlaceholder];
	// [retinaInput setFocusRingType:NSFocusRingTypeNone];
    [retinaInput setBordered:false];
    [retinaInput setBackgroundColor:fieldColor];
    [retinaInput setStringValue:configureRetinaString];
    [[exportWindow contentView] addSubview:retinaInput];
	
	return retinaInput
}


var createRetinaValueInput = function(exportWindow) {
	var labelDescription = "On"
	var paddingBottom = 220-17
	
	var selectedItemIndex = -1
	var retinaTextValues = []
		var currentTextView = textTitles[i]
		[currentTextView setEditable:false];
	  [currentTextView setBordered:false];
		[currentTextView setFont:ViewInventory.fontInputControls()];
	  [currentTextView setTextColor:ViewInventory.colorTitle()];
	  [currentTextView setDrawsBackground:false];
	if (selectedItemIndex < 0) { selectedItemIndex = 1; }
	
	
	var accessory = NSComboBox.alloc().initWithFrame(NSMakeRect(paddingLeft+20,paddingBottom, 60, 24))
    accessory.addItemsWithObjectValues(retinaTextValues)
    accessory.selectItemAtIndex(selectedItemIndex)
	[[exportWindow contentView] addSubview:accessory];
	
	return accessory
}


var createAutoplayCheckbox = function(exportWindow) {
	var labelDescription = "Autoplay for Simulate Keynote"
	var paddingBottom = 113-17
	
	var titleAutoplay = [[NSTextField alloc] initWithFrame:NSMakeRect(paddingLeft + 21, paddingBottom, columnWidth, 16)];
    [titleAutoplay setEditable:false];
    [titleAutoplay setBordered:false];
    [titleAutoplay setFont:[NSFont boldSystemFontOfSize:smallFontSize]];
    [titleAutoplay setTextColor:lightColor];
    [titleAutoplay setDrawsBackground:false];
    [titleAutoplay setStringValue:labelDescription];
    [titleAutoplay sizeToFit];
    [[exportWindow contentView] addSubview:titleAutoplay];
	
	var autoplayCheckbox = [[NSButton alloc] initWithFrame:NSMakeRect(paddingLeft, paddingBottom, columnWidth, 16)];
	[autoplayCheckbox setButtonType:NSSwitchButton];
	[autoplayCheckbox setTitle:""];
	[autoplayCheckbox setState:configureAutoplay];
	autoplayCheckbox.setCOSJSTargetFunction(function(sender){
		configureAutoplay = configureAutoplay == 0 ? 1 : 0
	})
	[[exportWindow contentView] addSubview:autoplayCheckbox];
	
	return autoplayCheckbox
}


var createAutocodeCheckbox = function(exportWindow) {
	var labelDescription = "Auto Code support (On/Off)"
	var paddingBottom = 282-20
	
	var titleMinimalExport = [[NSTextField alloc] initWithFrame:NSMakeRect(paddingLeft+21, paddingBottom, columnWidth, 16)];
    [titleMinimalExport setEditable:false];
    [titleMinimalExport setBordered:false];
    [titleMinimalExport setFont:[NSFont boldSystemFontOfSize:smallFontSize]];
    [titleMinimalExport setTextColor:lightColor];
    [titleMinimalExport setDrawsBackground:false];
    [titleMinimalExport setStringValue:labelDescription];
    [titleMinimalExport sizeToFit];
    [[exportWindow contentView] addSubview:titleMinimalExport];
	
	var minimalExportCheckbox = [[NSButton alloc] initWithFrame:NSMakeRect(paddingLeft, paddingBottom, columnWidth, 16)];
	[minimalExportCheckbox setButtonType:NSSwitchButton];
	[minimalExportCheckbox setTitle:""];
	[minimalExportCheckbox setState:configureRetinaEnabled];
	minimalExportCheckbox.setCOSJSTargetFunction(function(sender){
		configureRetinaEnabled = configureRetinaEnabled == 0 ? 1 : 0
	})
	[[exportWindow contentView] addSubview:minimalExportCheckbox];
	
	return minimalExportCheckbox
}


var createMinimalExportCheckbox = function(exportWindow) {
	var labelDescription = "Minimal Export for Simulate Keynote"
	var paddingBottom = 140-17
	
	var titleMinimalExport = [[NSTextField alloc] initWithFrame:NSMakeRect(paddingLeft+21, paddingBottom, columnWidth, 16)];
    [titleMinimalExport setEditable:false];
		[[cellArray objectAtIndex:0] setTitle:cellTitle1];
		[[cellArray objectAtIndex:1] setTitle:cellTitle2];
		[myMatrix setCellSize:NSMakeSize(120, 24)]
		if (userDefaults.myCodeStyle == 0) { [myMatrix selectCellAtRow:1 column:0] }
		else { [myMatrix selectCellAtRow:0 column:0] }

		[myMatrix setCOSJSTargetFunction:function(sender) {
			var currentCellTitle = [[myMatrix selectedCell] title]
			if ([currentCellTitle isEqualToString:cellTitle2]) { userDefaults.myCodeStyle = 0 }
			else { userDefaults.myCodeStyle = 1 }
			saveDefaults(Status.userDomain(), userDefaults)
		}];

		return myMatrix
	}

var createRadioGroupStyle = function() {
	return minimalExportCheckbox
}


var createMobileCheckbox = function(exportWindow) {
	var labelDescription = "iPhone Prototyping"
	var paddingBottom = 303-17
	
	var titleMobile = [[NSTextField alloc] initWithFrame:NSMakeRect(paddingLeft+21, paddingBottom, columnWidth, 16)];
    [titleMobile setEditable:false];
    [titleMobile setBordered:false];
    [titleMobile setFont:[NSFont boldSystemFontOfSize:smallFontSize]];
    [titleMobile setTextColor:lightColor];
    [titleMobile setDrawsBackground:false];
    [titleMobile setStringValue:labelDescription];
    [titleMobile sizeToFit];
    [[exportWindow contentView] addSubview:titleMobile];
	
	var mobileCheckbox = [[NSButton alloc] initWithFrame:NSMakeRect(paddingLeft, paddingBottom, columnWidth, 16)];
	[mobileCheckbox setButtonType:NSSwitchButton];
	[mobileCheckbox setTitle:""];
	[mobileCheckbox setState:configureMobile];
	mobileCheckbox.setCOSJSTargetFunction(function(sender){
		configureMobile = configureMobile == 0 ? 1 : 0
	})
	[[exportWindow contentView] addSubview:mobileCheckbox];
	
	return mobileCheckbox
}

var createLogo = function(exportWindow) {
	var paddingBottom = 338-17
	
	var imagePath = pluginPath + '/images/' + 'logo' + isRetinaRequired() + '.png';
	var image = NSImage.alloc().initByReferencingFile(imagePath);
	var imageView = [[NSImageView alloc] initWithFrame:NSMakeRect(0, paddingBottom, 375, 82)];
	[imageView setImage: image];
	[[exportWindow contentView] addSubview:imageView];
}

var createTip = function(exportWindow) {
	var paddingBottom = 195-17
	
	var imagePath = pluginPath + '/images/' + 'tip' + isRetinaRequired() + '.png';
	var image = NSImage.alloc().initByReferencingFile(imagePath);
	var imageView = [[NSImageView alloc] initWithFrame:NSMakeRect(paddingLeft, paddingBottom, 270, 77)];
	[imageView setImage: image];
	[[exportWindow contentView] addSubview:imageView];
}

var createHelpButton = function(exportWindow) {	
    var helpButton = [[NSButton alloc] initWithFrame:NSMakeRect(375-30-24, 10, 32, 32)];
	[helpButton setBezelStyle:NSHelpButtonBezelStyle];
	[helpButton setTitle:nil];
	[helpButton setCOSJSTargetFunction:function(sender) {
	// densityAccessory.selectItemAtIndex(userDefaults.myRetinaEnabled)
	densityAccessory.selectItemAtIndex(0)
	[densityAccessory setFont:ViewInventory.fontAccessory()];

	densityAccessory.setCOSJSTargetFunction(function(sender){
			userDefaults.myRetinaEnabled = densityAccessory.indexOfSelectedItem()
			saveDefaults(Status.userDomain(), userDefaults)
	})


	var deviceAccessory = NSPopUpButton.alloc().initWithFrame(NSMakeRect(174, 220-4, 110, 28))
	[[deviceAccessory cell] setBezelStyle:NSTexturedRoundedBezelStyle];
	var devices = ScaleInventory.returnDevices()
	for (var i = 0; i < devices.length; i++) {
			deviceAccessory.addItemsWithTitles(devices[i])
			if (i != devices.length - 1) { [[deviceAccessory menu] addItem:[NSMenuItem separatorItem]] }
	}
	deviceAccessory.selectItemAtIndex(ScaleInventory.deviceToSelect(userDefaults.myDevice))
	[deviceAccessory setFont:ViewInventory.fontAccessory()];

	deviceAccessory.setCOSJSTargetFunction(function(sender) {
			userDefaults.myDevice = ScaleInventory.selectedDeviceIndex(deviceAccessory.indexOfSelectedItem())
			saveDefaults(Status.userDomain(), userDefaults)
			ToolbarInventory.updateAccessoryControls()
	})


	return [retinaInput, densityAccessory, deviceAccessory]
}



var createCheckViews = function() {

	var titleMinimalExport = [[NSTextField alloc] initWithFrame:NSMakeRect(measureSettingBlock*2+2, 88, measureSettingsWidth - measureSettingBlock*3, measureSettingBlock)];
  [titleMinimalExport setEditable:false];
  [titleMinimalExport setBordered:false];
	[titleMinimalExport setFont:ViewInventory.fontCheckControls()];
  [titleMinimalExport setTextColor:ViewInventory.colorBlack()];
  [titleMinimalExport setDrawsBackground:false];
  [titleMinimalExport setStringValue:" Use minimazed states in Prototypes"];
  [titleMinimalExport sizeToFit];

	var checkboxMinimalExport = [[NSButton alloc] initWithFrame:NSMakeRect(measureSettingBlock, 88-1, measureSettingBlock*12, measureSettingBlock)];
	[checkboxMinimalExport setButtonType:NSSwitchButton];
	[checkboxMinimalExport setTitle:""];
	[checkboxMinimalExport setState:userDefaults.myMinimalExport];
	checkboxMinimalExport.setCOSJSTargetFunction(function(sender){
		userDefaults.myMinimalExport = userDefaults.myMinimalExport == 0 ? 1 : 0
		saveDefaults(Status.userDomain(), userDefaults)
	})

	return [titleMinimalExport, checkboxMinimalExport]
}




var createVersionView = function() {
	var titleVersion = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 319-50+4, measureSettingsWidth, measureSettingBlock)];
	[titleVersion setEditable:false];
	[titleVersion setBordered:false];
	[titleVersion setFont:ViewInventory.fontCheckControls()];
	[titleVersion setTextColor:ViewInventory.colorVersion()];
	[titleVersion setDrawsBackground:false];
	[titleVersion setStringValue:"v" + pluginVersion];
	[titleVersion setAlignment:NSCenterTextAlignment];

	return titleVersion
}


var createHelpButton = function() {
  var helpButton = [[NSButton alloc] initWithFrame:NSMakeRect(measureSettingsWidth-32-20+2, 12, 32, 32)];
	[helpButton setBezelStyle:NSHelpButtonBezelStyle];
	[helpButton setTitle:nil];
	[helpButton setCOSJSTargetFunction:function(sender) {
			var url = NSURL.URLWithString(StatisticsInventory.getHelpLink());
			[[NSWorkspace sharedWorkspace] openURL:url]
	}];
	[helpButton setAction:"callAction:"]

	return helpButton
}

<MSG> Updated UI for new options

- Brand New UI
- Added dropdown for dimensions
- Updated labels

<DFF> @@ -9,7 +9,7 @@ var configureAutoplay = nil
 
 var block = 40
 var paddingLeft = 30
-var columnWidth = 375-30*2
+var columnWidth = 275-30*2
 
 var smallFontSize = 13
 
@@ -27,14 +27,14 @@ var runSettings = function() {
 	initConfigureValues()
 	
 	var exportWindow = [[NSWindow alloc] init]
-	[exportWindow setFrame:NSMakeRect(0, 0, 375, 420) display:false];
+	[exportWindow setFrame:NSMakeRect(0, 0, 275, 430) display:false];
 	[exportWindow setBackgroundColor:backgroundColor];
 	
 		
 	createLogo(exportWindow)
 	createMobileCheckbox(exportWindow)
 	createTip(exportWindow)
-	createAutocodeCheckbox(exportWindow)
+	var dimensionsType = createAutocodeDropdown(exportWindow)
 	var retinaValueField = createRetinaValueInput(exportWindow)
 	var retinaStringField = createRetinaStringInput(exportWindow)
 	
@@ -45,7 +45,7 @@ var runSettings = function() {
 
 
 	
-	var saveButton = [[NSButton alloc] initWithFrame:NSMakeRect(paddingLeft - 6, 0, 78, 50)];
+	var saveButton = [[NSButton alloc] initWithFrame:NSMakeRect(paddingLeft - 6, 0, 64, 50)];
 	[saveButton setTitle:"Save"];
 	[saveButton setBezelStyle:NSRoundedBezelStyle];
 	[saveButton setKeyEquivalent:"\r"];
@@ -53,6 +53,7 @@ var runSettings = function() {
 		[exportWindow orderOut:nil]
 		[NSApp stopModal]
 		
+		configureRetinaEnabled = dimensionsType.indexOfSelectedItem()
 		configureRetinaValue = retinaValues[retinaValueField.indexOfSelectedItem()]
 		configureRetinaString = retinaStringField.stringValue()
 		saveSettings()
@@ -61,7 +62,7 @@ var runSettings = function() {
 	[[exportWindow contentView] addSubview:saveButton];
 	
 	
-	var cancelButton = [[NSButton alloc] initWithFrame:NSMakeRect(paddingLeft + 78 - 6, 0, 72, 50)];
+	var cancelButton = [[NSButton alloc] initWithFrame:NSMakeRect(paddingLeft + 78 - 22, 0, 72, 50)];
 	[cancelButton setTitle:"Cancel"];
 	[cancelButton setBezelStyle:NSRoundedBezelStyle];
 	[cancelButton setKeyEquivalent:"\033"]
@@ -72,6 +73,8 @@ var runSettings = function() {
 	[cancelButton setAction:"callAction:"]
 	[[exportWindow contentView] addSubview:cancelButton];
 	
+	if (configureRetinaEnabled == 0) { exportWindow.makeFirstResponder(retinaValueField) }
+	else { exportWindow.makeFirstResponder(retinaStringField) }
 	
 	[NSApp runModalForWindow:exportWindow];
 }
@@ -96,7 +99,7 @@ var saveSettings = function() {
 	
 	saveDefaults(userDefaults)
 	
-	[currentDocument showMessage:"Settings saved"]
+	[currentDocument showMessage:"Framer Inventory: Settings Saved"]
 }
 
 function isRetinaRequired() {
@@ -110,37 +113,43 @@ function isRetinaRequired() {
 
 
 
+// COMPOSE UI
 
-var createRetinaStringInput = function(exportWindow) {
-	var labelDescription = "Off"
-	var labelPlaceholder = "Ex: \"retina\""
-	var paddingBottom = 220-17
-	
-	// var titleRetina = [[NSTextField alloc] initWithFrame:NSMakeRect(paddingLeft+100, paddingBottom + 24, 140, 16)];
-//     [titleRetina setEditable:false];
-//     [titleRetina setBordered:false];
-//     [titleRetina setFont:[NSFont boldSystemFontOfSize:smallFontSize]];
-//     [titleRetina setTextColor:lightColor];
-//     [titleRetina setDrawsBackground:false];
-//     [titleRetina setStringValue:labelDescription];
-//     [titleRetina sizeToFit];
-//     [[exportWindow contentView] addSubview:titleRetina];
-    
-	var retinaInput = [[NSTextField alloc] initWithFrame:NSMakeRect(paddingLeft+100, paddingBottom+2, 140, 20)];
-    [[retinaInput cell] setPlaceholderString:labelPlaceholder];
-	// [retinaInput setFocusRingType:NSFocusRingTypeNone];
-    [retinaInput setBordered:false];
-    [retinaInput setBackgroundColor:fieldColor];
-    [retinaInput setStringValue:configureRetinaString];
-    [[exportWindow contentView] addSubview:retinaInput];
+var createAutocodeDropdown = function(exportWindow) {
+	var labelDescription = "Dimensions"
+	var paddingBottom = 294-17+5+10
+
+	var selectedItemIndex = configureRetinaEnabled
+	var dimensionsValues = ["Pixels with Multiplier", "Points with Variable"]
+	if (selectedItemIndex < 0) { selectedItemIndex = 0; }
+
+	var accessory = NSComboBox.alloc().initWithFrame(NSMakeRect(paddingLeft,paddingBottom-4, columnWidth, 28))
+	accessory.addItemsWithObjectValues(dimensionsValues)
+	accessory.selectItemAtIndex(selectedItemIndex)
 	
-	return retinaInput
-}
+	// var tempColor = [NSColor colorWithSRGBRed:0.71 green:0.71 blue:0.71 alpha:1.00]
+	// [accessory setBackgroundColor:tempColor];
+	[accessory setFont:[NSFont boldSystemFontOfSize:smallFontSize]];
+	// [accessory setFocusRingType:NSFocusRingTypeNone];
+	[[exportWindow contentView] addSubview:accessory];
+	
+	
+	var titleMinimalExport = [[NSTextField alloc] initWithFrame:NSMakeRect(paddingLeft, paddingBottom+24, columnWidth, 16)];
+    [titleMinimalExport setEditable:false];
+    [titleMinimalExport setBordered:false];
+    [titleMinimalExport setFont:[NSFont boldSystemFontOfSize:smallFontSize]];
+    [titleMinimalExport setTextColor:lightColor];
+    [titleMinimalExport setDrawsBackground:false];
+    [titleMinimalExport setStringValue:labelDescription];
+    [titleMinimalExport sizeToFit];
+    [[exportWindow contentView] addSubview:titleMinimalExport];
 
+	return accessory
+}
 
 var createRetinaValueInput = function(exportWindow) {
-	var labelDescription = "On"
-	var paddingBottom = 220-17
+	var labelDescription = "Pixels"
+	var paddingBottom = 239-17+5+10
 	
 	var selectedItemIndex = -1
 	var retinaTextValues = []
@@ -153,72 +162,76 @@ var createRetinaValueInput = function(exportWindow) {
 	if (selectedItemIndex < 0) { selectedItemIndex = 1; }
 	
 	
-	var accessory = NSComboBox.alloc().initWithFrame(NSMakeRect(paddingLeft+20,paddingBottom, 60, 24))
+	var accessory = NSComboBox.alloc().initWithFrame(NSMakeRect(paddingLeft+10,paddingBottom-4, 80, 28))
     accessory.addItemsWithObjectValues(retinaTextValues)
     accessory.selectItemAtIndex(selectedItemIndex)
+	[accessory setFont:[NSFont boldSystemFontOfSize:smallFontSize]];
 	[[exportWindow contentView] addSubview:accessory];
 	
 	return accessory
 }
 
-
-var createAutoplayCheckbox = function(exportWindow) {
-	var labelDescription = "Autoplay for Simulate Keynote"
-	var paddingBottom = 113-17
-	
-	var titleAutoplay = [[NSTextField alloc] initWithFrame:NSMakeRect(paddingLeft + 21, paddingBottom, columnWidth, 16)];
-    [titleAutoplay setEditable:false];
-    [titleAutoplay setBordered:false];
-    [titleAutoplay setFont:[NSFont boldSystemFontOfSize:smallFontSize]];
-    [titleAutoplay setTextColor:lightColor];
-    [titleAutoplay setDrawsBackground:false];
-    [titleAutoplay setStringValue:labelDescription];
-    [titleAutoplay sizeToFit];
-    [[exportWindow contentView] addSubview:titleAutoplay];
+var createRetinaStringInput = function(exportWindow) {
+	var labelDescription = "Points"
+	var labelPlaceholder = "Ex: \"retina\""
+	var paddingBottom = 239-17+5+10
+    
+	var retinaInput = [[NSTextField alloc] initWithFrame:NSMakeRect(paddingLeft+115, paddingBottom, 90, 20)];
+    [[retinaInput cell] setPlaceholderString:labelPlaceholder];
+	// [retinaInput setFocusRingType:NSFocusRingTypeNone];
+    [retinaInput setBordered:false];
+    [retinaInput setBackgroundColor:fieldColor];
+    [retinaInput setStringValue:configureRetinaString];
+	[retinaInput setFont:[NSFont boldSystemFontOfSize:smallFontSize]];
+    [[exportWindow contentView] addSubview:retinaInput];
 	
-	var autoplayCheckbox = [[NSButton alloc] initWithFrame:NSMakeRect(paddingLeft, paddingBottom, columnWidth, 16)];
-	[autoplayCheckbox setButtonType:NSSwitchButton];
-	[autoplayCheckbox setTitle:""];
-	[autoplayCheckbox setState:configureAutoplay];
-	autoplayCheckbox.setCOSJSTargetFunction(function(sender){
-		configureAutoplay = configureAutoplay == 0 ? 1 : 0
-	})
-	[[exportWindow contentView] addSubview:autoplayCheckbox];
+	return retinaInput
+}
+
+
+var createTip = function(exportWindow) {
+	var paddingBottom = 178-17+5+10
 	
-	return autoplayCheckbox
+	var imagePath = pluginPath + '/images/' + 'tip' + isRetinaRequired() + '.png';
+	var image = NSImage.alloc().initByReferencingFile(imagePath);
+	var imageView = [[NSImageView alloc] initWithFrame:NSMakeRect(0, paddingBottom, 275, 110)];
+	[imageView setImage: image];
+	[[exportWindow contentView] addSubview:imageView];
 }
 
 
-var createAutocodeCheckbox = function(exportWindow) {
-	var labelDescription = "Auto Code support (On/Off)"
-	var paddingBottom = 282-20
+
+
+
+var createMobileCheckbox = function(exportWindow) {
+	var labelDescription = "iPhone Prototyping"
+	var paddingBottom = 140-17+10-2
 	
-	var titleMinimalExport = [[NSTextField alloc] initWithFrame:NSMakeRect(paddingLeft+21, paddingBottom, columnWidth, 16)];
-    [titleMinimalExport setEditable:false];
-    [titleMinimalExport setBordered:false];
-    [titleMinimalExport setFont:[NSFont boldSystemFontOfSize:smallFontSize]];
-    [titleMinimalExport setTextColor:lightColor];
-    [titleMinimalExport setDrawsBackground:false];
-    [titleMinimalExport setStringValue:labelDescription];
-    [titleMinimalExport sizeToFit];
-    [[exportWindow contentView] addSubview:titleMinimalExport];
+	var titleMobile = [[NSTextField alloc] initWithFrame:NSMakeRect(paddingLeft+21, paddingBottom, columnWidth, 16)];
+    [titleMobile setEditable:false];
+    [titleMobile setBordered:false];
+    [titleMobile setFont:[NSFont boldSystemFontOfSize:smallFontSize]];
+    [titleMobile setTextColor:lightColor];
+    [titleMobile setDrawsBackground:false];
+    [titleMobile setStringValue:labelDescription];
+    [titleMobile sizeToFit];
+    [[exportWindow contentView] addSubview:titleMobile];
 	
-	var minimalExportCheckbox = [[NSButton alloc] initWithFrame:NSMakeRect(paddingLeft, paddingBottom, columnWidth, 16)];
-	[minimalExportCheckbox setButtonType:NSSwitchButton];
-	[minimalExportCheckbox setTitle:""];
-	[minimalExportCheckbox setState:configureRetinaEnabled];
-	minimalExportCheckbox.setCOSJSTargetFunction(function(sender){
-		configureRetinaEnabled = configureRetinaEnabled == 0 ? 1 : 0
+	var mobileCheckbox = [[NSButton alloc] initWithFrame:NSMakeRect(paddingLeft, paddingBottom, columnWidth, 16)];
+	[mobileCheckbox setButtonType:NSSwitchButton];
+	[mobileCheckbox setTitle:""];
+	[mobileCheckbox setState:configureMobile];
+	mobileCheckbox.setCOSJSTargetFunction(function(sender){
+		configureMobile = configureMobile == 0 ? 1 : 0
 	})
-	[[exportWindow contentView] addSubview:minimalExportCheckbox];
+	[[exportWindow contentView] addSubview:mobileCheckbox];
 	
-	return minimalExportCheckbox
+	return mobileCheckbox
 }
 
-
 var createMinimalExportCheckbox = function(exportWindow) {
-	var labelDescription = "Minimal Export for Simulate Keynote"
-	var paddingBottom = 140-17
+	var labelDescription = "Minimal Export"
+	var paddingBottom = 110-17+10-1
 	
 	var titleMinimalExport = [[NSTextField alloc] initWithFrame:NSMakeRect(paddingLeft+21, paddingBottom, columnWidth, 16)];
     [titleMinimalExport setEditable:false];
@@ -242,55 +255,49 @@ var createMinimalExportCheckbox = function(exportWindow) {
 	return minimalExportCheckbox
 }
 
-
-var createMobileCheckbox = function(exportWindow) {
-	var labelDescription = "iPhone Prototyping"
-	var paddingBottom = 303-17
+var createAutoplayCheckbox = function(exportWindow) {
+	var labelDescription = "Autoplay"
+	var paddingBottom = 80-17+10
 	
-	var titleMobile = [[NSTextField alloc] initWithFrame:NSMakeRect(paddingLeft+21, paddingBottom, columnWidth, 16)];
-    [titleMobile setEditable:false];
-    [titleMobile setBordered:false];
-    [titleMobile setFont:[NSFont boldSystemFontOfSize:smallFontSize]];
-    [titleMobile setTextColor:lightColor];
-    [titleMobile setDrawsBackground:false];
-    [titleMobile setStringValue:labelDescription];
-    [titleMobile sizeToFit];
-    [[exportWindow contentView] addSubview:titleMobile];
+	var titleAutoplay = [[NSTextField alloc] initWithFrame:NSMakeRect(paddingLeft + 21, paddingBottom, columnWidth, 16)];
+    [titleAutoplay setEditable:false];
+    [titleAutoplay setBordered:false];
+    [titleAutoplay setFont:[NSFont boldSystemFontOfSize:smallFontSize]];
+    [titleAutoplay setTextColor:lightColor];
+    [titleAutoplay setDrawsBackground:false];
+    [titleAutoplay setStringValue:labelDescription];
+    [titleAutoplay sizeToFit];
+    [[exportWindow contentView] addSubview:titleAutoplay];
 	
-	var mobileCheckbox = [[NSButton alloc] initWithFrame:NSMakeRect(paddingLeft, paddingBottom, columnWidth, 16)];
-	[mobileCheckbox setButtonType:NSSwitchButton];
-	[mobileCheckbox setTitle:""];
-	[mobileCheckbox setState:configureMobile];
-	mobileCheckbox.setCOSJSTargetFunction(function(sender){
-		configureMobile = configureMobile == 0 ? 1 : 0
+	var autoplayCheckbox = [[NSButton alloc] initWithFrame:NSMakeRect(paddingLeft, paddingBottom, columnWidth, 16)];
+	[autoplayCheckbox setButtonType:NSSwitchButton];
+	[autoplayCheckbox setTitle:""];
+	[autoplayCheckbox setState:configureAutoplay];
+	autoplayCheckbox.setCOSJSTargetFunction(function(sender){
+		configureAutoplay = configureAutoplay == 0 ? 1 : 0
 	})
-	[[exportWindow contentView] addSubview:mobileCheckbox];
+	[[exportWindow contentView] addSubview:autoplayCheckbox];
 	
-	return mobileCheckbox
+	return autoplayCheckbox
 }
 
+
+
+
+
 var createLogo = function(exportWindow) {
-	var paddingBottom = 338-17
+	var paddingBottom = 358-17
 	
 	var imagePath = pluginPath + '/images/' + 'logo' + isRetinaRequired() + '.png';
 	var image = NSImage.alloc().initByReferencingFile(imagePath);
-	var imageView = [[NSImageView alloc] initWithFrame:NSMakeRect(0, paddingBottom, 375, 82)];
+	var imageView = [[NSImageView alloc] initWithFrame:NSMakeRect(0, paddingBottom, 275, 62)];
 	[imageView setImage: image];
 	[[exportWindow contentView] addSubview:imageView];
 }
 
-var createTip = function(exportWindow) {
-	var paddingBottom = 195-17
-	
-	var imagePath = pluginPath + '/images/' + 'tip' + isRetinaRequired() + '.png';
-	var image = NSImage.alloc().initByReferencingFile(imagePath);
-	var imageView = [[NSImageView alloc] initWithFrame:NSMakeRect(paddingLeft, paddingBottom, 270, 77)];
-	[imageView setImage: image];
-	[[exportWindow contentView] addSubview:imageView];
-}
 
 var createHelpButton = function(exportWindow) {	
-    var helpButton = [[NSButton alloc] initWithFrame:NSMakeRect(375-30-24, 10, 32, 32)];
+    var helpButton = [[NSButton alloc] initWithFrame:NSMakeRect(275-30-24, 10, 32, 32)];
 	[helpButton setBezelStyle:NSHelpButtonBezelStyle];
 	[helpButton setTitle:nil];
 	[helpButton setCOSJSTargetFunction:function(sender) {

Updated UI for new options