2007-03-27, 09:58 AM
Set up some sort of update variable and have it set to false.
Then when you timer does it's thing set updateScreen to true. That will trigger needsrendering, then you can reset it back to false;
Or as part of NeedRendereing you can test the value of your timer against something rather than wait for the timer event to kick off (if that's what you are doing).
Code:
public bool needsRendering()
{
// TODO: Add needsRendering implementation
if (updateScreen)
{
return true;
updateScreen= false;
}
else
return false;
return updateScreen;
}
Then when you timer does it's thing set updateScreen to true. That will trigger needsrendering, then you can reset it back to false;
Or as part of NeedRendereing you can test the value of your timer against something rather than wait for the timer event to kick off (if that's what you are doing).