예제 #1
0
        public static void OnMaterialsColorDragMouseDown(WindowBase sender, UIMouseEventArgs eventArgs)
        {
            try
            {
                CASCompositorController ths = CASCompositorController.sController;

                if ((ths.mCurrentDesignObject != null) && (ths.mMaterialSkewerSelectedPattern != -1))
                {
                    if (eventArgs.MouseKey == MouseKeys.kMouseRight)
                    {
                        bool random = ((eventArgs.Modifiers & (Modifiers.kModifierMaskShift | Modifiers.kModifierMaskControl)) != Modifiers.kModifierMaskNone);

                        ProcessAlterColor(random);

                        if (sender.Enabled)
                        {
                            eventArgs.Handled = true;
                        }
                        return;
                    }
                }

                ths.OnMaterialsColorDragMouseDown(sender, eventArgs);
            }
            catch (Exception e)
            {
                Common.Exception("OnMaterialsColorDragMouseDown", e);
            }
        }
예제 #2
0
 private bool OnSelect(Vehicle ths, UIMouseEventArgs eventArgs)
 {
     if (ths.Driver != null)
     {
         return OnSelect(ths.Driver, eventArgs);
     }
     return ths.OnSelect(eventArgs);
 }
예제 #3
0
 public override void ClickedOn(UIMouseEventArgs eventArgs)
 {
     Sim target = this.Target as Sim;
     if (((target == null) || (target.Household == null)) || (target.Household.LotHome == null))
     {
         target = null;
     }
     if ((target != null) &&
         (eventArgs.MouseKey == MouseKeys.kMouseRight) &&
         (eventArgs.Modifiers == (Modifiers.kModifierMaskNone | Modifiers.kModifierMaskControl)))
     {
         PlumbBob.ForceSelectActor(target);
     }
     else
     {
         base.ClickedOn(eventArgs);
     }
 }
예제 #4
0
        public static void OnOpacitySliderMouseUp(WindowBase sender, UIMouseEventArgs args)
        {
            try
            {
                CASMakeup ths = CASMakeup.gSingleton;
                if (ths == null) return;

                Slider slider = sender as Slider;
                if (slider != null)
                {
                    CASPart part = (CASPart)ths.mGridMakeupParts.SelectedTag;

                    ths.SetMakeupOpacity(part, ((float)slider.Value) / ((float)slider.MaxValue), true);
                }
            }
            catch (Exception e)
            {
                Common.Exception("OnOpacitySliderMouseUp", e);
            }
        }
예제 #5
0
        public static void OnMaterialsColorGridMouseUp(WindowBase sender, UIMouseEventArgs eventArgs)
        {
            try
            {
                CASCompositorController ths = CASCompositorController.sController;

                // Custom
                if ((eventArgs.MouseKey == MouseKeys.kMouseLeft) || (eventArgs.MouseKey == MouseKeys.kMouseRight))
                {
                    UIManager.ReleaseCapture(InputContext.kICMouse, sender);
                    ths.ClearClickEvent();
                }
                else if (sender.Enabled)
                {
                    eventArgs.Handled = true;
                }
            }
            catch (Exception e)
            {
                Common.Exception("OnMaterialsColorGridMouseUp", e);
            }
        }
예제 #6
0
        public static void OnOutfitButtonMouseDown(WindowBase sender, UIMouseEventArgs eventArgs)
        {
            try
            {
                CASDresserClothing dresser = CASDresserClothing.gSingleton;
                if (dresser == null) return;

                if (eventArgs.MouseKey == MouseKeys.kMouseRight)
                {
                    Task.Perform();
                }
                else
                {
                    dresser.OnOutfitButtonClick(sender, new UIButtonClickEventArgs());
                }

                eventArgs.Handled = true;
            }
            catch (Exception e)
            {
                Common.Exception("OnOutfitButtonMouseDown", e);
            }
        }
예제 #7
0
        public static void OnOptionsMouseUp(WindowBase sender, UIMouseEventArgs args)
        {
            try
            {
                CASPuck ths = CASPuck.gSingleton;
                if (ths == null) return;

                if (!ths.UiBusy)
                {
                    if (args.MouseKey == MouseKeys.kMouseRight)
                    {
                        MenuTask.Perform();
                    }
                    else
                    {
                        ths.ShowOptionsMenu();
                    }
                }
            }
            catch (Exception e)
            {
                Common.Exception("OnOptionsButtonMouseUp", e);
            }
        }
예제 #8
0
 protected virtual void OnLostMouseFocus(UIMouseEventArgs e)
 {
 }
