HISE Logo Forum
    • Categories
    • Register
    • Login

    Plugin doesn't respect UI Zoom Factor onInit

    Scheduled Pinned Locked Moved Scripting
    25 Posts 6 Posters 1.1k 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.
    • d.healeyD
      d.healey @ccbl
      last edited by

      @ccbl Setting it in on init won't work because the button callbacks are triggered after on init so it will overwrite it.

      Just as a test, what happens if you disable saveInPreset on all the buttons, except the one you want?

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      MorphoiceM 1 Reply Last reply Reply Quote 0
      • MorphoiceM
        Morphoice @d.healey
        last edited by

        @d-healey saving the gui size in a preset doesn't make much sense though, so disabling that shouldn't be a problem

        https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

        d.healeyD 1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey @Morphoice
          last edited by

          @Morphoice said in Plugin doesn't respect UI Zoom Factor onInit:

          saving the gui size in a preset doesn't make much sense though, so disabling that shouldn't be a problem

          I'm just suggesting this as a test to figure out the source of the issue. But you don't want it to always open at 50% so we need to find a better solution after.

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

          ustkU 1 Reply Last reply Reply Quote 1
          • ustkU
            ustk @d.healey
            last edited by ustk

            @d-healey but the zoom level is always restored to the last state right? So why bother with all that? You just need to read what is the current zoom to reflect this to the right button, at least this is how I see it...

            Can't help pressing F5 in the forum...

            d.healeyD 1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey @ustk
              last edited by

              @ustk said in Plugin doesn't respect UI Zoom Factor onInit:

              but the zoom level is always restored to the last state right?

              Only if you use the built in custom settings floating tile which saves it to the generalSettings.xml file.

              Libre Wave - Freedom respecting instruments and effects
              My Patreon - HISE tutorials
              YouTube Channel - Public HISE tutorials

              ustkU 1 Reply Last reply Reply Quote 0
              • ustkU
                ustk @d.healey
                last edited by ustk

                @d-healey Hmm... should be the same thing no? I thought it was always saved in the xml no matter where the call is coming from (when the plugin/standalone is closed)

                Can't help pressing F5 in the forum...

                d.healeyD 1 Reply Last reply Reply Quote 0
                • d.healeyD
                  d.healey @ustk
                  last edited by

                  @ustk Yeah just tested and seems you are correct.

                  Libre Wave - Freedom respecting instruments and effects
                  My Patreon - HISE tutorials
                  YouTube Channel - Public HISE tutorials

                  1 Reply Last reply Reply Quote 0
                  • LindonL
                    Lindon @ccbl
                    last edited by

                    @ccbl said in Plugin doesn't respect UI Zoom Factor onInit:

                    @oskarsh how would that look in context?

                    inline function onFiftyControl(component, value)
                    {
                    	Settings.setZoomLevel(0.5);
                    };
                    Content.getComponent("Fifty").setControlCallback(onFiftyControl)
                    

                    Do you define the value as 1.0?

                    I really don't know coding very well.

                    so like this:

                    inline function onFiftyControl(component, value)
                    {
                        if(value)
                            Settings.setZoomLevel(0.5);
                    };
                    Content.getComponent("Fifty").setControlCallback(onFiftyControl)
                    

                    HISE Development for hire.
                    www.channelrobot.com

                    d.healeyD oskarshO C 3 Replies Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @Lindon
                      last edited by

                      @Lindon Genius!

                      Libre Wave - Freedom respecting instruments and effects
                      My Patreon - HISE tutorials
                      YouTube Channel - Public HISE tutorials

                      LindonL 1 Reply Last reply Reply Quote 1
                      • LindonL
                        Lindon @d.healey
                        last edited by

                        @d-healey ha ha ha ha.....

                        HISE Development for hire.
                        www.channelrobot.com

                        1 Reply Last reply Reply Quote 0
                        • oskarshO
                          oskarsh @Lindon
                          last edited by

                          @Lindon wow sleek and elegant solution!

                          1 Reply Last reply Reply Quote 0
                          • C
                            ccbl @Lindon
                            last edited by

                            @Lindon said in Plugin doesn't respect UI Zoom Factor onInit:

                            @ccbl said in Plugin doesn't respect UI Zoom Factor onInit:

                            @oskarsh how would that look in context?

                            inline function onFiftyControl(component, value)
                            {
                            	Settings.setZoomLevel(0.5);
                            };
                            Content.getComponent("Fifty").setControlCallback(onFiftyControl)
                            

                            Do you define the value as 1.0?

                            I really don't know coding very well.

                            so like this:

                            inline function onFiftyControl(component, value)
                            {
                                if(value)
                                    Settings.setZoomLevel(0.5);
                            };
                            Content.getComponent("Fifty").setControlCallback(onFiftyControl)
                            

                            After flushing my %appdata% config this worked! Thanks!

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

                            25

                            Online

                            1.7k

                            Users

                            11.9k

                            Topics

                            103.5k

                            Posts