Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: how do i make a button that will open the menu? (Read 5364 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

how do i make a button that will open the menu?

how do i make in the track display panel a button that will open the menu?

how do i make a button that will open the menu?

Reply #1
$button(0,0,0,0,47,47,$get(dir)\orb.png,$get(dir)\orb.png,MENU,TOOLTIP:"Main Menu")

Thats my code, and it works. Alter as needed . The key part of it is the "MENU" section.
Song List: keikoniumboards.ke.funpic.org/files/songlist.html

how do i make a button that will open the menu?

Reply #2
not working  but tnx for the fast response

how do i make a button that will open the menu?

Reply #3
Are you using the code correctly?  Because it certainly should work for you. 

Here are a couple of things to look for.  First, make double sure you are using PanelsUI.  Then, in your foobar installation directory, there will be a sub-directory named PanelsUI.  Inside that directory, there will be one or more sub-directories, each one with a different name.

For this example, we will call one of those directories "UseMe".  Now, inside that UseMe directory, should be another directory that is very important for you to have this code work.  It is the "images" directory.  Inside that directory, you will have to have the image that you use for the button.  In the example given you, that image is named orb.png, OK?  With me so far?

Now, after you make sure you have all that in place, then comes the code.  I would alter the code to read like this:

Code: [Select]
$button(0,0,0,0,47,47,/images\orb.png,/images\orb.png,MENU,TOOLTIP:"Main Menu")


All I did was to change the $get(dir)  part of the code.  The above does the same thing, which is to look in that "images" directory I was telling you about, for the button image called orb.png.

Now, for those numbers that are right after the $button(  section.  The first two numbers stand for the location on your screen where you want the button to be placed at.  The way it is now, 0,0  would place the button up at the extreme upper left corner of your screen.  The first number is how many pixels you want the button to be from the upper left of your screen or panel ( the X coordinate).  The second number is how far down the screen or panel you want the button ( the Y coordinate).  The last two numbers, 47,47 define the area in pixels that you can click in to activate the button.  Those numbers should normally be the same size as the image you use for your button.  If you have a 16x16 button, you'd use 16,16 .  Now, all that to say this:  If you want your button to be 100 pixels to the right of the upper corner, and 200 pixels down from the upper corner, and you are using a 16x16 image for your button, the code would read like this:

Code: [Select]
$button(100,200,0,0,16,16,/images\orb.png,/images\orb.png,MENU,TOOLTIP:"Main Menu")


So, go back and try again, making sure you have an image called orb.png in the "images" directory, or even better, just change "orb" to the name of the icon that you do have, and want to use.

Hope all that was clear enough?  I'm learning this coding myself, so I understand what it is like to try to learn, and just starting out.

Let us know how you do, ok?

how do i make a button that will open the menu?

Reply #4
works  tnx

how do i make a button that will open the menu?

Reply #5
works  tnx

Good! 

Very glad you got it to work, and you are now on your way to coding your very own configuration!