Table of Contents

 
ResizeHotSpot
 

Purpose

Resizes a hotspot's dimensions

 

Protoype

void CButtonMngr::ResizeHotSpot (string str_button, int i_new_w = NO_CHANGE, int i_new_h = NO_CHANGE)
 

Parameters

button the ID of the hotspot to resize
new_w the new width in pixels
new_h the new height in pixels
 

Description

Since hotspots cannot be seen and are meant to cover areas they have to be able to be resized in case the area they are covering resizes. This function does that by taking the hotspot ID'd with str_button and changing it's height and width properties to match those passed in with i_new_w and i_new_h. If you only want to change one of the dimensions and leave the other alone then you can use the predefined constant NO_CHANGE.

 

Use

CButtonMngr button;
// change both sides
button.ResizeHotSpot("my_hotspot", 50, 50);
// change on side only
button.ResizeHotSpot("my_hotspot", NO_CHANGE, 50);
button.ResizeHotSpot("my_hotspot", 50);
 

Prev: RenderButtons
Next: Revert