Notifications
Clear all

[Closed] rcmenu on button

how do I create an rcmenu when i RMB click over a button?
I could only activate a popupmenu with a LMB click… under the on btn1 pressed do handler,
and popupmenus over an entire rollout using on rollout rbuttondown pos do, i cant find the right keyword for a right click over a specific button inside a rollout… is ther a way to do that?

12 Replies

I’m planning to discover same thing tonight
I think you(and me) should use Andre Hotz’s SkinodDie script as example. He uses a lot of RC menus on that script so…

Good luck!

Oops… I was misunderstanding your question. I thought you was asking about simple RCmenu thing but… Sorry.

no biggie, happens all the time. thanks for the link, i also had a lot to learn from the script that you mentioned.

but i still havent solved this problem… i dont even know if its possible… (in maxscript, anything is possible!)<–

hi galagast,

this has been discussed on the discreet forum before. check out these links:
http://support.discreet.com/webboard/wbpx.dll/read?190197,15e#190197
http://support.discreet.com/webboard/wbpx.dll/read?191130,15e#191130

hOpe this helps,
o

hmm… i cant seem to connect to the link…
do you recall the topic title? coz i tried searching for “rcmenu” on the webBoards but didnt get any useful info on the topic… ill do some more searches… hehe… thanks by the way!

found it!

i guess i myt just hav look into those activeX controls… I hope that they’d implement somethind like this in the future. thanks again sir ofer_z!

I discovered SkinorDie script last night but I don’t really understand how RC-menu should write… I have checked MAXScript ref also, but just don’t get it. If some one please give me some simple example like “on AAA_btn pressed do…open RCmenu…”.

Thanks.

1 Reply
(@ofer_z)
Joined: 11 months ago

Posts: 0

Tak Tak,

check out this example:


 
 
 
 rollout roTest "test"
 (
 
 	local rcTest
 
 	-- declare the RC Menu to be used later...
 	-- NOTE: a function is used to create a LOCAL rc menu (otherwise you get an error
 	--	   that a rollout clause is expected,) you could, however, just define the 
 	--	   RC Menu outside the rollout scope, in which case you don't need the function.
 	fn createMenu = 
 	(
 		rcMenu rcTest
 		(
 			menuItem miItem1 "Item 1"
 			menuItem miItem2 "Item 2"
 			seperator menuSep01
 			menuItem miItem3 "Item 3"
 			
 			on miItem1 picked do (print "item 1 picked...")
 			on miItem2 picked do (print "item 2 picked...")
 			on miItem3 picked do (print "item 3 picked...")
 		) -- end of rcTest rcmenu
 	)
 
 	
 	-- now declare the rollout controlers
 	button bnMenu "Click here for the menu..." width:150
 	
 	on bnMenu pressed do (
 		-- use the popUpMenu command to display the RC Menu we defined earlier...
 		popUpMenu rcTest pos:(bnMenu.pos + [145,0]) rollout:roTest align:#align_topleft
 	)
 	
 	-- on rollout open we call the createMenu fn to define the local RCMenu
 	on roTest open do createMenu() 
 
 )-- end of roTest rollout
 
 createDialog roTest
 

hOpe this helps,
o

hi galagast,

it seems you didn’t find the second link, which i think you’ll find interesting. the topic of that thread is: “New Maxscript Control (check it out).” do a search for that…

cheers,
o

Thanks for reply and nice script tutorial ofer_z!!!

I’m sure it will help me. (good comments)
:bounce:

Page 1 / 2