I’m in the process of working on scripts for public release.
I was curious to get some opinions of ways people would see as the best route to go when making this particular UI with rollouts.
I need to have multiple tabs/rollouts and in needing that I’ve decided to go in the direction similar to fumeFX. When the button is pressed it adds a rollout and removes any previous ones.
My two concerns are
- What is the best way to store the settings/values of each rollout item control and reload them when that tab/rollout is reopened
- Best way to streamline the ability to remove/add rollouts.
My thoughts for the settings/values would be to just make them all local variables to the main rollout, otherwise worst case scenierio is to make them save to an ini file when the rollout is closed or any parameter is changed and then load it on AddSubRollout.
I’ve created a rough example here and posted in for users to build on and possibly better streamline. In a way that if others would like to use this as a starting point they could.
It may include building a function that would remove all rollouts except that one associated with that button. Right now mine is a bit redundant.
Lastly, I had a last second idea of making it so instead of removing any rollouts just making a function that would hide the rollout.visible state?!!!
I look forward to hearing back from you guys.
Thanks
JokerMartini
try(destroyDialog ::rltest)catch()
rollout rltest "test"
(
subrollout srWin "test1" pos:[8,36] width:154 height:60
label lb style_sunkenedge:true width:48 height:20 pos:[8,8]
checkbutton cbA "A" width:46 height:18 pos:[9,9]
label lb0 style_sunkenedge:true width:48 height:20 pos:[59,8]
checkbutton cbB "B" width:46 height:18 pos:[60,9]
label lb3 style_sunkenedge:true width:48 height:20 pos:[110,8]
checkbutton cbC "C" width:46 height:18 pos:[111,9]
on cbA changed state do (
if state then (
rltest.height = 106
for rl in srWin.rollouts do removeSubRollout rltest.srWin rl
AddSubRollout rltest.srWin rlAa
) else (
rltest.height = 36
for rl in srWin.rollouts do removeSubRollout rltest.srWin rl
)
)
on cbB changed state do (
if state then (
rltest.height = 106
for rl in srWin.rollouts do removeSubRollout rltest.srWin rl
AddSubRollout rltest.srWin rlB
) else (
rltest.height = 36
for rl in srWin.rollouts do removeSubRollout rltest.srWin rl
)
)
on cbC changed state do (
if state then (
rltest.height = 106
for rl in srWin.rollouts do removeSubRollout rltest.srWin rl
AddSubRollout rltest.srWin rlC
) else (
rltest.height = 36
for rl in srWin.rollouts do removeSubRollout rltest.srWin rl
)
)
)
rollout rlAa "A"
(
spinner test1as "test1as" width:100
)
rollout rlB "B"
(
spinner test1as "test1as" width:100
)
rollout rlC "C"
(
spinner test1as "test1as" width:100
)
createdialog rltest 170 36
