From Adam Dawes · 1996-04-11 01:20 · #75574 in AMOS_ECHO
In reply to Another problem by Ross Nicoll
Hi Ross!
RN> Another little problem. With hotkeys, when the hotkey for a gadget is
RN> pressed, it looks good if the gadget looks like it's been clicked on. Is
RN> there any easy way to do this, or do I just change it so it looks
RN> clicked and redraw?
Despite argument from the contrary that is /bound/ to appear, there's no system-legal way to achieve exactly what you want. However, you could get around it via one of the following ways:
(i) don't use gadtools (but please don't use this solution if you can
help it ;)
(ii) write a BOOPSI class for buttons and use that. Then you can send
it a message to ask it to activate itself (and the gadget can redraw
itself in the "highlighted" position)
(iii) Draw a rectangle over the button so that it looks like it's been
depressed. Use the complement drawing mode to stop it erasing the
button
#include <stdio.h>/*Adam Dawes,ad32@brighton.ac.uk,Adam Dawes@2:441/93.5*/
int main(){char d[]="DEICEHIBEAHAJBJBJAJIAEFFHAHJAHJAHJHJIECHAHKGHFGHCGII"
,s[]=" /-)| \\_",*p=d,c;s[5]=10;while (*p){c=*p++^=64;if(c<5)for(;c>0;c--)
putchar(*s);else putchar(*(s+c-4));}return(0);}/*C sig by Adam Dawes '95*/
--- Spot 1.3a #1051
* Origin: "Reflected-sound-of-underground-spirits?" (2:441/93.5)