Forums > MaxMSP

user interface question

October 7, 2007 | 3:30 pm

I want to make a two state text button. the idea is simple but i dont now how to get it..

for example: when the toogle send a 0 the text shows :hello
and when the toogle send a 1: world
thanks


October 7, 2007 | 3:38 pm

On 7 oct. 07, at 17:30, i.te wrote:

> I want to make a two state text button. the idea is simple but i
> dont now how to get it..
>
> for example: when the toogle send a 0 the text shows :hello
> and when the toogle send a 1: world

For now, there’s a jsui called jsui_textbutton which does that, I think.

ej


October 7, 2007 | 3:44 pm

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 51 134 32 196617 print;
#P message 76 112 36 196617 world;
#P message 41 112 31 196617 hello;
#P newex 47 86 41 196617 sel 1 0;
#P toggle 49 59 15 0;
#P connect 2 0 4 0;
#P connect 3 0 4 0;
#P connect 1 1 3 0;
#P connect 1 0 2 0;
#P connect 0 0 1 0;
#P window clipboard copycount 5;

On Oct 7, 2007, at 11:30 AM, i.te wrote:

>
> I want to make a two state text button. the idea is simple but i
> dont now how to get it..
>
> for example: when the toogle send a 0 the text shows :hello
> and when the toogle send a 1: world
> thanks
>



Dan
October 7, 2007 | 4:19 pm

One way to do that is with bpatcher offsets. Look in [patcher more]
in bpatcher.help.


October 7, 2007 | 4:38 pm

On 7 oct. 07, at 17:30, i.te wrote:
> I want to make a two state text button. the idea is simple but i
> dont now how to get it..
>
> for example: when the toogle send a 0 the text shows :hello
> and when the toogle send a 1: world

If you are on Mac look at my rs.textbutton external:

http://arts.lu/roby/

Roby


October 7, 2007 | 5:44 pm

many thanks for all the solutions..
i forgot to explain that the idea is also for a subpatch. I found the way in the bpatchers help. thanks to everybody!


October 7, 2007 | 6:53 pm

#P toggle 29 36 15 0;
#P window setfont "Sans Serif" 9.;
#P user umenu 47 36 100 196647 3 64 52 0;
#X add hello;
#X add world;
#P hidden connect 1 0 0 0;
#P window clipboard copycount 2;


October 8, 2007 | 12:11 am

rs.textbutton

http://www.arts.lu/roby/


October 15, 2007 | 6:41 pm

i.te schrieb:
> for example: when the toogle send a 0 the text shows :hello
> and when the toogle send a 1: world

This is almost out of the panel.help and out of the jsui.help…
Of course as you see there are a lot of other ways to do it as well, but
these come to mind first for me…

Stefan

#P window setfont "Sans Serif" 9.;
#P number 208 105 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user jsui 208 62 93 33 1 0 0 jsui_texttoggle.js hello world 230 230
30 30 120 30;
#P window linecount 1;
#P hidden newex 71 126 24 196617 t 1;
#P window setfont "Sans Serif" 12.;
#P user umenu 90 70 44 196659 3 64 90 0;
#X add hello;
#X add world;
#P window setfont "Sans Serif" 9.;
#P hidden newex 39 126 24 196617 t 0;
#P hidden message 110 143 50 196617 shadow 5;
#P hidden message 110 125 55 196617 shadow -4;
#P user ubutton 67 58 86 45 0 3;
#P user panel 68 58 84 45;
#X brgb 180 100 220;
#X frgb 0 0 0;
#X border 1;
#X rounded 20;
#X shadow 5;
#X done;
#P connect 7 0 8 0;
#P hidden connect 1 1 6 0;
#P hidden connect 1 1 2 0;
#P hidden connect 1 0 4 0;
#P hidden connect 1 0 3 0;
#P hidden connect 6 0 5 0;
#P hidden connect 4 0 5 0;
#P hidden connect 2 0 0 0;
#P hidden connect 3 0 0 0;
#P window clipboard copycount 9;


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


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