Table of Contents

 
Revert
 

Purpose

Changes a button from an over state back to a normal state

 

Protoype

void CButtonMngr::Revert (string str_button = "")
 

Parameters

button the ID of the new button with a mouse-over
 

Description

The CButton class keeps track of which button has a mouse-over event and which button had a mouse-over event with this function. The routine can be used in two ways. When a button first receives a mouse-over event, it calls this function and passes along it's ID. In this case the function reverts the previous button to an up-state and logs that this is the next button to be reverted. If you pass nothing in for str_button then the function will revert the previous button and log no new button - this would happen if the cursor moved off a button and not onto another one. This function also reverts cursors that have changed froma mouse-over event.

 

Use

CButtonMngr button;
// revert previous button and set new one
button.Revert("my_button");
// no revert my_button and set no new button
button.Revert();
 

Prev: ResizeHotSpot