Sign in to follow this  
Guest bartels

SHOW/HIDE...

Recommended Posts

How was that... Showing/Hiding macros? I actually don't understand the description of SHOW/HIDE_IMAGE(blabla) in sd2gau14.zip; I thought in a plist things are drawn 'from bottom to top', i. e. the top item in the list will be drawn at the top. Now to come to the SHOW/HIDE desc in Dai's document, to me it seems like that: next_element[0] is the background image (lowest drawn). Why is next_element[1] then the top-most drawn thing, 2 the next lower etc.?? Don't actually understand the order.By the way, Has elements_list always to be [0]?(From sd2gau14.zip:)

PELEMENT_HEADER plist1[] ={&switch_on.header,&gyro_fail.header,&fail_light_on.header,&light_off.header,NULL};SHOW_IMAGE(pgauge->elements_list[0]->next_element[1]);	//&switch_on.headerSHOW_IMAGE(pgauge->elements_list[0]->next_element[2]);	//&gyro_fail.headerSHOW_IMAGE(pgauge->elements_list[0]->next_element[3]);	//&fail_light_on.headerSHOW_IMAGE(pgauge->elements_list[0]->next_element[4]);	//&light_off.header

Currently just getting FS crashing with that.Thanks,Etienne

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

The abswer is not too easy, since there is a twodimansioanl arrangement possible.First there is the list of plist's, which chain image element to image element. backgrond is first drawn the other follow (adding ->next_element[]s). In the plist itself a second set of drawing order is established (running through next_element[0],next_element[1]).In your example background is pgauge->elements_list[0], switch_on is pgauge->elements_list[0]->next_element[0], gyro_fail is pgauge->elements_list[0]->next_element[1], fail_light_on is pgauge->elements_list[0]->next_element[2], light off is pgauge->elements_list[0]->next_element[3].pgauge->elements_list[0]->next_element[4] is NULL and accessing will certainly crash FS.For each new plist a ->next_element[] is attached, for each plist the index for the next_element[] array starts with 0 and increases.Arne Bartels

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this