Jump to content
magneto

Is it possible to align controls horizontally in VEX or VOPs?

Recommended Posts

You have the ability to do this for added parameters from the operator type properties dialog, but I couldn't find the equivalent option in VEX pragmas, or in the Parameter VOP.

Is this supported?

Would be good if I had this same ability in VEX/VOPs.

Thanks :)

Share this post


Link to post
Share on other sites

For the parameter vop, the horizontally join toggle is in the third white lined section, under the invisible toggle and above the disable when string.

Would like to know myself for VEXs

  • Like 1

Share this post


Link to post
Share on other sites
Guest mantragora

Would like to know myself for VEXs

#pragma hint parameter_name hint_type

The hint_type can be one of the following:

...

joinnext 	

Put the parameter after this one on the same row in the GUI. For narrow controls this can save space in the parameter editor. 
Example: #pragma hint myParm joinnext

  • Like 1

Share this post


Link to post
Share on other sites

Thanks alot guys. I tried the joinnext pragma, but it doesn't seem to work for menus (dropdowns).

Basically I have a string parameter in my VEX code and I use the choice pragma to turn it into a menu but then they are not put on the same row.

I tried it with other parameters, it worked, so the pragma works but just not for menus.

Anyone can repro this? Could be a bug.

Thanks.

Share this post


Link to post
Share on other sites

Here is a code that shows the problem. Let me know if you can repro it, so I can submit a bug. It works when I tried the same using parameter VOPs.

#define VOP_OP
#define VOP_SOP

#pragma opname sop1
#pragma oplabel "VEX Builder SOP"
#pragma opmininputs 1
#pragma opmaxinputs 1

#pragma choice p0 "A" "A"
#pragma choice p0 "B" "B"
#pragma choice p0 "C" "C"

#pragma choice p1 "A" "A"
#pragma choice p1 "B" "B"
#pragma choice p1 "C" "C"

#pragma choice p2 "A" "A"
#pragma choice p2 "B" "B"
#pragma choice p2 "C" "C"

#pragma hint p0 joinnext
#pragma hint p1 joinnext

sop
sop1(string p0="A"; string p1="A"; string p2="A")
{
    P.x = 0;
}

  • Like 1

Share this post


Link to post
Share on other sites

Also in the code I posted, if you remove the "pragma choice" lines then, it actually aligns them side by side. So it only doesn't work when they are shown as menus. Reporting as bug.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×