Superimposing DrawLines onto FillRect

Hi,

I'm trying to create a dual task in which Task One requires participants to continuously respond (button press) in order to change the color of a rectangle. Within that rectangle, Task Two is presented, and this is a simple fixation-cue-target kind of task, that only requires one response following presentation of the target. What is the best way to present the color-changing rectangle simultaneously with the stimuli from Task Two (fixation, cue, target) imposed on it, but still allow the color of the rectangle to change? It is critical that the color of the rectangle can be updated while these stimuli are being presented.

I am concerned that when I flip the stimuli for Task Two, that the rectangle color (which should change with each button press) will not change with each button press and that, instead, the color that the rectangle was at the beginning of the command to draw the fixation/cue/target is what the rectangle color will be for the entire duration of the fixation/cue/target. I can provide more details if needed.

Thanks,
Jamie