phetsims / vegas

Reusable game components for PhET simulations.
MIT License
1 stars 4 forks source link

LevelStartButton: add option for shadow offet #20

Closed pixelzoom closed 10 years ago

pixelzoom commented 10 years ago

This is currently hardcoded as a percentage of buttonWidth:

var shadowOffset = 0.026 * options.buttonWidth;

Using a percentage gives an inconsistent look; all buttons should have the same drop shadow offset. Otherwise 2 buttons of different sizes will look odd when placed side-by-side.

Current clients of LevelStartButton have these computed shadowOffset values:

area-build 3.9 arithmetic 3.51 balancing-act 3.9 balancing-chemical-equations 4.03 fraction-matcher 2.34 graphing-lines 4.55

So I'm going to add this option and default, which clients are welcome to override:

shadowOffset: 4

pixelzoom commented 10 years ago

I looked at all clients of LevelStartButton, and a default of shadowOffset:3 looked better to my eye.

Assigning to @jbphet for review.

jbphet commented 10 years ago

Code looks good, and behavior seems to work in the sims I tested. I went back to an offset of 4 for AreaBuilder (just looked better to my eye), left all others alone. Closing.