HISE Logo Forum
    • Categories
    • Register
    • Login

    Changing Y Position of a Button with an other Button

    Scheduled Pinned Locked Moved Scripting
    10 Posts 3 Posters 382 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.
    • T
      treynterrio
      last edited by

      Hi there, can someone help me change the Y position of a button when another button is pressed? The current position is y = 420. When you press the button, the position y should shift to 530

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

        @treynterrio

        button.set("y", 530);

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

        T 1 Reply Last reply Reply Quote 0
        • T
          treynterrio @d.healey
          last edited by

          @d-healey I tried this already

          Unknown function 'set'
          
          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @treynterrio
            last edited by

            @treynterrio If you get unknown function it means the thing on the left side of the . doesn't have a function with that name.

            So what do you have on the left side of the .?

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

            T 1 Reply Last reply Reply Quote 0
            • T
              treynterrio @d.healey
              last edited by

              @d-healey Button6

              d.healeyD M_HollowayM 2 Replies Last reply Reply Quote 0
              • d.healeyD
                d.healey @treynterrio
                last edited by

                @treynterrio Can you show me your code for this part, including the button reference?

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

                T 1 Reply Last reply Reply Quote 0
                • M_HollowayM
                  M_Holloway @treynterrio
                  last edited by M_Holloway

                  @treynterrio

                  HiseSnippet 921.3ocsVs0aSCCE1tqAQCWDShW3snIdnSZZpWXCjlPTZ2FpB1VgNl1DBM4l3tZsD6pDGXUnIweD94vOFdaOxavwwtKYaQqWPjGp54x2we9y9X6NgBWZTjHDgKs+ngTD99VcGwkCZMfv3n1ahvOzZGRjjF5nc0bzPRTD0CgwK7FkCbohnjuKdUShOg6RScgPGHXtz2wBXxTucZ7Vlu+1DO59rfLY+rFscE7VBeQLvmErpfFRbOkbBcWhJsBVH7c1xiIEgckDIMBgK1T3Mp6.wW457OfEw54SUFUQcgBocusv2SwXkWTqALeuNim2QHnJcRUgEzpvis1g4wtzepZ7nj.NoHxpG3B2F8pNY5UIO5gyPuhZ5snUW2P1PYZDE2tmUaNrP0m.KAYokNWTgeUvpk.xfKWMfbJc6Pv3RDkWuRkUbfeVdCaXUHR57ERnSyXoTvq37RmwHOgJaIBFJ3fQ4kLwWJGPUm.np4Ap1D.UKOP0m.n5JPFT8R7DAH9jgFqLdnG+m5edCaUwCIbuCS+6QPMrYbeFm5zOl6JYBtifaT.03GJ7K6NdvWAHneLcY6uYWpuHrbOGFe7nurcIvaojA.XxND4fUUFvhQ40fUg0RVEzIbzskPuUinvz7rkVQy1rNGYbdjx441mCzeBqgJbl4QKhueOn4q70mfJk7xuLxvtBIcOd4joq841NWOT+94FyTUeZXtgUmODda.KyiC5QCyJ1pDgFkq1IdmoqSzUKPYRTvayYx8FRM129QIHiBqNTwvPHUYRO6CM8rZ8DwfhTxxHtnD5m8bSzL.u50gewqlE3092F854.+is2jHIpytLBBHRCogRlZs.uI8KvkB5SxJYsIM5ToXXhhY1ShvVSglc1kC42eeiQoi+Sa7UlmbPpiW1.kozEmB8DJsE9m.zQp+7CshLCUnltBOAapvw3YsB00U32i4PSUEt4EAv0QBuXeh7p2QotX1D.ZWtxkApC74QL4nraWlgKtpL02qNszcQqNLo6f74agb3Kru5+MeMOC3AVa0uO0UlR1hVae37dm+LPkOHhkL9IvA+gL0FgciC5BuJxkBLgyo9Qp8DETapz1UT1JkoKk6kX7G3yDrpxFaBVcbPT.wMTbrqtSW8Pi6l3A3DO48VkfG9A1NUuYCd.7FniccuZotAvZyKv5yKvmMu.WadAt97B74yKvWLYfpmn95XoHP2NgP6zYqjCjw3s3DX2XxNWzegxdDEF
                  

                  Hit the button in the top left corner :)

                  1 Reply Last reply Reply Quote 1
                  • T
                    treynterrio @d.healey
                    last edited by

                    @d-healey the Button is part of this function maybe that's why it doesn't work

                    const var NUM_BUTTONS = 3;
                    const var buttons = [];
                    const var panels = [];
                    
                    for (i = 0; i < NUM_BUTTONS; i++)
                    {
                        buttons[i] = Content.getComponent("Button" + (i+1));
                        panels[i] = Content.getComponent("Panel" + (i+1));
                        buttons[i].setControlCallback(onButtonControl);
                    }
                    
                    inline function onButtonControl(component, value)
                    {
                    	local idx = buttons.indexOf(component);
                    	
                    	for (i = 0; i < panels.length; i++)
                        {
                            panels[i].showControl(idx == i);
                        }
                    	
                    }
                    
                    d.healeyD 1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @treynterrio
                      last edited by

                      @treynterrio I don't see a reference for Button6. You probably want button[5].set().

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

                      T 1 Reply Last reply Reply Quote 0
                      • T
                        treynterrio @d.healey
                        last edited by

                        @d-healey said in Changing Y Position of a Button with an other Button:

                        button[5]

                        ok I've found the problem it works now. thank you

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

                        34

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        102.1k

                        Posts