MouseDown

Button states in QC app — Best approach

usefuldesign.au's picture

I have an app i am building in QC that will have >20 buttons that need to be 'clickable'. They will mostly have on and off states showing an LED light or dark and a bit of glow around the LED on the panel artwork I guess.

I'm wondering if the best way to do the Artwork is to have two full screen images of the Front Panel as TIFF or PDF artwork — with all buttons in OFF state and another with all buttons (LEDs) in the ON state. Then use an Core Image Accumulator patch to mask/unmask the ON image in regions where particular buttons are ON.

The other way I'm considering is to maybe draw a single button and surround in an iterator and use a (x,y) co-ordinates structure to place all the instances of the ON / OFF image on the screen. Probably do the hit testing inside the iterator too in that case.

Are there any tried and true methodologies in QC?

I've seen the masking approach used in Mac app resources in the past I seem to remember.

Obviously Flash/HTML+JS approaches don't really apply with QC lacking a DOM but maybe there's some wisdom to be gleaned there too?