Add a none option to the simulator for the color sensor and colorEnumPicker extension (#1018)
* Update colorGrid.ts * Update ns.ts Added option to select emptiness (nothing) for the colorEnumPicker block. * set-new-names-for-color-cells Set new names for colored cells that pops up when hovering over an element. So the user will understand the color. * Update sim/visuals/controls/colorGrid.ts Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com> --------- Co-authored-by: Joey Wunderlich <jwunderl@users.noreply.github.com>
This commit is contained in:
		@@ -1,5 +1,3 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
namespace sensors {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -9,9 +7,9 @@ namespace sensors {
 | 
			
		||||
    //% blockId=colorEnumPicker block="%color" shim=TD_ID
 | 
			
		||||
    //% weight=0 blockHidden=1 turnRatio.fieldOptions.decompileLiterals=1
 | 
			
		||||
    //% color.fieldEditor="colorenum"
 | 
			
		||||
    //% color.fieldOptions.colours='["#f12a21", "#ffd01b", "#006db3", "#00934b", "#000000", "#6c2d00", "#ffffff"]'
 | 
			
		||||
    //% color.fieldOptions.colours='["#f12a21", "#ffd01b", "#006db3", "#00934b", "#000000", "#6c2d00", "#ffffff", "#dfe6e9"]'
 | 
			
		||||
    //% color.fieldOptions.columns=2 color.fieldOptions.className='legoColorPicker'
 | 
			
		||||
    export function __colorEnumPicker(color: ColorSensorColor): number {
 | 
			
		||||
        return color;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}                       
 | 
			
		||||
		Reference in New Issue
	
	Block a user