Hiliting / Un-Hiliting (D4D)
Posted: Mon May 06, 2019 3:22 pm
I am experiencing problems with un-hiliting an entity in my current D4D project, and I am hoping Mark or Dave may be able to outline the correct usage of the D4D hiliting methods? I've outlined what I am currently doing below.
I'm using the code below to hilite an entity:
The entity is being hilited as expected.
I have tried various code to un-hilite the entity. My current logic is shown below (the unhilite_all and ssClear were added in desperation):
The entity is un-hilited and drawn on the screen correctly with the above code. If I refresh the screen from the display list then it remains drawn correctly. BUT if I redraw the screen the hilite returns and I cannot get rid of it.
I have tried adding an unhlite_all call to the main menu of the macro (hopefully to un-hilite anything that is inadvertently left hilited when the macro returns to that menu), but that has no effect. I am not certain of the significance of the add and nolog parameters to the unhilite_all procedure, but I have tried various values with no effect.
I am using hi_lite in one or 2 other places in the macro and the un-hilite seems to work properly there, but I cannot see what I am doing differently in the above case. I am probably missing something basic, but any help would be appreciated.
Thanks,
David H.
I'm using the code below to hilite an entity:
Code: Select all
hi_lite (true, l^.ent, true, true);
The entity is being hilited as expected.
I have tried various code to un-hilite the entity. My current logic is shown below (the unhilite_all and ssClear were added in desperation):
Code: Select all
hi_lite (false, l^.ent, false, true);
unhilite_all (true, true, false);
ssClear(hilite_ss);
The entity is un-hilited and drawn on the screen correctly with the above code. If I refresh the screen from the display list then it remains drawn correctly. BUT if I redraw the screen the hilite returns and I cannot get rid of it.
I have tried adding an unhlite_all call to the main menu of the macro (hopefully to un-hilite anything that is inadvertently left hilited when the macro returns to that menu), but that has no effect. I am not certain of the significance of the add and nolog parameters to the unhilite_all procedure, but I have tried various values with no effect.
I am using hi_lite in one or 2 other places in the macro and the un-hilite seems to work properly there, but I cannot see what I am doing differently in the above case. I am probably missing something basic, but any help would be appreciated.
Thanks,
David H.