How to make the initial picture frame state of a custom slider/button match its PAR_DEFAULT_VALUE?
All of my custom sliders and buttons function correctly, but they all seem to visually default to their first frame of animation. I have to ctrl+click on the control, or otherwise manipulate it, for it to display correctly. From there on out, the controls will always be visually correct. Thanks :)
Best Answer
-
Pages 46 and 138 in the KSP Reference Manual _
0
Answers
-
Did you make_persistent() them?
1 -
Yes, I did.
0 -
Hmmm not sure then, unless you're somehow overriding their values somewhere in your code...
1 -
I don't believe so, but I'll investigate further. It isn't too much of a problem. When I save after fiddling with a control, it will always display fine upon reload. Just so happens that I have many hundreds of controls this time, so I was hoping to not have to ctrl+click each one of them. Thanks for the help! :)
0 -
If this is just about setting the initial value of controls to match the default value you set up for them, this needs to be done manually (as in - write the code in init callback to do it). Just setting $CONTROL_PAR_DEFAULT_VALUE doesn't actually change the value of the UI widget - it only sets the value for Ctrl+click action.
0 -
Gotcha. That's exactly what I'm trying to do. Can you give me some example code for this? Not sure what I'm looking for in the KSP reference manual.
0 -
Pages 46 and 138 in the KSP Reference Manual _
0
Categories
- All Categories
- 19 Welcome
- 1.5K Hangout
- 62 NI News
- 785 Tech Talks
- 4.1K Native Access
- 16.5K Komplete
- 2K Komplete General
- 4.3K Komplete Kontrol
- 5.7K Kontakt
- 1.6K Reaktor
- 378 Battery 4
- 845 Guitar Rig & FX
- 429 Massive X & Synths
- 1.3K Other Software & Hardware
- 5.8K Maschine
- 7.3K Traktor
- 7.3K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators