Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > Inventor API > How to highligh...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 456 of 504
Post > Topic >>

How to highlight 3D radio buttons item when mouse is over?

by massimoromano82@[EMAIL PROTECTED] Sep 14, 2006 at 12:53 AM

Hello,

I'm trying to highlight 3d menu compononets when mouse is over.

I got success with SoDialogPushButton with this code:

//after a SoRayPickAction
SoNode * pickedNode = pickedPath->getTail();

if (pickedNode->isOfType(SoDialogPushButton::getClassTypeId())){
	SoDialogPushButton * button = (SoDialogPushButton *)pickedNode;
	if (selectedDialogComponent!=button){
		unhighlightSelectedComponent();
		selectedDialogComponent=button;
		selectedDialogComponent->setPart(SbName("released"),highlightPushButtonPart);
	}
}
else
	unhighlightSelectedComponent();


void unhighlightSelectedComponent(){
	if (selectedDialogComponent==NULL)
		return;
	if(selectedDialogComponent->isOfType(SoDialogPushButton::getClassTypeId()))
		selectedDialogComponent->setPart(SbName("released"),unhighlightPushButtonPart);
	selectedDialogComponent=NULL;
}

//selectedDialogComponent is a global variable
SoDialogComponent *selectedDialogComponent;


But how can I highlight an item of radioButtons?? How can I know on
what item mouse is over and how can I highlight only that item?

Max
 




 1 Posts in Topic:
How to highlight 3D radio buttons item when mouse is over?
massimoromano82@[EMAIL PR  2006-09-14 00:53:26 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 12:30:42 CST 2008.