Hide UI Control Issue

Noise Native
Noise Native Member Posts: 26 Member
edited October 2024 in Scripting Workshop

Hi, I hope this discussion finds you well.

I have KSP scripted a fairly complex Kontakt instrument with UI controls that are hidden, and then made visible via various selected menus. All functions well and I have set up a Call Snapshots function which works well too, apart from one thing… When swapping between saved Snapshots, the ‘hidden’ UI elements are all made momentarily visible, even though they are scripted as hidden ones, they appear only for a moment but it makes swapping between Snapshots a little visually untidy looking. Is there a way around this? I have tried so many variations of my script, which is quite vast, read the manuals, looked through forums but cannot find an answer. Any help solving this would be amazing! Thank you :) 

I am employing the CONTROL_PAR_HIDE, $HIDE_PART_WHOLE_CONTROL) and  $CONTROL_PAR_HIDE,$HIDE_PART_NOTHING) which work fine when interfacing with the scripted UI controls in the performance area, but only when swapping between actual saved Snapshots do the unrequired hidden controls appear momentarily.

Comments

  • corbo-billy
    corbo-billy Member Posts: 108 Helper

    You must write all these particularities also inside: on persistence changed

  • Noise Native
    Noise Native Member Posts: 26 Member

    Thank you for replying corbo-billy, much appreciated:) I have scripted a Snapshot ‘function’ that includes all the par_hide commands for all the ui’s that I then ‘call’ in the ‘on persistence_changed’ callback.

    I followed your advice and copied all the par_hide particularities into the ‘on persistence_changed’ callback, along with my existing Snapshot ‘function’ this morning, but, the momentary flickering of hidden ui controls when swapping between saved Snapshots still happens. Everything works perfectly apart from this. It doesn’t happen when interfacing with the in-performance view menu’s, only when swapping/loading saved Snapshots. It could possibly be an order-of-operation thing perhaps? But the script has become quite vast and difficult to manage ;) Thank you again for the advise though!

    I have simplified my multiple menu scenario with a revision this morning that has one less menu and a few more ui pots. The multiple menu scenarios were possibly a little confusing to any users also.

    Still living and learning the language ;)

  • corbo-billy
    corbo-billy Member Posts: 108 Helper

    Have you written for the controls and various objects involved, the basic and eternal make_persistent ?

  • Noise Native
    Noise Native Member Posts: 26 Member

    Yes, I have included make and read persistent for all controls.

This discussion has been closed.
Back To Top