예제 #9
0
            static void ResizeTargetWithSnapToGrid(SpaceName tinyBoxSpaceName, UIControllerBox controllerBox, UIMouseEventArgs e)
            {
                //sample move with snap to grid
                Point pos  = controllerBox.Position;
                int   newX = pos.X + e.XDiff;
                int   newY = pos.Y + e.YDiff;
                //snap to gridsize =5;
                //find nearest snap x
                int   gridSize = 5;
                float halfGrid = (float)gridSize / 2f;
                int   nearestX = (int)((newX + halfGrid) / gridSize) * gridSize;
                int   nearestY = (int)((newY + halfGrid) / gridSize) * gridSize;
                int   xdiff    = nearestX - pos.X;
                int   ydiff    = nearestY - pos.Y;

                switch (tinyBoxSpaceName)
                {
                case SpaceName.LeftTop:
                {
                    if (xdiff != 0 || ydiff != 0)
                    {
                        controllerBox.SetLocation(controllerBox.Left + xdiff, controllerBox.Top + ydiff);
                        controllerBox.SetSize(controllerBox.Width - xdiff, controllerBox.Height - ydiff);
                        var targetBox = controllerBox.TargetBox;
                        if (targetBox != null)
                        {
                            //move target box too
                            targetBox.SetBounds(controllerBox.Left + 5,
                                                controllerBox.Top + 5,
                                                controllerBox.Width - 10,
                                                controllerBox.Height - 10);
                        }
                    }
                }
                break;

                case SpaceName.RightTop:
                {
                    if (xdiff != 0 || ydiff != 0)
                    {
                        controllerBox.SetLocation(controllerBox.Left, controllerBox.Top + ydiff);
                        controllerBox.SetSize(controllerBox.Width + xdiff, controllerBox.Height - ydiff);
                        var targetBox = controllerBox.TargetBox;
                        if (targetBox != null)
                        {
                            //move target box too
                            targetBox.SetBounds(controllerBox.Left + 5,
                                                controllerBox.Top + 5,
                                                controllerBox.Width - 10,
                                                controllerBox.Height - 10);
                        }
                    }
                }
                break;

                case SpaceName.RightBottom:
                {
                    if (xdiff != 0 || ydiff != 0)
                    {
                        controllerBox.SetSize(controllerBox.Width + xdiff, controllerBox.Height + ydiff);
                        var targetBox = controllerBox.TargetBox;
                        if (targetBox != null)
                        {
                            //move target box too
                            targetBox.SetBounds(controllerBox.Left + 5,
                                                controllerBox.Top + 5,
                                                controllerBox.Width - 10,
                                                controllerBox.Height - 10);
                        }
                    }
                }
                break;

                case SpaceName.LeftBottom:
                {
                    if (xdiff != 0 || ydiff != 0)
                    {
                        controllerBox.SetLocation(controllerBox.Left + xdiff, controllerBox.Top);
                        controllerBox.SetSize(controllerBox.Width - xdiff, controllerBox.Height + ydiff);
                        var targetBox = controllerBox.TargetBox;
                        if (targetBox != null)
                        {
                            //move target box too
                            targetBox.SetBounds(controllerBox.Left + 5,
                                                controllerBox.Top + 5,
                                                controllerBox.Width - 10,
                                                controllerBox.Height - 10);
                        }
                    }
                }
                break;
                }
            }
 void IEventListener.ListenMouseDoubleClick(UIMouseEventArgs e)
 {
     OnDoubleClick(e);
 }
 void IEventListener.ListenMouseDown(UIMouseEventArgs e)
 {
     OnMouseDown(e);
 }
예제 #12
0
        public static void OnHatsButtonMouseDown(WindowBase sender, UIMouseEventArgs eventArgs)
        {
            try
            {
                if (eventArgs.MouseKey == MouseKeys.kMouseLeft)
                {
                    CASHair ths = CASHair.gSingleton;

                    SetHairTypeCategory(ths, CASHair.HairType.Hat);
                }
                else if (eventArgs.MouseKey == MouseKeys.kMouseRight)
                {
                    RequestRandomPart(true);

                    eventArgs.mHandled = true;
                }
            }
            catch (Exception e)
            {
                Common.Exception("OnHatsButtonMouseDown", e);
            }
        }
예제 #13
0
 protected void ClickHandler(UIMouseEventArgs e)
 {
     JSRunner.ActivateDatePicker(ElementId, Utils.Parsers.InternalDateFormat);
 }
예제 #14
0
 protected override void OnDoubleClick(UIMouseEventArgs e)
 {
     textEditRenderElement.HandleDoubleClick(e);
     e.CancelBubbling = true;
 }
예제 #15
0
 //----------------------------------------------------------------
 protected override void OnMouseLeave(UIMouseEventArgs e)
 {
     e.MouseCursorStyle = MouseCursorStyle.Arrow;
 }
예제 #16
0
 public void Clicked(UIMouseEventArgs e)
 {
     // bvgColumn.bvgGrid.SelectColumn(bvgColumn);
     bvgColumn.bvgGrid.SortColumn(bvgColumn);
 }
예제 #17
0
 protected async Task ClickHandler(UIMouseEventArgs args)
 {
     await OnClick.InvokeAsync(this);
 }
