Home › Forums › General discussions › Need help with editable hotspots. › Reply To: Need help with editable hotspots.
December 20, 2018 at 08:45
#4425
Keymaster
OK, then I need to explain where to put the code fragments I wrote.
Use your 2D code as in the picture top part, and in the parameter list add a parameter dsp, hide the parameter rsp.
To the param script insert:
if GLOB_MODPAR_NAME = "rsp" then
dsp = rsp * 2
parameters dsp = dsp
else
rsp = dsp / 2
parameters rsp = rsp
endif
and in 2D script replace your 4th (non-blank) line with
hotspot2 rsp, 0, 4, rsp, 2, dsp
During dragging the hotspot, the radius line will be shown, but the parameter value in the tracker will be the diameter. You can show the diameter using:
if GLOB_FEEDBACK_MODE then line2 -rsp, 0, rsp, 0
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SE