Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic More than one CustomBehavior? (Read 1351 times)
j poz
Junior Member
**
Offline


I Love MindFusion!

Posts: 78
Joined: Nov 21st, 2012
More than one CustomBehavior?
Jan 9th, 2013 at 11:53pm
Print Post  
Is it possible to have more than one custom behavior at the same time?

Such as a ModifyBehavior and a DrawLinksBehavior?

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: More than one CustomBehavior?
Reply #1 - Jan 10th, 2013 at 8:14am
Print Post  
You could implement a composite behavior class whose StartDraw method delegates to StartDraw of other behavior objects based on some condition:

Code
Select All
InteractionState StartDraw(...)
{
    if (mode1)
        return bh1.StartDraw(...);
    else
        return bh2.StartDraw(...);
}

DrawLinksBehavior bh1;
ModifyBehavior bh2; 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint