public ApiResult <object> Get([FromQuery] WidgetInput input) { if (!this.IsFormValid()) { return(ApiResult.Failure <object>(this.FormInvalidReason())); } var type = input.Type.GetTypeByName(); if (type == null) { return(ApiResult.Failure <object>($"类型{input.Type}不存在")); } if (!type.FullName.EndsWith("Widget") || !type.FullName.Contains("Widgets") || !type.FullName.Contains("UI") ) { return(ApiResult.Failure <object>($"类型{input.Type}Widget的命名约定,不符合约定")); } var find = input.Type.GetInstanceByName(); if (find == null) { return(ApiResult.Failure <object>($"类型{input.Type}不存在")); } if (find is IWidget set) { var result = set.Get(input.Json); return(ApiResult.Success(result)); } return(ApiResult.Failure <object>($"非IWidget类型,请确认{input.Type}输入是否正确")); }
public override void Update() { WidgetInput input = base.Input; IsPressed = false; IsTapped = false; IsClicked = false; if (input.Press.HasValue && HitTestGlobal(input.Press.Value) == this) { IsPressed = true; } if (input.Tap.HasValue && HitTestGlobal(input.Tap.Value) == this) { IsTapped = true; } if (input.Click.HasValue && HitTestGlobal(input.Click.Value.Start) == this && HitTestGlobal(input.Click.Value.End) == this) { IsClicked = true; if (IsAutoCheckingEnabled) { IsChecked = !IsChecked; } if (!string.IsNullOrEmpty(SoundName)) { AudioManager.PlaySound(SoundName, 1f, 0f, 0f); } } }
public DragBehaviour(Widget inputWidget, Widget contentWidget, Placement placement) { this.inputWidget = inputWidget; this.contentWidget = contentWidget; this.placement = placement; input = inputWidget.Input; inputWidget.Tasks.Add(MainTask()); }
public Exposition(Widget container, WidgetInput input) { blackBackgroundPresenter = new WidgetFlatFillPresenter(Color4.Transparent); canvas = CreateCanvas(container); var cellSize = CalcCellSize(container.Size, GetWidgets().Count()); int itemCount = GetWidgets().Count(); items = GetWidgets().Select((w, i) => new Item(w, CreateItemFrame(i, canvas, cellSize), input, showLabel: itemCount <= 50)).ToList(); }
int GetWheelDelta(WidgetInput input) { if (input.WasKeyPressed(Key.MouseWheelDown)) { return(1); } if (input.WasKeyPressed(Key.MouseWheelUp)) { return(-1); } return(0); }
void HandleCellsMagnification(WidgetInput input) { var delta = GetWheelDelta(input); if (delta != 0 && input.IsKeyPressed(Key.Alt)) { var prevColWidth = TimelineMetrics.ColWidth; TimelineMetrics.ColWidth = (TimelineMetrics.ColWidth + delta).Clamp(5, 30); if (prevColWidth != TimelineMetrics.ColWidth) { timeline.OffsetX += timeline.CurrentColumn * delta; Core.Operations.Dummy.Perform(Document.Current.History); } } }
void HandleCellsMagnification(WidgetInput input) { var delta = GetWheelDelta(input); if (delta != 0 && input.IsKeyPressed(Key.Alt)) { var prevColWidth = TimelineMetrics.ColWidth; TimelineMetrics.ColWidth = (TimelineMetrics.ColWidth + delta).Clamp(5, 30); if (prevColWidth != TimelineMetrics.ColWidth) { var mp = timeline.Grid.RootWidget.Input.LocalMousePosition.X + Timeline.Instance.Offset.X; Timeline.Instance.OffsetX += (mp / prevColWidth) * delta; Core.Operations.Dummy.Perform(); } } }
void RootWidget_DoubleClick(WidgetInput input, Key key) { var timeline = Timeline.Instance; var marker = Document.Current.Container.Markers.FirstOrDefault( i => i.Frame == timeline.CurrentColumn); var newMarker = marker?.Clone() ?? new Marker { Frame = timeline.CurrentColumn }; var r = new MarkerPropertiesDialog().Show(newMarker, canDelete: marker != null); if (r == MarkerPropertiesDialog.Result.Ok) { Core.Operations.SetMarker.Perform(Document.Current.Container.DefaultAnimation.Markers, newMarker); } else if (r == MarkerPropertiesDialog.Result.Delete) { Core.Operations.DeleteMarker.Perform(Document.Current.Container.DefaultAnimation.Markers, marker); } }
private void ScrollView_KeyRepeated(WidgetInput input, Key key) { if (history == null || history.Count < 1) { return; } if (key == Key.Mouse0) { scrollView.SetFocus(); selectedIndex = (resultPane.LocalMousePosition().Y / rowHeight).Floor().Clamp(0, history.Count - 1); } else if (Cmds.Down.WasIssued()) { selectedIndex++; Cmds.Down.Consume(); } else if (Cmds.Up.WasIssued()) { selectedIndex--; Cmds.Up.Consume(); } else if (Cmds.Cancel.WasIssued()) { scrollView.RevokeFocus(); Cmds.Cancel.Consume(); } else if (Cmds.Enter.WasIssued() || key == Key.Mouse0DoubleClick) { Document.Current.History.DoTransaction(() => NavigateToItem(selectedIndex)); Cmds.Enter.Consume(); } else { return; } selectedIndex = selectedIndex.Clamp(0, history?.Count - 1 ?? 0); EnsureRowVisible(selectedIndex); Window.Current.Invalidate(); }
void RootWidget_DoubleClick(WidgetInput input, Key key) { Document.Current.History.DoTransaction(() => { var timeline = Timeline.Instance; var marker = Document.Current.Container.Markers.GetByFrame(timeline.CurrentColumn); var newMarker = marker?.Clone() ?? new Marker { Frame = timeline.CurrentColumn }; var r = new MarkerPropertiesDialog().Show(newMarker, canDelete: marker != null); if (r == MarkerPropertiesDialog.Result.Ok) { Core.Operations.SetMarker.Perform(Document.Current.Container, newMarker, true); } else if (r == MarkerPropertiesDialog.Result.Delete) { Core.Operations.DeleteMarker.Perform(Document.Current.Container, marker, true); } }); // To prevent RulerbarMouseScroll. RootWidget.Input.ConsumeKey(Key.Mouse0); }
void ScrollView_KeyRepeated(WidgetInput input, Key key) { if (Cmds.All.Contains(key)) { input.ConsumeKey(key); } if (results.Count == 0) { return; } if (key == Key.Mouse0) { scrollView.SetFocus(); selectedIndex = (resultPane.Input.LocalMousePosition.Y / rowHeight).Floor().Clamp(0, results.Count - 1); } else if (key == Cmds.Down) { selectedIndex++; } else if (key == Cmds.Up) { selectedIndex--; } else if (key == Cmds.Cancel) { scrollView.RevokeFocus(); } else if (key == Cmds.Enter || key == Key.Mouse0DoubleClick) { NavigateToItem(selectedIndex); } else { return; } selectedIndex = selectedIndex.Clamp(0, results != null ? results.Count - 1 : 0); EnsureRowVisible(selectedIndex); Window.Current.Invalidate(); }
private IEnumerator <object> HandleScroll(WidgetInput input) { var prevPosition = Vector2.Zero; while (true) { var scrollDelta = GetWheelDelta(input); if (scrollDelta != 0 && !input.IsKeyPressed(Key.Alt)) { timeline.OffsetY += scrollDelta * TimelineMetrics.DefaultRowHeight; } if (input.IsKeyPressed(Key.Mouse2)) { var delta = input.MousePosition - prevPosition; if (delta != Vector2.Zero && (timeline.Offset.X - delta.X > 0 || timeline.Offset.Y - delta.Y > 0)) { timeline.Offset -= delta; Core.Operations.Dummy.Perform(); } } prevPosition = input.MousePosition; yield return(null); } }
public Item(Widget widget, Frame frame, WidgetInput input, bool showLabel) { this.frame = frame; var totalTime = 0d; originalWidget = widget; exposedWidget = (Widget)widget.Clone(); exposedWidget.Animations.Clear(); originalTransform = widget.CalcTransitionToSpaceOf(frame).ToTransform2(); exposedTransform = CalcExposedTransform(widget, frame); originalWidget.SetTangerineFlag(TangerineFlags.HiddenOnExposition, true); frame.HitTestTarget = true; var clickArea = new Widget { Size = frame.Size, Anchors = Anchors.LeftRightTopBottom, HitTestTarget = true }; frame.AddNode(clickArea); label = new ThemedSimpleText { Visible = showLabel, Position = new Vector2(3, 2), Color = ColorTheme.Current.SceneView.Label, Text = (exposedWidget.Id ?? ""), OverflowMode = TextOverflowMode.Ignore }; label.FontHeight *= 0.75f; frame.AddNode(label); frame.AddNode(exposedWidget); borderPresenter = new WidgetBoundsPresenter(ColorTheme.Current.SceneView.ExposedItemInactiveBorder, 1); frame.CompoundPresenter.Push(borderPresenter); frame.Tasks.AddLoop(() => { borderPresenter.Color = Document.Current.SelectedNodes().Contains(widget) ? ColorTheme.Current.SceneView.ExposedItemSelectedBorder : ColorTheme.Current.SceneView.ExposedItemInactiveBorder; totalTime += Lime.Task.Current.Delta; if (clickArea.IsMouseOver()) { if (totalTime % 0.5f < 0.25f) { borderPresenter.Color = ColorTheme.Current.SceneView.ExposedItemActiveBorder; } label.Visible = true; if (clickArea.Input.WasMousePressed()) { if (!input.IsKeyPressed(MultiSelectKey)) { Core.Operations.ClearRowSelection.Perform(); Core.Operations.SelectNode.Perform(widget); Closed = true; } else { var isSelected = Document.Current.SelectedNodes().Contains(widget); Core.Operations.SelectNode.Perform(widget, !isSelected); } } } else { label.Visible = showLabel; } }); }
protected override bool WasKeyTriggered(WidgetInput input, Key key) => input.WasKeyRepeated(key);
protected abstract bool WasKeyTriggered(WidgetInput input, Key key);
protected virtual void OnKey(WidgetInput input, Key key) => handler?.Invoke(input, key);
private IEnumerator <object> DragTask(Widget panelContainer, WidgetInput input, int rowIndex, int panelIndex) { var rootWidget = widget.GetRoot().AsWidget; var newRowIndex = rowIndex; var newPanelIndex = panelIndex; var presenter = new SyncDelegatePresenter <Widget>(w => { w.PrepareRendererState(); if (panelContainer == null) { return; } var aabb = panelContainer.CalcAABBInSpaceOf(rootWidget); Renderer.DrawRect(aabb.A, aabb.B, ColorTheme.Current.Toolbar.PanelPlacementHighlightBackground); Renderer.DrawRectOutline(aabb.A, aabb.B, ColorTheme.Current.Toolbar.PanelPlacementHighlightBorder); }); while (true) { if (!input.WasMousePressed() || Core.Project.Current == Core.Project.Null) { yield return(null); continue; } rootWidget.CompoundPostPresenter.Add(presenter); while (input.IsMousePressed()) { Vector2 pos; Utils.ChangeCursorIfDefault(MouseCursor.Hand); for (var i = 0; i < widget.Nodes.Count; ++i) { var rowWidget = (Widget)widget.Nodes[i]; if (!IsMouseOver(rowWidget, out pos)) { continue; } for (var j = 0; j < rowWidget.Nodes.Count; ++j) { var panelWidget = (Widget)rowWidget.Nodes[j]; if (!IsMouseOver(panelWidget, out pos)) { continue; } if ((newRowIndex != i || newPanelIndex != j) && (rowIndex != i || j != rowWidget.Nodes.Count - 1)) { panelContainer = panelWidget; newRowIndex = i; newPanelIndex = j; } goto Next; } } panelContainer = null; if (!IsMouseOver(widget, out pos)) { newPanelIndex = 0; if (pos.Y < 0) { newRowIndex = -1; } if (pos.Y > widget.Height) { newRowIndex = toolbarModel.Rows.Count; } } Next: yield return(null); } rootWidget.CompoundPostPresenter.Remove(presenter); if (newRowIndex == rowIndex && newPanelIndex == panelIndex) { continue; } ToolbarModel.ToolbarRow row; if (newRowIndex < 0 || newRowIndex == toolbarModel.Rows.Count) { row = new ToolbarModel.ToolbarRow(); toolbarModel.InsertRow(row, newRowIndex < 0 ? 0 : newRowIndex); if (newRowIndex < 0) { ++rowIndex; } } else { row = toolbarModel.Rows[newRowIndex]; } var oldRow = toolbarModel.Rows[rowIndex]; var panel = oldRow.Panels[panelIndex]; if (newRowIndex != rowIndex) { toolbarModel.RemovePanel(panel); toolbarModel.InsertPanel(row, panel, newPanelIndex); } else { toolbarModel.SwapPanels(row.Panels[newPanelIndex], panel); } if (oldRow.Panels.Count == 0) { toolbarModel.RemoveRow(oldRow); } toolbarModel.RefreshAfterLoad(); Rebuild(); yield break; } }
void RootWidget_DoubleClick(WidgetInput input, Key key) { ShowMarkerDialog(Timeline.Instance.CurrentColumn); // To prevent RulerbarMouseScroll. RootWidget.Input.ConsumeKey(Key.Mouse0); }
public new void HandleInput() { WidgetInput input = m_componentPlayer.View.Input; PlayerInput playerInput = m_componentPlayer.ComponentInput.PlayerInput; ComponentRider componentRider = m_componentPlayer.ComponentRider; if (m_componentPlayer.View.ActiveCamera.IsEntityControlEnabled) { if (!m_keyboardHelpMessageShown && (m_componentPlayer.PlayerData.InputDevice & WidgetInputDevice.Keyboard) != 0 && Time.PeriodicEvent(7.0, 0.0)) { m_keyboardHelpMessageShown = true; DisplaySmallMessage("按 H 键查看键盘控制帮助\n(或看帮助)", blinking: true, playNotificationSound: true); } else if (!m_gamepadHelpMessageShown && (m_componentPlayer.PlayerData.InputDevice & WidgetInputDevice.Gamepads) != 0 && Time.PeriodicEvent(7.0, 0.0)) { m_gamepadHelpMessageShown = true; DisplaySmallMessage("按 START/PAUSE 键查看手柄控制帮助\n(或看帮助)", blinking: true, playNotificationSound: true); } } if (playerInput.KeyboardHelp) { if (m_keyboardHelpDialog == null) { m_keyboardHelpDialog = new KeyboardHelpDialog(); } if (m_keyboardHelpDialog.ParentWidget != null) { DialogsManager.HideDialog(m_keyboardHelpDialog); } else { DialogsManager.ShowDialog(m_componentPlayer.View.GameWidget, m_keyboardHelpDialog); } } if (playerInput.GamepadHelp) { if (m_gamepadHelpDialog == null) { m_gamepadHelpDialog = new GamepadHelpDialog(); } if (m_gamepadHelpDialog.ParentWidget != null) { DialogsManager.HideDialog(m_gamepadHelpDialog); } else { DialogsManager.ShowDialog(m_componentPlayer.View.GameWidget, m_gamepadHelpDialog); } } if (m_helpButtonWidget.IsClicked) { ScreensManager.SwitchScreen("Help"); } if (playerInput.ToggleInventory || m_inventoryButtonWidget.IsClicked) { if (IsInventoryVisible()) { ModalPanelWidget = null; } else if (m_componentPlayer.ComponentMiner.Inventory is ComponentCreativeInventory) { ModalPanelWidget = new CreativeInventoryWidget(m_componentPlayer.Entity); } else { ModalPanelWidget = new FullInventoryWidget(m_componentPlayer.ComponentMiner.Inventory, m_componentPlayer.Entity.FindComponent <ComponentCraftingTable>(throwOnError: true)); } } if (playerInput.ToggleClothing || m_clothingButtonWidget.IsClicked) { if (IsClothingVisible()) { ModalPanelWidget = null; } else { ModalPanelWidget = new ClothingWidget(m_componentPlayer); } } if (m_sneakButtonWidget.IsClicked || playerInput.ToggleSneak) { bool isSneaking = m_componentPlayer.ComponentBody.IsSneaking; m_componentPlayer.ComponentBody.IsSneaking = !isSneaking; if (m_componentPlayer.ComponentBody.IsSneaking != isSneaking) { if (m_componentPlayer.ComponentBody.IsSneaking) { DisplaySmallMessage("Sneak mode on", blinking: false, playNotificationSound: false); } else { DisplaySmallMessage("Sneak mode off", blinking: false, playNotificationSound: false); } } } if (componentRider != null && (m_mountButtonWidget.IsClicked || playerInput.ToggleMount)) { bool flag = componentRider.Mount != null; if (flag) { componentRider.StartDismounting(); } else { ComponentMount componentMount = componentRider.FindNearestMount(); if (componentMount != null) { componentRider.StartMounting(componentMount); } } if (componentRider.Mount != null != flag) { if (componentRider.Mount != null) { DisplaySmallMessage("Mounted", blinking: false, playNotificationSound: false); } else { DisplaySmallMessage("Dismounted", blinking: false, playNotificationSound: false); } } } if ((m_editItemButton.IsClicked || playerInput.EditItem) && m_nearbyEditableCell.HasValue) { int cellValue = m_subsystemTerrain.Terrain.GetCellValue(m_nearbyEditableCell.Value.X, m_nearbyEditableCell.Value.Y, m_nearbyEditableCell.Value.Z); int contents = Terrain.ExtractContents(cellValue); SubsystemBlockBehavior[] blockBehaviors = m_subsystemBlockBehaviors.GetBlockBehaviors(contents); for (int i = 0; i < blockBehaviors.Length && !blockBehaviors[i].OnEditBlock(m_nearbyEditableCell.Value.X, m_nearbyEditableCell.Value.Y, m_nearbyEditableCell.Value.Z, cellValue, m_componentPlayer); i++) { } } else if ((m_editItemButton.IsClicked || playerInput.EditItem) && IsActiveSlotEditable()) { IInventory inventory = m_componentPlayer.ComponentMiner.Inventory; if (inventory != null) { int activeSlotIndex = inventory.ActiveSlotIndex; int num = Terrain.ExtractContents(inventory.GetSlotValue(activeSlotIndex)); if (BlocksManager.Blocks[num].IsEditable) { SubsystemBlockBehavior[] blockBehaviors2 = m_subsystemBlockBehaviors.GetBlockBehaviors(num); for (int j = 0; j < blockBehaviors2.Length && !blockBehaviors2[j].OnEditInventoryItem(inventory, activeSlotIndex, m_componentPlayer); j++) { } } } } if (m_subsystemGameInfo.WorldSettings.GameMode == GameMode.Creative && (m_creativeFlyButtonWidget.IsClicked || playerInput.ToggleCreativeFly) && componentRider.Mount == null) { bool isCreativeFlyEnabled = m_componentPlayer.ComponentLocomotion.IsCreativeFlyEnabled; m_componentPlayer.ComponentLocomotion.IsCreativeFlyEnabled = !isCreativeFlyEnabled; if (m_componentPlayer.ComponentLocomotion.IsCreativeFlyEnabled != isCreativeFlyEnabled) { if (m_componentPlayer.ComponentLocomotion.IsCreativeFlyEnabled) { m_componentPlayer.ComponentLocomotion.JumpOrder = 1f; DisplaySmallMessage("Fly mode on", blinking: false, playNotificationSound: false); } else { DisplaySmallMessage("Fly mode off", blinking: false, playNotificationSound: false); } } } if (m_cameraButtonWidget.IsClicked || playerInput.SwitchCameraMode) { View view = m_componentPlayer.View; if (view.ActiveCamera.GetType() == typeof(FppCamera)) { view.ActiveCamera = view.FindCamera <TppCamera>(); DisplaySmallMessage("第三人称视角", blinking: false, playNotificationSound: false); } else if (view.ActiveCamera.GetType() == typeof(TppCamera)) { view.ActiveCamera = view.FindCamera <OrbitCamera>(); DisplaySmallMessage("滑轨视角", blinking: false, playNotificationSound: false); } else if (view.ActiveCamera.GetType() == typeof(OrbitCamera)) { view.ActiveCamera = view.FindCamera <FixedCamera>(); DisplaySmallMessage("固定视角", blinking: false, playNotificationSound: false); } else if (view.ActiveCamera.GetType() == typeof(FixedCamera)) { view.ActiveCamera = new DebugCamera(view); DisplaySmallMessage("调试视角", blinking: false, playNotificationSound: false); } else { view.ActiveCamera = view.FindCamera <FppCamera>(); DisplaySmallMessage("第一人称视角", blinking: false, playNotificationSound: false); } } if (m_photoButtonWidget.IsClicked || playerInput.TakeScreenshot) { ScreenCaptureManager.CapturePhoto(); Time.QueueFrameCountDelayedExecution(Time.FrameIndex + 1, HandleInput_b__108_0); } if (m_subsystemGameInfo.WorldSettings.GameMode == GameMode.Creative && (m_lightningButtonWidget.IsClicked || playerInput.Lighting)) { Matrix matrix = Matrix.CreateFromQuaternion(m_componentPlayer.ComponentCreatureModel.EyeRotation); base.Project.FindSubsystem <SubsystemWeather>(throwOnError: true).ManualLightingStrike(m_componentPlayer.ComponentCreatureModel.EyePosition, matrix.Forward); } if (m_subsystemGameInfo.WorldSettings.GameMode == GameMode.Creative && (m_timeOfDayButtonWidget.IsClicked || playerInput.TimeOfDay)) { float num2 = MathUtils.Remainder(0.25f, 1f); float num3 = MathUtils.Remainder(0.5f, 1f); float num4 = MathUtils.Remainder(0.75f, 1f); float num5 = MathUtils.Remainder(1f, 1f); float num6 = MathUtils.Remainder(num2 - m_subsystemTimeOfDay.TimeOfDay, 1f); float num7 = MathUtils.Remainder(num3 - m_subsystemTimeOfDay.TimeOfDay, 1f); float num8 = MathUtils.Remainder(num4 - m_subsystemTimeOfDay.TimeOfDay, 1f); float num9 = MathUtils.Remainder(num5 - m_subsystemTimeOfDay.TimeOfDay, 1f); float num10 = MathUtils.Min(num6, num7, num8, num9); if (num6 == num10) { m_subsystemTimeOfDay.TimeOfDayOffset += num6; DisplaySmallMessage("Dawn", blinking: false, playNotificationSound: false); } else if (num7 == num10) { m_subsystemTimeOfDay.TimeOfDayOffset += num7; DisplaySmallMessage("Noon", blinking: false, playNotificationSound: false); } else if (num8 == num10) { m_subsystemTimeOfDay.TimeOfDayOffset += num8; DisplaySmallMessage("Dusk", blinking: false, playNotificationSound: false); } else if (num9 == num10) { m_subsystemTimeOfDay.TimeOfDayOffset += num9; DisplaySmallMessage("Midnight", blinking: false, playNotificationSound: false); } } if (ModalPanelWidget != null) { if (input.Cancel || input.Back || m_backButtonWidget.IsClicked) { ModalPanelWidget = null; } } else if (input.Back || m_backButtonWidget.IsClicked) { DialogsManager.ShowDialog(m_componentPlayer.View.GameWidget, new GameMenuDialog(m_componentPlayer)); } }
public Item(Widget widget, Frame frame, WidgetInput input, bool showLabel) { this.frame = frame; var totalTime = 0d; originalWidget = widget; exposedWidget = (Widget)widget.Clone(); exposedWidget.Animations.Clear(); originalTransform = (widget.LocalToWorldTransform * SceneView.Instance.CalcTransitionFromSceneSpace(frame)).ToTransform2(); originalWidget.SetTangerineFlag(TangerineFlags.HiddenOnExposition, true); frame.HitTestTarget = true; var clickArea = new Widget { Size = frame.Size, Anchors = Anchors.LeftRightTopBottom, HitTestTarget = true }; frame.AddNode(clickArea); label = new ThemedSimpleText { Visible = showLabel, Position = new Vector2(3, 2), Color = ColorTheme.Current.SceneView.Label, Text = (exposedWidget.Id ?? ""), OverflowMode = TextOverflowMode.Ignore }; frame.AddNode(label); frame.AddNode(exposedWidget); borderPresenter = new WidgetBoundsPresenter(ColorTheme.Current.SceneView.ExposedItemInactiveBorder, 1); frame.CompoundPresenter.Push(borderPresenter); int lastFrame = 0; foreach (var node in exposedWidget.Nodes) { foreach (var animator in node.Animators) { foreach (var key in animator.ReadonlyKeys) { lastFrame = Math.Max(lastFrame, key.Frame); } } } frame.Tasks.AddLoop(() => { borderPresenter.Color = Document.Current.SelectedNodes().Contains(widget) ? ColorTheme.Current.SceneView.ExposedItemSelectedBorder : ColorTheme.Current.SceneView.ExposedItemInactiveBorder; totalTime += Lime.Task.Current.Delta; if (clickArea.IsMouseOver()) { if (totalTime % 0.5f < 0.25f) { borderPresenter.Color = ColorTheme.Current.SceneView.ExposedItemActiveBorder; } label.Visible = true; if (clickArea.Input.WasMousePressed()) { if (!input.IsKeyPressed(MultiSelectKey)) { Document.Current.History.DoTransaction(() => { Core.Operations.ClearRowSelection.Perform(); Core.Operations.SelectNode.Perform(widget); }); Closed = true; } else { var isSelected = Document.Current.SelectedNodes().Contains(widget); Document.Current.History.DoTransaction(() => { Core.Operations.SelectNode.Perform(widget, !isSelected); }); } } } else { label.Visible = showLabel; } if (exposedWidget.DefaultAnimation.Frame <= lastFrame) { savedTime = totalTime; } if (totalTime - savedTime > 1) { exposedWidget.DefaultAnimation.Frame = 0; } }); }