Forum
    • Categories
    • Register
    • Login

    It´s possible to change Popup Data in execution time?

    Scheduled Pinned Locked Moved Scripting
    11 Posts 3 Posters 96 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.
    • David HealeyD
      David Healey @jadg
      last edited by

      @jadg What's the reason for wanting to change it after on init?

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - Public HISE tutorials
      My Patreon - HISE tutorials

      jadgJ 1 Reply Last reply Reply Quote 0
      • jadgJ
        jadg @David Healey
        last edited by

        @David-Healey Because user can change colour theme after init

        David HealeyD 1 Reply Last reply Reply Quote 0
        • David HealeyD
          David Healey @jadg
          last edited by

          @jadg Aha got it. One thing I recently had Claude add was being able to set the properties from variables. I haven't tested if this works after on init but it might do.

          https://github.com/christophhart/HISE/pull/893

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

          1 Reply Last reply Reply Quote 0
          • jadgJ
            jadg
            last edited by

            Really I have a function to try change color for all objects via LAF, but Content.sePopupData don´t take effect until reinitialize o recompile:

            inline function changeColourScheme(textColour,ButtonTextColour,sliderBackLight)
            {
            SliderBackLight=sliderBackLight;
            buttonTextColor=ButtonTextColour;
            mainTextColour=textColour;
            for(c in Content.getAllComponents(""))
            {
            c.set("textColour",textColour);
            c.sendRepaintMessage();

                }
               
              for(i=0;i<53;i++){
              Engine.setKeyColour(i,Colours.withAlpha(textColour, 0.35
              ));}  
              for(i=53;i<127;i++){
              	  Engine.setKeyColour(i,Colours.withAlpha(textColour, 0.04
              	  ));}  
            

            // set the popup styling
            Content.setValuePopupData({
            "fontName":"Oxygen",
            "fontSize": 14,
            "borderSize": 0.5,
            "borderRadius":4,
            "margin":2,
            "bgColour":BGColour ,
            "itemColour":Colours.withAlpha(BGColour , 0.8) ,
            "itemColour2":Colours.withAlpha(BGColour, 1),
            "textColour": Colours.withAlpha(textColour, 0.35
            )
            });

            1 Reply Last reply Reply Quote 0
            • jadgJ
              jadg
              last edited by

              This is that seems in real time

              Captura de pantalla 2026-03-06 222144.png

              Captura de pantalla 2026-03-06 222242.png

              1 Reply Last reply Reply Quote 0
              • jadgJ
                jadg
                last edited by jadg

                Every object colors are OK (in real time) except in ValuePopups, that preserves the colours from the last initialization...

                Maybe the solution would be somethig like "laf.registerFunction("drawValuePopup", function(g, obj)" ... if posible...

                ustkU 1 Reply Last reply Reply Quote 0
                • ustkU
                  ustk @jadg
                  last edited by

                  @jadg you might gain in flexibility making your own popup system

                  Hise made me an F5 dude, any other app just suffers...

                  jadgJ 1 Reply Last reply Reply Quote 0
                  • jadgJ
                    jadg @ustk
                    last edited by jadg

                    @ustk Specifically ValuePopups for sliders? Maybe using ScriptSlider.setValuePopupFunction ?
                    I,m afraid this way only affects the proper text returned value but not the text formating and color.
                    What way can you propose me?

                    ustkU 1 Reply Last reply Reply Quote 0
                    • ustkU
                      ustk @jadg
                      last edited by

                      @jadg Using a broadcaster to show a label instead of the stock value popup. This way you can customise it dynamically with your theme

                      customValuePopup.gif

                      HiseSnippet 1366.3ocsW0raaaDDdosoakZSaSQd.VvSTEpJxR1NMMnHNV1N0H1IBUtooHHHXI4JwElbWAtKUrPP.5iRe.5SPQOzGfbnO.8PeD5kdNc1kThjwJ1wBH5fslc96alclcF0OQ3SkRQBxp9ISGSQVep8fobUXuPBiiNbOj0WZ2KUpDwOlDkR6KFmNFs6zwDojFfrrV89Z4rpsFx74eu6tjHB2mVbDB8XAymdDKloJNs+NOfEEc.IfdBKtjzatyg9BdOQjHEvzp1sQiI9mRFQeHQK1J1numHCQVekcWugauo+F2xibqN2161au8s2Jn6v.RmtTeOORGJvdysFtMxZ88CXJQx.EQQkfQ2UDLcPn3E7LG7Xlj4EQ0DafF.dN6XTuPVTP+YIHIBYsV+hz0pYoqaXeLKfM+7hz1WXXfKznbRyZkKBRabEfjUIHsVFjtt8.+D1XUAGMd9D6C4JZxPBb2TF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MsU1wRuGEGdkcZ4EkuB6.19B2A78EhW2tOS4GtXLtxBvHzV7g.i4aNeM68GNj5qJ.3Z1G7jkcM4Kw8+fHUuh0wDX7NTyX+vz3APEfOE7NmSij5ZiUzEgYzs0z5Lv.JOvP7F3SNyMzzV4L2XFSTLwOQ7b+rmiz6l+wlS.LwM+1kZ1Gqowm6EPDJF9oBO22upoNmhcVVE6trJt4xp3VKqhaurJdqkUwu4xUT+K4tWJrnaVaCBcb+8MyMrr1mSfJPS0J5+AfJhWTB
                      

                      Hise made me an F5 dude, any other app just suffers...

                      jadgJ 1 Reply Last reply Reply Quote 4
                      • jadgJ
                        jadg @ustk
                        last edited by jadg

                        @ustk Thank you very much. i,ve created a similar solution a few hours ago. I don´t use Broadcaster just the proper scriptSlider callback ,a "InlineStyleSheet" for the valuePopup Label and a Timer:

                        Content.makeFrontInterface(400, 200
                        
                        );
                        
                        const var Label1 = Content.getComponent("Label1");
                        
                        const var lblCss = Content.createLocalLookAndFeel();
                        
                        Label1.set("text", "ValuePopup");
                        const var valuePopupTimer=Engine.createTimerObject();
                        valuePopupTimer.setTimerCallback(function(){
                        
                        Label1.set("visible", false)	;
                        valuePopupTimer.stopTimer();	
                        });
                        
                        //  Label Laf
                        lblCss.setInlineStyleSheet("
                        *
                        {
                        	letter-spacing: 1px;
                        	font-weight: bold;
                        	font-size: 12;
                        
                        }
                        
                        /** Render the default appearance. */
                        label
                        {
                          	background-color: var(--bgColour);
                           	
                        	color: var(--textColour);	
                        	border-radius: 5px;
                        	border-size: 1px
                        	text-align: centred;
                        	
                        	
                        	
                        	text-shadow: 2px 2px 5px rgba(0,0,0,0.6);
                        }
                        
                        /** If you edit the text, it will use this selector. */
                        input
                        {
                        
                        	text-align: left;
                        	padding-top: 0.5px;
                        	padding-left: 50px;
                        	padding-right: 20px;
                        	caret-color: white;
                        	font-weight: bold;
                        }
                        
                        /** Style the text selection with this selector. */
                        ::selection
                        {
                        	background: #50FFFFFF;
                        	color: white;
                        }
                        ");
                        
                        Label1.setLocalLookAndFeel(lblCss);
                        
                        
                        inline function onKnob1Control(component, value)
                        {
                        	
                        Label1.set("visible",true);
                        Label1.set("text", Engine.doubleToString(component.getValue(), 1) +" "+ component.get("suffix"));
                        Label1.set("width", Engine.getStringWidth(Label1.get("text"),Label1.get("fontName"), Label1.get("fontSize"), 0.15));
                        Label1.set("x",component.get("x")-(Label1.get("width")/2)+(component.get("width")/2));
                        Label1.set("y",component.get("y")-20);
                        valuePopupTimer.startTimer(1100);
                        };
                        
                        Content.getComponent("Knob1").setControlCallback(onKnob1Control);
                        Content.getComponent("Knob2").setControlCallback(onKnob1Control);
                        
                        
                        

                        Probably the best solution is a combination of yours and mine. Thank you very much again.

                        ezgif-4b86ba577ac754d8.gif

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

                        30

                        Online

                        2.2k

                        Users

                        13.5k

                        Topics

                        117.3k

                        Posts