예제 #18
0
 protected Task ExpandHandler(UIMouseEventArgs args)
 {
     this.isExpanded = !this.isExpanded;
     return(Task.CompletedTask);
 }
예제 #19
0
 protected Task ClickHandler(UIMouseEventArgs eventArgs)
 {
     return(Clicked.InvokeAsync(Page));
 }
예제 #20
0
 protected virtual void OnMouseUp(UIMouseEventArgs e)
 {
 }
예제 #21
0
 protected virtual void OnMouseWheel(UIMouseEventArgs e)
 {
 }
 public void cmd_mouseDown(UIMouseEventArgs e)
 {
     ChessEngine1.cmd_mouseDown(e);
 }
        #pragma warning restore 1998
#line 3 "x:\dir\subdir\Test\TestComponent.cshtml"

        Task OnClick(UIMouseEventArgs e)
        {
            return(Task.CompletedTask);
        }
 public void cmd_mouseUp(UIMouseEventArgs e)
 {
     //JsInterop.alert("a");
     // ChessEngine1.cmd_mouseUp(e);
 }
예제 #25
0
        public void OnHouseholdSimButtonMouseDown(WindowBase sender, UIMouseEventArgs eventArgs)
        {
            try
            {
                if (Skewer.Instance == null) return;

                IHudModel hudModel = Skewer.Instance.mHudModel;
                if (hudModel == null) return;

                Button button = sender as Button;
                if ((button != null) && (button.Tag != null))
                {
                    Sims3.UI.Responder.Instance.TutorialModel.TriggerTutorial(TutorialTriggers.SimSkewerClicked);
                    SimInfo tag = (SimInfo)button.Tag;

                    if (eventArgs.MouseKey == MouseKeys.kMouseLeft)
                    {
                        if ((eventArgs.Modifiers & (Modifiers.kModifierMaskControl|Modifiers.kModifierMaskShift)) != 0)
                        {
                            new ShowMenuTask(tag, false).AddToSimulator();
                        }
                        else
                        {
                            if ((mPreviousInfo != null) && (Matches(mPreviousInfo, tag)))
                            {
                                if (Skewer.Instance.mDoubleClickTimer.IsRunning() && (Skewer.Instance.mDoubleClickTimer.GetElapsedTimeFloat() < 0.5f))
                                {
                                    if (PortraitPanel.Settings.mMenuOnLeftClick)
                                    {
                                        new ShowMenuTask(tag, true).AddToSimulator();
                                    }
                                }
                            }

                            if ((Sim.ActiveActor != null) && (Sim.ActiveActor.ObjectId == tag.mGuid))
                            {
                                hudModel.MoveCameraToSim(tag.mGuid);
                            }
                            else if (!SelectSim(tag.mGuid))
                            {
                                if (hudModel.GetCurrentSimInfo() != null)
                                {
                                    if (Sims3.UI.Responder.Instance.PassportModel.IsSimRecallableFromPassport(tag))
                                    {
                                        hudModel.CheckPassportForRecall(tag);
                                    }

                                    OnSimChanged(hudModel.GetCurrentSimInfo().mGuid);
                                }
                            }

                            Skewer.Instance.mDoubleClickTimer.Restart();
                            mPreviousInfo = tag;
                        }

                        eventArgs.Handled = true;
                    }
                    else if (eventArgs.MouseKey == MouseKeys.kMouseRight)
                    {
                        bool following = false;

                        foreach(Skewer.SkewerItem item in mHouseholdItems)
                        {
                            if (Matches(item.mSimInfo, tag))
                            {
                                following = item.mbShouldShowFollowNotify;
                                break;
                            }
                        }

                        if ((following) || (PortraitPanel.Settings.mZoomInOnRightClick))
                        {
                            hudModel.AttachCameraToSim(tag.mGuid);
                        }
                        else
                        {
                            AttachCameraToSim(tag.mGuid);
                        }

                        if (!Matches(hudModel.GetCurrentSimInfo(), tag))
                        {
                            button.Selected = false;
                        }

                        eventArgs.Handled = true;
                    }
                    else if (eventArgs.MouseKey == MouseKeys.kMouseMiddle)
                    {
                        new ShowMenuTask(tag, false).AddToSimulator();
                        eventArgs.Handled = true;
                    }
                }
            }
            catch (Exception exception)
            {
                Common.Exception("OnHouseholdSimButtonMouseDown", exception);
            }
        }
 public void cmd_mouseMove(UIMouseEventArgs e)
 {
     // ChessEngine1.cmd_mouseMove(e);
 }
