OOP Question

Id like to use the gui 2dbutton or something. now iam grown up in oop and id like to do some enumeration.
so id like to build a new class called button ergo a new patch. so the patch contains texture, posy, posx, action usw…
afterall i want to instance it and call it as enum with the given params.
but how, maybe iam too much c++ envolved to understand graphical programming :D.
bye bye and thanks

Martin Lierschof
University of Arts Linz

I dont know anything about programming, but i think the way to here are once more spreads. ive done a module which checks if mouse (or any other pointers) are in between rectangle areas and it outputs the indices of the touched areas. the patch is fully dynamich, you can do any amounts of buttons at any place (They can even move while beeing touched.) as far i remember the mousepointer itself can not be spreaded but im not sure anymore, have to check that out. and the helppatch isnt converted to beta9 so you have to connect the drawing objects (quads) via the group node to the renderer. hop e this helps a bit. i think its a quite a different concept but im sure there are poeple here who can you explain the differences between textual programming and graphical programming much much better.

ah yes the link to the module:
direct download:
http://vvvv.org/tiki-download_file.php?fileId=362

overview:
http://vvvv.org/tiki-index.php?page=elektromeier+modules

thanks,
your 2d gui is very handy, but i think ive to relearn spreads cause i missunderstood something, i think :D
good so i just have to get mouseclick at pointer or object.

thanks for help !

soory i forgot to login the last 2 posts.

the problem only is the width and hight should be like a icon file (filetexture->quad) hight and widht and the next problem is that every button have a other action to do, like play or stop or exit or something, and every button has other icons so i may redesign your project and if you want to i send it to you, that you can release it again :D

cu & greetings

Martin Lierschof

“the problem only is the width and hight should be like a icon file (filetexture->quad) hight and widht”

you can get the this information with the “info (EX.9 Texture)”-node node that you can input a spread of textures and you get spreads with the height and width values in teh same order as the input textures…

"and every button has other icons so i may redesign your project and if you want to i send it to you, that you can release it again :D "

if you send a spreads of texture to the spreaded buttons this could be solved…
can you gerate a spread of textures? just use spreaded filenames with the filetexture nodes… and how you can generate this filenames automatically? just use the dir nodes which outputs the content of a directory as a spread of strings… merkst du was? praktisch alles ist spreadable… but the difficult part in many cases is to deal with the order of indices of the spread…

"and the next problem is that every button have a other action to do, like play or stop or exit or something, "
mhh, that could be soplved in severall ways… one way could be to generate an additional spread with the same count as there are buttons… the value in each slice defines what the button would do… for example 0=play 1=stop 2=exit…

if you use my button check module you know the index (means the possition in the spread) of the touched button… with this information you can get the function of this button with this indexnumber… just connect a “getslice” node to your additinal function spread and my button check module on the index inlet of getslice and you get the function of the touzched button…

i have somewhere an picturebrowser and selector patch arround which does some things that can be usefull for you but it isnt finished and not documented… i post it later…

here is that patch. its still work in progress and not very well structured, but maybe you can get some hints from it. if somethings unclear -> just ask!
i try to answer if i understand my own patch :)

ah yes and to make it work correctly you have to install the buttoncheck module in the directory vvvv/modules/elektromeier/ButtonCheck (2D GUI).v4p

TextureFilePicker.v4p (59.6 kB)

NNEEEAAT !!!

nice work ! i wasnt able to do this in that short time !

thanks a lot, emaier rules!

i think a module with all 2d objects for gui design will be handy…
emaier if you interested send a mail to martin.lierschof@ufg.ac.at