Forums > MaxMSP

GUI question (preset + pictctrl)

January 17, 2008 | 11:38 pm

I am finishing my project and am doing some gui for it now.
Now i have a set of messages the user can click on to get different music patters. For the interface i want that
1) when you click on a button, you see it clicking
2) when it is clicked, it shows an active state (button has another color)
3) when you click on another message, the first button you clicked will show an inactive state
This 3d part I don’t know how to do, and in the manual I don’t get much wiser.
So I need 3 buttons
1)inactive state
2)clicking the button (the shadow changes so it looks like it’s is being pushed down likea real button)
3) After it is clicked, the shadow is normal again, but the button has another color

Now when I click another button (to get another pattern), the button that was clicked before should get it’s original inactive color again, this time without being clicked.

I hope I am clear nough. Can anyone tell me what to do?
Thanks


January 18, 2008 | 1:49 am

lots of ways… check out matrixctrl with custom cells, or the pictctrl with active, inactive, clicked states. It’s a little strange to format the images, but they work well.

It would be nice to have some more "radio buttons" included in Max…ones that look a little nicer but behave like that. Ah well.


January 18, 2008 | 7:24 am

On 18 janv. 08, at 00:38, Samuel Van Ransbeeck wrote:
> 1) when you click on a button, you see it clicking
> 2) when it is clicked, it shows an active state (button has another
> color)
> 3) when you click on another message, the first button you clicked
> will show an inactive state

rs.textbutton has radiobutton behavior.
It displays only text, not pictures, and is Mac only.

Roby


January 18, 2008 | 8:56 am

Well i checked the pictctrl out in the manual and there couldnt get the answer, so i came here. Can anyone tell me the right steps for pictctrl?


January 18, 2008 | 3:42 pm

This uses a pict from the pictctrl help file as the button. It’s not the prettiest patching but I think it does what you describe.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P hidden message 169 126 14 196617 0;
#P hidden message 109 126 14 196617 0;
#P hidden message 50 125 14 196617 0;
#P hidden newex 147 100 55 196617 select 0 1;
#P user pictctrl 147 51 32 34 greenLED.pict 0 0 1 1 3 0 0 0 32 34 128 0 1 1 2 0 1 270;
#P hidden newex 87 100 55 196617 select 0 1;
#P user pictctrl 87 51 32 34 greenLED.pict 0 0 1 1 3 0 0 0 32 34 128 0 1 1 2 0 1 270;
#P hidden newex 27 100 55 196617 select 0 1;
#P user pictctrl 27 51 32 34 greenLED.pict 0 0 1 1 3 0 0 0 32 34 128 0 1 1 2 0 1 270;
#P hidden connect 8 0 0 0;
#P hidden connect 8 0 2 0;
#P hidden connect 7 0 0 0;
#P hidden connect 7 0 4 0;
#P hidden connect 6 0 2 0;
#P hidden connect 6 0 4 0;
#P hidden connect 5 1 8 0;
#P hidden connect 3 1 7 0;
#P hidden connect 1 1 6 0;
#P hidden connect 4 0 5 0;
#P hidden connect 2 0 3 0;
#P hidden connect 0 0 1 0;
#P window clipboard copycount 9;

Quote: Thinksamuel wrote on Thu, 17 January 2008 15:38
—————————————————-
> I am finishing my project and am doing some gui for it now.
> Now i have a set of messages the user can click on to get different music patters. For the interface i want that
> 1) when you click on a button, you see it clicking
> 2) when it is clicked, it shows an active state (button has another color)
> 3) when you click on another message, the first button you clicked will show an inactive state
> This 3d part I don’t know how to do, and in the manual I don’t get much wiser.
> So I need 3 buttons
> 1)inactive state
> 2)clicking the button (the shadow changes so it looks like it’s is being pushed down likea real button)
> 3) After it is clicked, the shadow is normal again, but the button has another color
>
> Now when I click another button (to get another pattern), the button that was clicked before should get it’s original inactive color again, this time without being clicked.
>
> I hope I am clear nough. Can anyone tell me what to do?
> Thanks
>
—————————————————-


Viewing 5 posts - 1 through 5 (of 5 total)