Changing Y Position of a Button with an other Button
-
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
-
button.set("y", 530);
-
@d-healey I tried this already
Unknown function 'set'
-
@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
.
? -
@d-healey Button6
-
@treynterrio Can you show me your code for this part, including the button reference?
-
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 :)
-
@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); } }
-
@treynterrio I don't see a reference for Button6. You probably want
button[5].set()
. -
@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