CONTROLS
Fix buttons' background
I have four buttons that I animate but with the new systems the background of the buttons are no longer white so I can't just erase before I redraw. How can I get the color of the button so I can paint that color before I redraw the button?
Ok, George. I'm slow, but I finally have a clear understanding of what is going on. My recommendation is probably going to be unexpected: I would suggest that you do not use buttons.
Create a picture of the button pressed and popped up. This is a list of things that you will track manually...
FN drawButton
-------------
If the button is pressed, draw the pressed picture, otherwise draw the popped picture
FN updateWindow
-------------
Call FN drawButton along with your other window update calls.
FN clickButton
-------------
Track the mouse in and out of the button's rect. Call FN drawButton during this tracking
FN idleButton
-------------
rgn& = FN NEWRGN
CALL GETCLIP(rgn&)
' Assume that "t" of t,l,b,r is control rect
' want to redraw the beveled edges, just the center.
CALL INSETRECT(t,4,4) Dont
CALL CLIPRECT(t)
FN drawButton
CALL SETCLIP(rgn&)
CALL DISPOSERGN(rgn&)
|