Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!unmvax!rye.cs.unm.edu!stone From: stone@rye.cs.unm.edu (Andrew Stone) Newsgroups: comp.sys.next Subject: Re: Overlapping Button Matrices, upper doesn't occlude lower Message-ID: <574@unmvax.unm.edu> Date: 20 Nov 89 15:45:31 GMT References: <616@ncis.tis.llnl.gov> Sender: news@unmvax.unm.edu Reply-To: stone@rye.cs.unm.edu () Distribution: usa Organization: University of New Mexico at Albuquerque Lines: 35 In article <616@ncis.tis.llnl.gov> carlson@lance.tis.llnl.gov (John Carlson) writes: > >I decided to build a small keyboard with Interface Builder >(much like Synthesizer.app). I decided to use two button matrices, >one matrix for the white keys, and the other for the black keys >(with Transparent, Disabled for B-C and E-F gaps). I used two >icons for the white keys (pressed and normal) and two for the black. >The prototype button was able to play the System sound I specified, but >neither the Test Mode or compiled version would play the sound (I >tried one sound for all buttons in the matrix). > >When testing and in the final version, if I pressed a white key, >The white icon would draw over the black icon. Does someone >have an easy fix which would keep the black matrix from being >drawn over? > >Thanks, > >John Carlson >carlson@tis.llnl.gov I had a similar problem with CharFind, since the virtual keyboard has staggered keys. The solution: Blit your hiliting on yourself. Have your keys be transparent, and a subview of KeyBoardView. KeyBoardView is the keyboard's bits without any key down. When a button gets a mousedown, blit its highlight onto the keyBoardView,SOVER. On mouseUp, send keyBoardView a display message. You'll have to subClass matrix to override the mousedown. andrew ||<<++>>||<<-->>||<<==>>||<<++>>||<>||<<++>>||<<-->>||<<==>>||<<++>>|| !! Andrew Stone !! Stone Design Software !! !! stone@hydra.unm.edu <> Albuquerque, New Mexico !! ||<<++>>||<<-->>||<<==>>||<<++>>||<>||<<++>>||<<-->>||<<==>>||<<++>>||