void DecreaseToolSize_FirstFrameUpEvent(EventLayer eventLayer) { if (eventLayer.EventProcessingAllowed && (showMoveTools || showRotateTools) && visible && toolSize - ToolSizeIncrement >= ToolSizeMinimum) { ToolSize -= ToolSizeIncrement; } }
void toggleAdMode_FirstFrameUpEvent(EventLayer eventLayer) { if (selectionOperators.Selection == SelectionOperator.Add) { selectionOperators.Selection = SelectionOperator.Select; } }
internal Instruction(BinaryReaderEx br, GameType game, OffsetsContainer offsets) { Bank = br.ReadInt32(); ID = br.ReadInt32(); long argsLength = ReadIntW(br, game != GameType.DS1); long argsOffset = br.ReadInt32(); if (game != GameType.DS1) { br.AssertInt32(0); } if (game != GameType.DS3) { br.AssertInt32(0); } br.StepIn(offsets.ArgsBlockOffset + argsOffset); { Args = br.ReadBytes((int)argsLength); } br.StepOut(); long layerOffset = ReadIntW(br, game != GameType.DS1); if (layerOffset != -1) { br.StepIn(offsets.EventLayersOffset + layerOffset); { Layer = new EventLayer(br, game); } br.StepOut(); } }
/// <summary> /// Creates a new Instruction with the specified bank, id, layer mask, and args. /// </summary> public Instruction(int bank, int id, uint layerMask, params object[] args) { Bank = bank; ID = id; Layer = new EventLayer(layerMask); PackArgs(args); }
/// <summary> /// Creates a new Instruction with the specified bank, id, layer mask, and args. /// </summary> public Instruction(int bank, int id, uint layerMask, IEnumerable <object> args) { Bank = bank; ID = id; Layer = new EventLayer(layerMask); PackArgs(args); }
/// <summary> /// Creates a new Instruction with the specified bank, id, layer mask, and args bytes. /// </summary> public Instruction(int bank, int id, uint layerMask, byte[] args) { Bank = bank; ID = id; Layer = new EventLayer(layerMask); Args = args; }
private bool ThemeIsCompatible(ITheme theme, EventLayer layer) { //var result = true; char[] charsToTrim = { '[', ']' }; if (theme is GraduatedTheme) { var colName = ((GraduatedTheme)theme).FieldName; var first = colName.IndexOf("gisEnd", StringComparison.Ordinal); var last = colName.IndexOf("__", StringComparison.Ordinal); foreach (var column in ((EventDataProvider)layer.DataSource).EventTable.Columns) { if (column.ToString().Contains(((GraduatedTheme)theme).FieldName.Substring(first, last - first))) { return(true); } } return(false); //return // ((EventDataProvider) layer.DataSource).EventTable.Columns.Contains( // ((GraduatedTheme) theme).FieldName.Trim(charsToTrim)); } if (theme is GradientTheme) { var colName = ((GradientTheme)theme).ColumnName; var first = colName.IndexOf("gisEnd", StringComparison.Ordinal); var last = colName.IndexOf("__", StringComparison.Ordinal); foreach (var column in ((EventDataProvider)layer.DataSource).EventTable.Columns) { if (column.ToString().Contains(((GradientTheme)theme).ColumnName.Substring(first, last - first))) { return(true); } } return(false); //return // ((EventDataProvider)layer.DataSource).EventTable.Columns.Contains(((GradientTheme)theme).ColumnName.Substring(first, last - first)); //((GradientTheme) theme).ColumnName.Trim(charsToTrim)); } if (theme is BarChartTheme) { var lstItems = ((BarChartTheme)theme).BarChartItems; return (lstItems.Select( barChartItem => ((EventDataProvider)layer.DataSource).EventTable.Columns.Contains(barChartItem.ColumnName)) .All(boolContains => boolContains)); } if (theme is RuleBasedTheme) { } return(true); }
void IncreaseToolSize_FirstFrameUpEvent(EventLayer eventLayer) { if (eventLayer.EventProcessingAllowed && (showMoveTools || showRotateTools) && visible) { ToolSize += ToolSizeIncrement; } }
void changeSelectionMode_FirstFrameUpEvent(EventLayer eventLayer) { if (!Gui.Instance.HandledKeyboardButtons) { switch (anatomyController.PickingMode) { case AnatomyPickingMode.Group: if (anatomyController.ShowPremiumAnatomy) { anatomyController.PickingMode = AnatomyPickingMode.Individual; } else { anatomyController.PickingMode = AnatomyPickingMode.None; } break; case AnatomyPickingMode.Individual: anatomyController.PickingMode = AnatomyPickingMode.None; break; case AnatomyPickingMode.None: anatomyController.PickingMode = AnatomyPickingMode.Group; break; } } }
void zoomGesture_GestureStarted(EventLayer eventLayer, TwoFingerZoom zoomGesture) { if (eventLayer.EventProcessingAllowed) { createTouchUndo(); } }
void rotateGesture_Dragged(EventLayer eventLayer, FingerDragGesture gesture) { if (eventLayer.EventProcessingAllowed && currentGesture <= Gesture.Rotate) { currentGesture = Gesture.Rotate; SceneViewWindow sceneView = sceneViewController.ActiveWindow; if (sceneView != null) { switch (movementMode) { case CameraMovementMode.Rotate: sceneView.CameraMover.rotateFromMotion((int)gesture.DeltaX, (int)gesture.DeltaY); break; case CameraMovementMode.Pan: sceneView.CameraMover.panFromMotion((int)gesture.DeltaX, (int)gesture.DeltaY, eventLayer.Mouse.AreaWidth, eventLayer.Mouse.AreaHeight); break; case CameraMovementMode.Zoom: sceneView.CameraMover.zoomFromMotion((int)gesture.DeltaY); break; } } travelTracker.traveled((int)gesture.DeltaX, (int)gesture.DeltaY); eventLayer.alertEventsHandled(); } }
void panGesture_GestureStarted(EventLayer eventLayer, FingerDragGesture gesture) { if (eventLayer.EventProcessingAllowed) { createTouchUndo(); } }
public void SetEventLayer(EventLayer layer) { cueEventLayer = layer; switch (layer) { case EventLayer.Nothing: UICamera.AssignRaycastLayerMask(0); break; case EventLayer.EveryThing: UICamera.AssignRaycastLayerMask(-1); break; case EventLayer.UI: UICamera.AssignRaycastLayerMask(1 << 5); break; case EventLayer.FirstDialog: UICamera.AssignRaycastLayerMask(1 << 8); break; case EventLayer.SecondDialog: UICamera.AssignRaycastLayerMask(1 << 9); break; case EventLayer.ThirdDialog: UICamera.AssignRaycastLayerMask(1 << 10); break; } }
void togglePanMode_FirstFrameUpEvent(EventLayer eventLayer) { if (sceneViewController.MovementMode == CameraMovementMode.Pan) { sceneViewController.MovementMode = CameraMovementMode.Rotate; } }
void toggleRemoveMode_FirstFrameUpEvent(EventLayer eventLayer) { if (selectionOperators.Selection == SelectionOperator.Remove) { selectionOperators.Selection = SelectionOperator.Select; } }
void rotateCamera_FirstFrameUpEvent(EventLayer eventLayer) { if (travelTracker.TraveledOverLimit) { eventLayer.alertEventsHandled(); } }
void openAnatomyFinder_FirstFrameUpEvent(EventLayer eventLayer) { if (!Gui.Instance.HandledKeyboardButtons || InputManager.Instance.getKeyFocusWidget().RootWidget == window) { this.Visible = !this.Visible; InputManager.Instance.setKeyFocusWidget(searchBox); } }
void rotateGesture_GestureStarted(EventLayer eventLayer, FingerDragGesture gesture) { if (eventLayer.EventProcessingAllowed && currentGesture <= Gesture.Rotate) { createTouchUndo(); travelTracker.reset(); } }
public SampleEvent(string filepath, int startTime, int volume = 100, EventLayer layer = EventLayer.Background) { Type = EventTypes.Sample; Layer = layer; StartTime = startTime; FilePath = filepath; Volume = volume; }
void zoomGesture_MomentumEnded(EventLayer eventLayer, TwoFingerZoom zoomGesture) { if (currentGesture <= Gesture.Zoom) { commitTouchUndo(); currentGesture = Gesture.None; } }
void panGesture_MomentumEnded(EventLayer eventLayer, FingerDragGesture gesture) { if (currentGesture <= Gesture.Pan) { commitTouchUndo(); currentGesture = Gesture.None; } }
public AnimationEvent(string filepath, int frameCount, int frameDuration, EventLayer layer = EventLayer.Background, Origin origin = Origin.Centre, float x = 320, float y = 240, Looptypes looptype = Looptypes.LoopForever) : base(filepath, layer, origin, x, y) { Type = EventTypes.Animation; Framecount = frameCount; FrameDuration = frameDuration; Looptype = looptype; }
void moveAnatomyGesture_Dragged(EventLayer eventLayer, FingerDragGesture gesture) { if (eventLayer.EventProcessingAllowed) { travelTracker.traveled((int)gesture.DeltaX, (int)gesture.DeltaY); Ray3 cameraRay = getCameraRay(gesture.AbsoluteX, gesture.AbsoluteY); moveDragTarget(cameraRay); eventLayer.alertEventsHandled(); } }
void pickAnatomy_OnHeldDown(EventLayer eventLayer) { if (allowMousePosing && eventLayer.EventProcessingAllowed) { travelTracker.traveled(eventLayer.Mouse.RelativePosition); IntVector3 absMouse = eventLayer.Mouse.AbsolutePosition; Ray3 cameraRay = getCameraRay(absMouse.x, absMouse.y); moveDragTarget(cameraRay); eventLayer.alertEventsHandled(); } }
void moveAnatomyGesture_MomentumEnded(EventLayer eventLayer, FingerDragGesture gesture) { allowMousePosing = true; moveAnatomyGesture.Dragged -= moveAnatomyGesture_Dragged; moveAnatomyGesture.MomentumEnded -= moveAnatomyGesture_MomentumEnded; clearDragTarget(); if (eventLayer.EventProcessingAllowed && travelTracker.TraveledOverLimit) { eventLayer.alertEventsHandled(); } }
void selectEvent(EventLayer eventLayer) { if (eventLayer.EventProcessingAllowed) { var absPos = eventLayer.Mouse.AbsolutePosition; if (containsPoint(absPos.x, absPos.y)) { mdiWindow.Active = true; } } }
public ContextUpdater(Context context, EventLayer eventLayer) { this.context = context; this.eventLayer = eventLayer; eventLayer.Mouse.ButtonDown += Mouse_ButtonDown; eventLayer.Mouse.ButtonUp += Mouse_ButtonUp; eventLayer.Mouse.Moved += Mouse_Moved; eventLayer.Keyboard.KeyPressed += Keyboard_KeyPressed; eventLayer.Keyboard.KeyReleased += Keyboard_KeyReleased; }
private void ZoomGesture_Zoom(EventLayer eventLayer, TwoFingerZoom zoomGesture) { if (eventLayer.EventProcessingAllowed && currentGesture <= Gesture.Zoom) { currentGesture = Gesture.Zoom; SceneViewWindow sceneView = sceneViewController.ActiveWindow; if (sceneView != null) { sceneView.CameraMover.zoomFromMotion((int)(zoomGesture.ZoomDelta * 800)); } eventLayer.alertEventsHandled(); } }
public SpriteEvent(string filepath, EventLayer layer = EventLayer.Background, Origin origin = Origin.Centre, float x = 320, float y = 240) { Type = EventTypes.Sprite; Layer = layer; Origin = origin; Filepath = filepath; StartPosition = new Position(x, y); Transformations = new List <TransformationEvent>(); Loopevents = new List <LoopEvent>(); Triggerevents = new List <TriggerEvent>(); StartTime = int.MaxValue; EndTime = int.MinValue; }
void panGesture_Dragged(EventLayer eventLayer, FingerDragGesture gesture) { if (eventLayer.EventProcessingAllowed && currentGesture <= Gesture.Pan) { currentGesture = Gesture.Pan; SceneViewWindow sceneView = sceneViewController.ActiveWindow; if (sceneView != null) { sceneView.CameraMover.panFromMotion((int)gesture.DeltaX, (int)gesture.DeltaY, eventLayer.Mouse.AreaWidth, eventLayer.Mouse.AreaHeight); } eventLayer.alertEventsHandled(); } }