microsoft / pxt-ev3

Microsoft MakeCode editor for the LEGO MINDSTORMS EV3 Brick
https://makecode.mindstorms.com/
Other
54 stars 39 forks source link

Add a none option to the simulator for the color sensor and colorEnumPicker extension #1018

Closed THEb0nny closed 1 year ago

THEb0nny commented 1 year ago

Add a void option to the simulator for the color sensor. Now emptiness can be chosen non-intuitively. There is no option. But, if you click on the circle with the selected color again, then the none option is activated, I think that this is not clear to users, so I added a separate circle.

THEb0nny commented 1 year ago

image

THEb0nny commented 1 year ago

If you first select any color, and then click on it a second time, then none is activated and the selection also goes to it.

THEb0nny commented 1 year ago

Added option to select emptiness (nothing) for the colorEnumPicker block.

image

THEb0nny commented 1 year ago

I think there is no way to change the signature for these blocks, it displays the hex code.

THEb0nny commented 1 year ago

It would be nice if the absence of color displayed as transparency... image

THEb0nny commented 1 year ago

I changed the code so that the color names are displayed in the popup window (title attribute) instead of the hex codes.

image

image

image

image

THEb0nny commented 1 year ago

@jwunderl see changes please

THEb0nny commented 1 year ago

I changed gray to brown but didn't have time to send?

jwunderl commented 1 year ago

Ah sorry, merged to prep a beta build before I'm out for the day (/v1.4.32 should be up in about 5 minutes), feel free to file as a separate pr -- I'll have to read through the file one more time anyways to make sure it won't mess up block upgrades / etc