HISE Logo Forum
    • Categories
    • Register
    • Login

    Remove/Autosort UI Components Using Code

    Scheduled Pinned Locked Moved Feature Requests
    1 Posts 1 Posters 174 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      aaronventure
      last edited by aaronventure

      HISE lets you decide how you want to go about setting up your interface. You can use the WYSIWYG editor, do it with code, or do a combination of both.

      If you choose to do it exclusively with code, it's not entirely possible. You have to keep track of the element positions and hierarchy visually, and manually drag and drop any stragglers.

      HISE seems to currently be missing the code methods to remove components or reset the list entirely so that when you recompile your script, the elements get sorted in order which they were called in.

      I suppose this has something to do with persistence/saveInPreset?

      Current frustrations with the code-only approach are:

      • removal of elements not in use (when going for a code-only approach, this would be any component that does not have a reference).
      • consistent sorting of elements in the list, which affects Z level and mouse interaction/focus

      Being able to clear the component list at the beginning would result in a new one being created in the correct declaration order. If this has an interaction with the persistence system, then something else should be the way to go.

      For removal, perhaps a method Content.removeUnreferencedComponents(), which would then be called at the end of the interface init script?

      For ordering, another method Content.sortComponentsByCallOrder that does the call order sort? That doesn't include removing them and interacting with the persistence system.

      1 Reply Last reply Reply Quote 1
      • First post
        Last post

      25

      Online

      1.8k

      Users

      12.1k

      Topics

      105.0k

      Posts