private static uint getSliderValueFromCommand(AnatomyCommand command)
        {
            float range = command.NumericValueMax - command.NumericValueMin;
            float normalizedCommandValue = (command.NumericValue - command.NumericValueMin) / range;

            return((uint)(normalizedCommandValue * SCROLL_MAX) - 1);
        }
예제 #2
0
 public override void addCommand(AnatomyCommand command)
 {
     if (commands.Count == 0)
     {
         button.Caption = command.UIText;
     }
     commands.Add(command);
 }
 public void addCommand(AnatomyCommand command)
 {
     if (transparencyCommands.Count == 0)
     {
         command.NumericValueChanged += command_NumericValueChanged;
         slider.ScrollPosition        = getSliderValueFromCommand(command);
     }
     transparencyCommands.Add(command);
 }
예제 #4
0
 public override void addCommand(AnatomyCommand command)
 {
     if (commands.Count == 0)
     {
         checkButton.Caption  = command.UIText;
         checkButton.Selected = command.BooleanValue;
     }
     commands.Add(command);
     command.BooleanValueChanged += command_BooleanValueChanged;
 }
예제 #5
0
 public override void addCommand(AnatomyCommand command)
 {
     if (commands.Count == 0)
     {
         caption.Caption       = command.UIText;
         slider.ScrollPosition = getSliderValueFromCommand(command);
     }
     commands.Add(command);
     command.NumericValueChanged += command_NumericValueChanged;
 }
 void transparencyAnatomyCommand_NumericValueChanged(AnatomyCommand command, float value)
 {
     if (trackingTransparency)
     {
         transparencyInterface.CurrentAlpha = value;
     }
     else
     {
         transparencyInterface.CurrentAlpha = 0.0f;
     }
 }
 void command_NumericValueChanged(AnatomyCommand command, float value)
 {
     slider.ScrollPosition = getSliderValueFromCommand(command);
 }
예제 #8
0
 void command_BooleanValueChanged(AnatomyCommand command, bool value)
 {
     checkButton.Selected = value;
 }
예제 #9
0
 public void addCommand(AnatomyCommand command)
 {
     additionalCommands.Add(command);
 }
예제 #10
0
 public abstract void addCommand(AnatomyCommand command);
예제 #11
0
 public void removeCommand(AnatomyCommand command)
 {
     commands.Remove(command);
     editInterface.safeRemoveSubInterfaceForObject(commands, command);
 }
예제 #12
0
 public void addCommand(AnatomyCommand command)
 {
     commands.Add(command);
     editInterface.safeAddSubInterfaceForObject(commands, command);
 }