Home › Forums › General discussions › Need help with editable hotspots. › Reply To: Need help with editable hotspots.
December 18, 2018 at 13:56
#4412
Péter Baksa
Keymaster
Hi,
editable hotspots work only with parameters, not variables.
The solution is to use a hidden parameter that is edited by the hotspot. In your example add a parameter named rsp.
Now you have to update any changes the user makes in dsp to rsp, in the parameter script:
rsp = dsp / 2
parameters rsp = rsp
But when rsp is edited by the hotspots, you will need to change dsp. This can be done with the GLOB_MODPAR_NAME global variable:
if GLOB_MODPAR_NAME = "rsp" then
dsp = rsp * 2
parameters dsp = dsp
else
rsp = dsp / 2
parameters rsp = rsp
endif
If you want, you can show the value of dsp during hotspot editing:
hotspot2 rsp, 0, 4, rsp, 2, dsp
Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SE