Table of Contents

 
ShowImage
 

Purpose

Shows or hides an image or many images

 

Protoype

void CImageMngr::ShowImage (bool b_show, string str_img_id, exclude ex_list = exclude(), int i_flag = LIST_IN)
 

Parameters

show whether to show (TRUE) or hide (FALSE) the images
img_id the ID of the image object to show/hide
list the list of image objects to exclude or include in function
flag whether to exclude objects not in the list (LIST_OUT) or objects in the list (LIST_IN)
 

Description

This function shows or hides an image. If you want to show an image you must pass its ID in for str_img_id along with TRUE for b_show. Passing in FALSE instead will hide the image.

Affecting Multiple Objects

If you want to affect more than one image object at once, then you can use the last two parameters of the function. First you must compile a list (an STL vector) of objects that you want to either exclude or include. If you want to affect all image objects except certain ones, pass those in for ex_list along with the flag LIST_IN. If you want to affect only a certain set of objects, pass those in for ex_list along with the flag LIST_OUT. You should also pass ALL_IMAGES for str_image_id.

 

Use

CImageMngr image;
// show one image object
image.ShowImage(true, "my_image");
// hide ALL image objects except "my_image"
exclude ex_list;
ex_list.push_back("my_image");
image.ShowImage(false, ALL_IMAGES, ex_list, LIST_IN);
// show ONLY these three image objects
exclude ex_list;
ex_list.push_back("my_image1");
ex_list.push_back("my_image2");
ex_list.push_back("my_image3");
image.ShowImage(true, ALL_IMAGES, ex_list, LIST_OUT);
 

Prev: SetAlpha