예제 #27
0
        protected static void OnSimMouseUp(WindowBase sender, UIMouseEventArgs eventArgs)
        {
            try
            {
                Window window = sender as Window;
                if ((window != null) && (window.Parent != null))
                {
                    if (eventArgs.MouseKey == MouseKeys.kMouseLeft)
                    {
                        if ((eventArgs.Modifiers & Modifiers.kModifierMaskControl) == Modifiers.kModifierMaskControl)
                        {
                            Sim activeActor = Sim.ActiveActor;

                            if (window.Parent.Tag is SimDescription)
                            {
                                Relationship relation = Relationship.Get((window.Parent.Tag as SimDescription), activeActor.SimDescription, false);
                                if (relation != null)
                                {
                                    Relationship.RemoveRelationship(relation);
                                }
                            }
                            else 
                            {
                                MiniSimDescriptionProxy proxy = window.Parent.Tag as MiniSimDescriptionProxy;

                                if ((proxy != null) && (proxy.mSim is GameObjectDescription))
                                {
                                    GameObjectDescription choice = proxy.mSim as GameObjectDescription;

                                    for (int i = activeActor.SimDescription.GameObjectRelationships.Count - 1; i >= 0; i--)
                                    {
                                        GameObjectRelationship relation = activeActor.SimDescription.GameObjectRelationships[i];

                                        if (relation.GameObjectDescription.GameObject == choice.GameObject)
                                        {
                                            activeActor.SimDescription.GameObjectRelationships.RemoveAt(i);
                                        }
                                    }                                    
                                }
                                else
                                {
                                    IMiniSimDescription miniSim = window.Parent.Tag as IMiniSimDescription;

                                    RemoveMiniRelationship(miniSim.SimDescriptionId, activeActor.SimDescription.SimDescriptionId);
                                    RemoveMiniRelationship(activeActor.SimDescription.SimDescriptionId, miniSim.SimDescriptionId);
                                }
                            }

                            RelationshipsPanel.Instance.Repopulate(RelationshipsPanel.Instance.mHudModel.CurrentRelationships);
                        }
                        else if (window.Parent.Tag is SimDescription)
                        {
                            SimDescriptionEx.OnPickFromPanel(window.Parent.Tag as SimDescription, eventArgs, new GameObjectHit(GameObjectHitType.Object));
                        }
                        else if (window.Parent.Tag is MiniSimDescriptionProxy)
                        {
                            MiniSimDescriptionProxy proxy = window.Parent.Tag as MiniSimDescriptionProxy;

                            if (proxy.mSim is GameObjectDescription)
                            {
                                (proxy.mSim as GameObjectDescription).OnPickFromPanel(eventArgs, new GameObjectHit(GameObjectHitType.Object));
                            }
                            else
                            {
                                MiniSimDescriptionEx.OnPickFromPanel(proxy.mSim as MiniSimDescription, eventArgs, new GameObjectHit(GameObjectHitType.Object));
                            }
                        }
                        else
                        {
                            (window.Parent.Tag as IMiniSimDescription).OnPickFromPanel(eventArgs, new GameObjectHit(GameObjectHitType.Object));
                        }
                    }
                    else if (eventArgs.MouseKey == MouseKeys.kMouseRight)
                    {
                        ObjectGuid objectGuid = (window.Tag == null) ? ObjectGuid.InvalidObjectGuid : ((ObjectGuid)window.Tag);
                        if (objectGuid != ObjectGuid.InvalidObjectGuid)
                        {
                            RelationshipsPanel.Instance.mHudModel.MoveCameraToSim(objectGuid);
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                Common.Exception("OnSimMouseUp", exception);
            }
        }
예제 #28
0
 protected async void Button2Click(UIMouseEventArgs args)
 {
     DialogService.Close(null);
 }
 void IEventListener.ListenLostMouseFocus(UIMouseEventArgs e)
 {
     OnLostMouseFocus(e);
 }
 protected async void Button3Click(UIMouseEventArgs args)
 {
     UriHelper.NavigateTo("Employees");
 }
 void IEventListener.ListenMouseLeave(UIMouseEventArgs e)
 {
     OnMouseLeave(e);
 }
예제 #32
0
 public void ComponentClicked(UIMouseEventArgs e)
 {
     (parent as CompUsedColors).ColorSelected(color);
 }
예제 #33
0
 public void ShowCellPhoneInteractions(UIMouseEventArgs eventArgs)
 {
     mHudModel.ShowCellPhoneInteractions(eventArgs);
 }
예제 #34
0
 internal Task CancelSearch(UIMouseEventArgs args)
 {
     tokenSource.Cancel();
     Searching = false;
     return(Task.CompletedTask);
 }
예제 #35
0
 protected virtual void OnDoubleClick(UIMouseEventArgs e)
 {
 }
예제 #36
0
 void ButtonClicked(UIMouseEventArgs e)
 {
     Console.WriteLine("button clicked");
 }
예제 #37
0
 protected virtual void OnMouseLeave(UIMouseEventArgs e)
 {
 }
예제 #38
0
 protected virtual void OnMouseWheel(UIMouseEventArgs e)
 {
 }
예제 #39
0
 protected virtual void OnMouseHover(UIMouseEventArgs e)
 {
 }
예제 #40
0
 protected virtual void OnLostMouseSelectedFocus(UIMouseEventArgs e)
 {
 }
예제 #41
0
        public static void OnPickFromPanel(MiniSimDescription ths, UIMouseEventArgs eventArgs, GameObjectHit gameObjectHit)
        {
            try
            {
                Sims3.Gameplay.UI.PieMenu.ClearInteractions();
                Sims3.Gameplay.UI.PieMenu.HidePieMenuSimHead = true;
                Sims3.UI.Hud.PieMenu.sIncrementalButtonIndexing = true;

                Sim activeActor = Sim.ActiveActor;
                if (activeActor != null)
                {
                    if (activeActor.InteractionQueue.CanPlayerQueue())
                    {
                        List<InteractionObjectPair> interactions = new List<InteractionObjectPair>();

                        if (GameUtils.IsInstalled(ProductVersion.EP8))
                        {
                            InteractionDefinition interaction = new Mailbox.WriteLoveLetter.Definition(ths.SimDescriptionId);
                            interactions.Add(new InteractionObjectPair(interaction, activeActor));
                        }

                        IPhone targetObject = activeActor.Inventory.Find<IPhone>();
                        if (targetObject != null)
                        {
                            interactions.Add(new InteractionObjectPair(GetCallInviteOverForeignVisitorsFromRelationPanelDefinition(ths), targetObject));
                            interactions.Add(new InteractionObjectPair(targetObject.GetCallChatFromRelationPanelDefinition(ths), targetObject));
                            interactions.Add(new InteractionObjectPair(targetObject.GetCallInviteToAttendGraduationFromRelationPanelDefinition(ths), targetObject));
                        }
                        if (GameUtils.IsInstalled(ProductVersion.EP9))
                        {
                            interactions.Add(new InteractionObjectPair(targetObject.GetSendChatTextFromRelationPanelDefinition(ths), targetObject));
                            interactions.Add(new InteractionObjectPair(targetObject.GetSendInsultTextFromRelationPanelDefinition(ths), targetObject));
                            interactions.Add(new InteractionObjectPair(targetObject.GetSendPictureTextFromRelationPanelDefinition(ths), targetObject));
                            interactions.Add(new InteractionObjectPair(targetObject.GetSendSecretAdmirerTextFromRelationPanelDefinition(ths), targetObject));
                            interactions.Add(new InteractionObjectPair(targetObject.GetSendBreakUpTextFromRelationPanelDefinition(ths), targetObject));
                            interactions.Add(new InteractionObjectPair(targetObject.GetSendWooHootyTextFromRelationPanelDefinition(ths), targetObject));
                        }

                        if (CelebrityManager.CanSocialize(activeActor.SimDescription, ths))
                        {
                            Sims3.Gameplay.UI.PieMenu.TestAndBringUpPieMenu(null, eventArgs, gameObjectHit, interactions, InteractionMenuTypes.Normal);
                        }
                        else
                        {
                            GreyedOutTooltipCallback greyedOutTooltipCallbackForced = delegate
                            {
                                return Common.LocalizeEAString("Gameplay/CelebritySystem/CelebrityManager:NotAbleToSocialize");
                            };
                            Sims3.Gameplay.UI.PieMenu.TestAndBringUpPieMenu(null, eventArgs, gameObjectHit, interactions, InteractionMenuTypes.Normal, "Gameplay/Abstracts/GameObject:NoInteractions", false, greyedOutTooltipCallbackForced);
                        }
                    }
                    else
                    {
                        Vector2 mousePosition;
                        if (eventArgs.DestinationWindow != null)
                        {
                            mousePosition = eventArgs.DestinationWindow.WindowToScreen(eventArgs.MousePosition);
                        }
                        else
                        {
                            mousePosition = eventArgs.MousePosition;
                        }
                        Sims3.Gameplay.UI.PieMenu.ShowGreyedOutTooltip(Common.LocalizeEAString("Gameplay/Abstracts/GameObject:TooManyInteractions"), mousePosition);
                    }
                }
            }
            catch (Exception e)
            {
                Common.Exception(ths.FullName, e);
            }
        }
예제 #42
0
 protected virtual void OnDoubleClick(UIMouseEventArgs e)
 {
 }
예제 #43
0
        private bool OnSelect(Sim sim, UIMouseEventArgs eventArgs)
        {
            if (!UIUtils.IsOkayToStartModalDialog(true)) return false;

            return DreamCatcher.Select(sim, Selector.Settings.mDreamCatcher, true);
        }
예제 #44
0
 //-------------------------------------------------------
 protected virtual void OnMouseDown(UIMouseEventArgs e)
 {
 }
예제 #45
0
        public void OnCyclePortraits(WindowBase sender, UIMouseEventArgs eventArgs)
        {
            try
            {
                if (eventArgs.MouseKey == MouseKeys.kMouseLeft)
                {
                    for (int i = 0; i < mStartIterations.Length; i++)
                    {
                        mStartIterations[i]++;
                    }

                    PopulateSkewers();
                }
                else
                {
                    Common.FunctionTask.Perform(OnShowListing);
                }
            }
            catch (Exception e)
            {
                Common.Exception("OnCyclePortraits", e);
            }
        }
예제 #46
0
 protected virtual void OnMouseMove(UIMouseEventArgs e)
 {
 }
예제 #47
0
        public static bool OnPick(GameObject ths, UIMouseEventArgs eventArgs, GameObjectHit gameObjectHit)
        {
            Sim activeActor = Sim.ActiveActor;

            try
            {
                if (!GameStates.IsPlayFlowState)
                {
                    if (GameStates.IsBuildBuyLikeState) return false;

                    bool isFemale = false;
                    if (activeActor != null)
                    {
                        isFemale = activeActor.IsFemale;
                    }

                    InteractionMenuTypes menuType = InteractionMenuTypes.Normal;

                    List<InteractionObjectPair> interactions = new List<InteractionObjectPair>();
                    if (((eventArgs.Modifiers & Modifiers.kModifierMaskShift) != Modifiers.kModifierMaskNone) && Cheats.sTestingCheatsEnabled)
                    {
                        interactions.AddRange(ths.GetAllCheatInteractionsForActor(activeActor));

                        if (Selector.Settings.mMoveInteractionsToShift)
                        {
                            foreach (InteractionObjectPair pair in ths.GetAllInteractionsForActor(activeActor))
                            {
                                if (IsImmediateInteraction(pair, isFemale))
                                {
                                    interactions.Add(pair);
                                }
                            }
                        }

                        menuType = InteractionMenuTypes.Debug;

                        GameObject.ValidateInteractionList(activeActor, interactions);
                    }
                    else if ((activeActor != null) && activeActor.InteractionQueue.CanPlayerQueue())
                    {
                        List<InteractionObjectPair> allInteractions = null;
                        if (ths.Charred)
                        {
                            allInteractions = ths.GetCharredInteractions(activeActor);
                        }
                        else
                        {
                            allInteractions = ths.GetAllInteractionsForActor(activeActor);
                        }

                        if (Selector.Settings.mMoveInteractionsToShift)
                        {
                            foreach (InteractionObjectPair pair in allInteractions)
                            {
                                if (!IsImmediateInteraction(pair, isFemale))
                                {
                                    interactions.Add(pair);
                                }
                            }
                        }
                        else
                        {
                            interactions = allInteractions;
                        }

                        GameObject.ValidateInteractionList(activeActor, interactions);

                        Lot targetObject = LotManager.GetLot(gameObjectHit.mId);
                        if (ths.IsOnDivingFloor && ((activeActor.Level != ths.Level) || (activeActor.LotCurrent != ths.LotCurrent)))
                        {
                            interactions.Add(new InteractionObjectPair(ProxyGoToTargetsLotAndScubaDive.Singleton, ths.LotCurrent));
                        }
                        else if ((((targetObject != null) && targetObject.IsDivingLot) && (gameObjectHit.mType == GameObjectHitType.LotTerrain)) && ((activeActor.Level != 0) || (activeActor.LotCurrent != targetObject)))
                        {
                            interactions.Add(new InteractionObjectPair(ProxyGoToTargetsLotAndScubaDive.Singleton, targetObject));
                        }
                    }
                    else if ((activeActor != null) && !activeActor.InteractionQueue.CanPlayerQueue())
                    {
                        Sims3.Gameplay.UI.PieMenu.ShowGreyedOutTooltip(Localization.LocalizeString("Gameplay/Abstracts/GameObject:TooManyInteractions", new object[0x0]), eventArgs.MousePosition);
                        return true;
                    }
                    else
                    {
                        if (Selector.Settings.mShowNoInteractions)
                        {
                            Sims3.Gameplay.UI.PieMenu.ShowGreyedOutTooltip(Localization.LocalizeString("Gameplay/Abstracts/GameObject:NoInteractions", new object[0x0]), eventArgs.MousePosition);
                        }
                        return true;
                    }

                    if (!TestInteractions(activeActor, gameObjectHit, interactions))
                    {
                        if (!Selector.Settings.mShowNoInteractions) return true;
                    }

                    bool success = false;

                    try
                    {
                        Sims3.Gameplay.UI.PieMenu.TestAndBringUpPieMenu(ths, eventArgs, gameObjectHit, interactions, menuType);
                        success = true;
                    }
                    catch (Exception e)
                    {
                        Common.Exception(activeActor, ths, e);
                    }

                    if (!success)
                    {
                        List<InteractionObjectPair> immediateInteractions = new List<InteractionObjectPair>();

                        foreach (InteractionObjectPair interaction in interactions)
                        {
                            if (interaction.InteractionDefinition is IImmediateInteractionDefinition)
                            {
                                immediateInteractions.Add(interaction);
                            }
                        }

                        immediateInteractions = ths.BuildInteractions(activeActor, immediateInteractions);

                        Sims3.Gameplay.UI.PieMenu.TestAndBringUpPieMenu(ths, eventArgs, gameObjectHit, immediateInteractions, menuType);
                    }

                    return true;
                }
            }
            catch (Exception e)
            {
                Common.Exception(activeActor, ths, e);
            }

            return false;
        }
예제 #48
0
 protected virtual void OnMouseEnter(UIMouseEventArgs e)
 {
 }
예제 #49
0
        private bool OnPickLot(Lot ths, UIMouseEventArgs eventArgs, GameObjectHit gameObjectHit)
        {
            BuildableShell[] buildableShells = ths.BuildableShells;
            int index = 0x0;
            while (index < buildableShells.Length)
            {
                return GameObjectEx.OnPick(buildableShells[index], eventArgs, gameObjectHit);
            }

            return GameObjectEx.OnPick(ths, eventArgs, gameObjectHit);
        }
예제 #50
0
        #pragma warning restore 1998
#line 5 "C:\Users\edcha\source\repos\BlazeDown\DownloadComponents\DownloadButton.cshtml"


        private void OnClicked(UIMouseEventArgs e)
        {
            MsSaveBlobInterop.MsSaveBlob(Payload, FileName);
        }
예제 #51
0
        public static void OnPickFromPanel(SimDescription ths, UIMouseEventArgs eventArgs, GameObjectHit gameObjectHit)
        {
            try
            {
                Sims3.Gameplay.UI.PieMenu.ClearInteractions();
                Sims3.Gameplay.UI.PieMenu.HidePieMenuSimHead = true;
                Sims3.UI.Hud.PieMenu.sIncrementalButtonIndexing = true;

                Sim activeActor = Sim.ActiveActor;
                if (activeActor != null)
                {
                    if (activeActor.InteractionQueue.CanPlayerQueue())
                    {
                        bool success = false;
                        try
                        {
                            IPhone activePhone = null;
                            if (activeActor.Inventory != null)
                            {
                                activePhone = activeActor.Inventory.Find<IPhone>();
                            }

                            List<InteractionObjectPair> interactions = new List<InteractionObjectPair>();

                            bool isServiceAlien = (ths.Household != null) && ths.Household.IsAlienHousehold;
                            if (GameUtils.IsInstalled(ProductVersion.EP8) && !isServiceAlien)
                            {
                                interactions.Add(new InteractionObjectPair(new Mailbox.WriteLoveLetter.Definition(ths.SimDescriptionId), activeActor));
                            }

                            if (GameUtils.IsInstalled(ProductVersion.EP10))
                            {
                                interactions.Add(new InteractionObjectPair(new OccultMermaid.SignalMermaid.Definition(ths), activeActor));
                            }

                            if (ths.CreatedSim != null)
                            {
                                List<InteractionObjectPair> others = ths.CreatedSim.GetAllInteractionsForActor(activeActor);
                                if (others != null)
                                {
                                    interactions.AddRange(others);
                                }
                            }

                            if (ths.IsHuman)
                            {
                                if (ths.CreatedSim != null)
                                {
                                    interactions.Add(new InteractionObjectPair(CallOver.Singleton, ths.CreatedSim));
                                }

                                if (activePhone != null)
                                {
                                    interactions.Add(new InteractionObjectPair(activePhone.GetCallChatFromRelationPanelDefinition(ths), activePhone));

                                    if (GameUtils.IsInstalled(ProductVersion.EP4))
                                    {
                                        interactions.Add(new InteractionObjectPair(activePhone.GetCallPrank(ths), activePhone));
                                    }

                                    if (GameUtils.IsInstalled(ProductVersion.EP9))
                                    {
                                        interactions.Add(new InteractionObjectPair(activePhone.GetSendChatTextFromRelationPanelDefinition(ths), activePhone));
                                        interactions.Add(new InteractionObjectPair(activePhone.GetSendInsultTextFromRelationPanelDefinition(ths), activePhone));
                                        interactions.Add(new InteractionObjectPair(activePhone.GetSendPictureTextFromRelationPanelDefinition(ths), activePhone));
                                        interactions.Add(new InteractionObjectPair(activePhone.GetSendSecretAdmirerTextFromRelationPanelDefinition(ths), activePhone));
                                        interactions.Add(new InteractionObjectPair(activePhone.GetSendBreakUpTextFromRelationPanelDefinition(ths), activePhone));
                                        if (!sGetSendWooHootyTextDefinition.Valid)
                                        {
                                            interactions.Add(new InteractionObjectPair(activePhone.GetSendWooHootyTextFromRelationPanelDefinition(ths), activePhone));
                                        }
                                        else
                                        {
                                            InteractionDefinition instance = null;
                                            instance = sGetSendWooHootyTextDefinition.Invoke<InteractionDefinition>(new object[] { ths });
                                            interactions.Add(new InteractionObjectPair(instance, activePhone));
            
                                        }
                                    }

                                    if ((!ths.IsEnrolledInBoardingSchool() && !ths.IsDroppingOut) && !GameStates.IsEarlyDepartureSim(ths.SimDescriptionId))
                                    {
                                        interactions.Add(new InteractionObjectPair(activePhone.GetCallInviteOverFromRelationPanelDefinition(ths, true), activePhone));
                                        interactions.Add(new InteractionObjectPair(activePhone.GetCallInviteToLotFromRelationPanelDefintion(ths), activePhone));
                                        interactions.Add(new InteractionObjectPair(activePhone.GetCallAskOutOnDateFromRelationPanelDefintion(ths), activePhone));
                                        if (!isServiceAlien)
                                        {
                                            interactions.Add(new InteractionObjectPair(activePhone.GetCallInviteHouseholdOverFromRelationshipPanelDefiniton(ths), activePhone));
                                        }
                                        interactions.Add(new InteractionObjectPair(activePhone.GetCallInviteToAttendGraduationFromRelationPanelDefinition(ths), activePhone));
                                    }
                                    else
                                    {
                                        interactions.Add(new InteractionObjectPair(activePhone.GetRemoveFromBoardingSchool(ths), activePhone));
                                    }
                                }
                            }
                            else if (ths.IsPet)
                            {
                                if (ths.CreatedSim != null)
                                {
                                    interactions.Add(new InteractionObjectPair(Sim.CallPet.Singleton, ths.CreatedSim));
                                }

                                if (activePhone != null)
                                {
                                    interactions.Add(new InteractionObjectPair(activePhone.GetCallBringPetOverFromRelationshipPanelDefinition(ths), activePhone));
                                }
                            }

                            if (CelebrityManager.CanSocialize(activeActor.SimDescription, ths))
                            {
                                Sims3.Gameplay.UI.PieMenu.TestAndBringUpPieMenu(ths.CreatedSim, eventArgs, gameObjectHit, interactions, InteractionMenuTypes.Normal);
                                success = true;
                            }
                        }
                        catch (Exception e)
                        {
                            Common.Exception(activeActor.SimDescription, ths, e);
                        }

                        if ((!success) && (ths.CreatedSim != null))
                        {
                            Sims3.Gameplay.UI.PieMenu.TestAndBringUpPieMenu(ths.CreatedSim, eventArgs, gameObjectHit, InteractionsEx.GetImmediateInteractions(ths.CreatedSim), InteractionMenuTypes.Normal);
                        }
                    }
                    else
                    {
                        Vector2 mousePosition;
                        if (eventArgs.DestinationWindow != null)
                        {
                            mousePosition = eventArgs.DestinationWindow.WindowToScreen(eventArgs.MousePosition);
                        }
                        else
                        {
                            mousePosition = eventArgs.MousePosition;
                        }
                        Sims3.Gameplay.UI.PieMenu.ShowGreyedOutTooltip(Common.LocalizeEAString("Gameplay/Abstracts/GameObject:TooManyInteractions"), mousePosition);
                    }
                }
            }
            catch (Exception e)
            {
                Common.Exception(ths, e);
            }
        }
예제 #52
0
 protected override void OnMouseUp(UIMouseEventArgs e)
 {
     _mouseUpEventHandler?.Invoke(e);
     base.OnMouseUp(e);
 }
 void IEventListener.ListenMouseUp(UIMouseEventArgs e)
 {
     OnMouseUp(e);
 }
예제 #54
0
 protected override void OnLostMouseFocus(UIMouseEventArgs e)
 {
     _mouseLostFocusEventHandler?.Invoke(e);
     base.OnLostMouseFocus(e);
 }
 void IEventListener.ListenMouseClick(UIMouseEventArgs e)
 {
 }
예제 #56
0
 void ReleaseMouseEvent(UIMouseEventArgs e)
 {
     e.Clear();
     //TODO: review event stock here again
     this.stockMouseEvents.Push(e);
 }
 void IEventListener.ListenMouseWheel(UIMouseEventArgs e)
 {
     OnMouseWheel(e);
 }
예제 #58
0
 public void OnClick(UIMouseEventArgs e)
 {
     OnTabClick(Content);
 }
예제 #59
0
        protected async void Button0Click(UIMouseEventArgs args)
        {
            var result = await DialogService.OpenAsync <AddCustomerCustomerDemo>("Add Customer Customer Demo", null);

            await Invoke(() => { StateHasChanged(); });
        }
예제 #60
0
 protected async void Button2Click(UIMouseEventArgs args)
 {
     UriHelper.NavigateTo("CustomerDemographics");
 }