Пример #1
0
        public HudModelProxy(IHudModel hudModel)
        {
            mHudModel = hudModel;

            mHudModel.AutonomousInteractionCancelledFromUI += OnAutonomousInteractionCancelledFromUIProxy;
            mHudModel.CareerPerformanceChanged += OnCareerPerformanceChangedProxy;
            mHudModel.CareerUpdated += OnCareerUpdatedProxy;
            mHudModel.CompetitionStandingEvent += OnCompetitionStandingEventProxy;
            mHudModel.CurrentSimInventoryOwnerChanged += OnCurrentSimInventoryOwnerChangedProxy;
            mHudModel.HouseholdAncientCoinCountChanged += OnHouseholdAncientCoinCountChangedProxy;
            mHudModel.HideCompetitionPanelEvent += OnHideCompetitionPanelEventProxy;
            mHudModel.HouseholdChanged += OnHouseholdChangedProxy;
            mHudModel.HouseholdFundsChanged += OnHouseholdFundsChangedProxy;
            mHudModel.InteractionQueueDirtied += OnInteractionQueueDirtiedProxy;
            mHudModel.JobTrackingUpdated += OnJobTrackingUpdatedProxy;
            mHudModel.LifeEventUpdate += OnLifeEventUpdateProxy;
            mHudModel.LifetimePointsChanged += OnLifetimePointsChangedProxy;
            mHudModel.LotChanged += OnLotChangedProxy;
            mHudModel.MinuteChanged += OnMinuteChangedProxy;
            mHudModel.OccultUpdated += OnOccultUpdatedProxy;
            mHudModel.PostureChanged += OnPostureChangedProxy;
            mHudModel.RelationshipsChanged += OnRelationshipsChangedProxy;
            mHudModel.RewardTraitsChanged += OnRewardTraitsChangedProxy;
            mHudModel.SecondaryInventoryOwnerChanged += OnSecondaryInventoryOwnerChangedProxy;
            mHudModel.ShowCompetitionPanelEvent += OnShowCompetitionPanelEventProxy;
            mHudModel.SimAgeChanged += OnSimAgeChangedProxy;
            mHudModel.SimAppearanceChanged += OnSimAppearanceChangedProxy;
            mHudModel.SimBuffsChanged += OnSimBuffsChangedProxy;
            mHudModel.SimCelebrityInfoChanged += OnSimCelebrityInfoChangedProxy;
            mHudModel.SimChanged += OnSimChangedProxy;
            mHudModel.SimCurrentWorldChanged += OnSimCurrentWorldChangedProxy;
            mHudModel.SimDaysPerAgingYearChanged += OnSimDaysPerAgingYearChangedProxy;
            mHudModel.SimFavoritesChanged += OnSimFavoritesChangedProxy;
            mHudModel.SimLotChanged += OnSimLotChangedProxy;
            mHudModel.SimMoodChanged += OnSimMoodChangedProxy;
            mHudModel.SimMoodValueChanged += OnSimMoodValueChangedProxy;
            mHudModel.SimMotivesChanged += OnSimMotivesChangedProxy;
            mHudModel.SimNameChanged += OnSimNameChangedProxy;
            mHudModel.SimRoomChanged += OnSimRoomChangedProxy;
            mHudModel.SkewerNotificationChanged += OnSkewerNotificationChangedProxy;
            mHudModel.SkillChanged += OnSkillChangedProxy;
            mHudModel.TraitsChanged += OnTraitsChangedProxy;
            mHudModel.TraitUseUpdated += OnTraitUseUpdatedProxy;
            mHudModel.TriggerCompetitionProgressBarGlowEvent += OnTriggerCompetitionProgressBarGlowEventProxy;
            mHudModel.TwelveHourClockSettingChanged += OnTwelveHourClockSettingChangedProxy;
            mHudModel.VisitorsChanged += OnVisitorsChangedProxy;
            mHudModel.WallModeChanged += OnWallModeChangedProxy;
            mHudModel.LunarUpdate += OnLunarUpdateProxy;
            mHudModel.MagicMotiveChanged += OnMagicMotiveChangedProxy;
            mHudModel.SeasonTransitioned += OnSeasonTransitionedProxy;
            mHudModel.TemperatureWaveChanged += OnTemperatureWaveChangedProxy;
            mHudModel.UpdatePhoneIcon += OnUpdatePhoneIconProxy;
            mHudModel.RefreshCurrentSimInfoSkewer += OnRefreshCurrentSimInfoSkewerProxy;
            mHudModel.BotCompetitionStandingEvent += OnBotCompetitionStandingEvent;
            mHudModel.HideBotCompetitionPanelEvent += OnHideBotCompetitionPanelEvent;
            mHudModel.ShowBotCompetitionPanelEvent += OnShowBotCompetitionPanelEvent;
            mHudModel.UpdateTimeAlmanac += OnUpdateTimeAlmanac;
            mHudModel.TriggerBotCompetitionProgressBarGlowEvent += OnTriggerBotCompetitionProgressBarGlowEvent;
       }
Пример #2
0
        private static Tooltip CreateKnownInfoToolTip(Vector2 mousePosition, WindowBase parent, ref Vector2 tooltipPosition)
        {
            try
            {
                if (Sim.ActiveActor == null)
                {
                    return(null);
                }

                NotificationManager manager = NotificationManager.Instance;
                if (manager != null)
                {
                    if ((manager.mNotifications[manager.mCurrentCategory].Count > manager.mCurrentNotification) && (manager.mCurrentNotification >= 0x0))
                    {
                        StyledNotification notice = manager.mNotifications[manager.mCurrentCategory][manager.mCurrentNotification] as StyledNotification;
                        if (notice != null)
                        {
                            if (notice.mNotificationWindow != null)
                            {
                                Sim sim = null;

                                if (notice.mNotificationWindow.GetChildByID(0x5, true) == parent)
                                {
                                    if (notice.mIDOne != ObjectGuid.InvalidObjectGuid)
                                    {
                                        sim = GameObject.GetObject <Sim>(notice.mIDOne);
                                    }
                                }
                                else
                                {
                                    if (notice.mIDTwo != ObjectGuid.InvalidObjectGuid)
                                    {
                                        sim = GameObject.GetObject <Sim>(notice.mIDTwo);
                                    }
                                }

                                if (sim != null)
                                {
                                    IMiniSimDescription tag = sim.SimDescription;
                                    if (tag != null)
                                    {
                                        IHudModel hudModel = Sims3.Gameplay.UI.Responder.Instance.HudModel;

                                        Tooltip result = new KnownInfoTooltip(tag.FullName, hudModel.GetLTRRelationshipString(Sim.ActiveActor.SimDescription, tag), tag.HomeWorld, HudModelEx.GetKnownInfo(hudModel as HudModel, tag));

                                        tooltipPosition = (tooltipPosition - (mousePosition - parent.Position)) + new Vector2(-result.TooltipWindow.Area.Width, parent.Area.Height);

                                        return(result);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Common.Exception("CreateKnownInfoToolTip", e);
            }
            return(null);
        }