Closed Crowdedlight closed 2 years ago
I'm afraid this is a side effect of the ID we create. Any change in any of those values, whether that be the _pos variable or the _onConfirm variable, will change the ID. You can add a 6th argument to the function call to create a custom save ID, which should solve your problem. I see it is not documented on the website, but if you pass a string after _this in your example it should save properly.
Ah perfect. Didn't know the custom id
was an option. That works. Thanks for the quick reply!
Arma 3 Version:
2.08
(stable) CBA Version:3.15.6.211004
(stable) ZEN Version:1.12.1
(stable)Mods:
Description: When using the custom dialog framework with
SLIDER:RADIUS
and a position ("Radius Center") that is based on where the module is used, it always resets to default values, instead of using last saved values. However it seems that if you give a static position, or no position, then it correctly uses the last saved options. You can test this by giving it position[0,0,0]
then change sliders to a value. If you execute that code again but change position to[0,0,1]
it will reset to default values.I suspect the function responsible to detect if the dialog is "identical" to a known dialog, to get last used values, also includes the position argument in detection.
Expected behavior: I expect the framework to save the last selected options, even if the position argument of
SLIDER:RADIUS
changes. As most modules will be executed on different positions each time based on where zeus click. I assume theSLIDER:RADIUS
was made to be able to easily display a radius indicator of area-of-effect. It does not make sense that this would also make all options reset to default every time its used.Steps to reproduce: Add the steps needed to reproduce the issue.
Where did the issue occur? Experienced in: Dedicated / Self-Hosted Multiplayer / Editor (Multiplayer)
Additional information: Provide any additional information that will help us solve this issue.
RPT log file: https://gist.github.com/Crowdedlight/0865e5d6aab501f7029faf17f9a6c39f