public static void OnDesignButtonClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { CASClothingCategory ths = CASClothingCategory.gSingleton; if (ths == null) { return; } if (ths.mCurrentPart == BodyTypes.Accessories) { if (ths.mCurrentPreset != null) { if (ths.mCurrentPreset.mPart.Key != ths.mInvalidCASPart.Key) { CASCompositorController.Instance.SetTargetObject(ths.mCurrentPreset.mPart); return; } } } ths.OnDesignButtonClick(sender, eventArgs); } catch (Exception e) { Common.Exception("OnDesignButtonClick", e); } }
private static void OnAcceptHousehold(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { CASPuck ths = CASPuck.Instance; Sims3.UI.Function f = null; if (!ths.mUiBusy && !ths.mAttemptingToAddSim) { ths.mUiBusy = true; if (f == null) { f = delegate { CASController.Singleton.SetCurrentState(CASState.Summary); if (ths.ShowRequiredItemsDialogTask()) { ths.AcceptHouseholdCallback(); } else { ths.mUiBusy = false; } }; } Simulator.AddObject(new Sims3.UI.OneShotFunctionTask(f)); } eventArgs.Handled = true; } catch (Exception e) { Common.Exception("OnAcceptHousehold", e); } }
private static void OnAcceptHousehold(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { CASPuck ths = CASPuck.Instance; Sims3.UI.Function f = null; if (!ths.mUiBusy && !ths.mAttemptingToAddSim) { ths.mUiBusy = true; if (f == null) { f = delegate { CASController.Singleton.SetCurrentState(CASState.Summary); if (ths.ShowRequiredItemsDialogTask()) { ths.AcceptHouseholdCallback(); } else { ths.mUiBusy = false; } }; } Simulator.AddObject(new Sims3.UI.OneShotFunctionTask(f)); } eventArgs.Handled = true; } catch (Exception e) { Common.Exception("OnAcceptHousehold", e); } }
private void OnOKClickEx(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { while (mSimTravelInfoList[1].Remove(mActivator)) { ; } if (!mBlockInput) { if (mSimListGrid[0x1].Count == 0) { mResult = new Result(mCurrentDuration, 0, mDestinationGrid.SelectedTag as IDestinationInfo, new List <ISimDescription>()); OnTriggerOk(); return; } } OnOKClick(sender, eventArgs); } catch (Exception e) { Common.Exception("OnOKClickEx", e); } }
private void OnArrowClickEx(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { while (mSimTravelInfoList[0].Remove(mActivator)) { ; } if (sender.ID != 0x4) { ISimTravelInfo selectedTag = mSimListGrid[0].SelectedTag as ISimTravelInfo; if (selectedTag == mActivator) { PopulateGrids(); return; } } OnArrowClick(sender, eventArgs); if (GameStates.sTravelData != null) { mAcceptButton.Enabled = (mSimListGrid[1].Count == GameStates.sTravelData.mTravelerIds.Count); } } catch (Exception e) { Common.Exception("OnArrowClickEx", e); } }
public static void OnButtonTabClick(WindowBase sender, UIButtonClickEventArgs args) { try { CASMakeup ths = CASMakeup.gSingleton; if (ths == null) { return; } switch (sender.ID) { case 0x104: SetCategory(BodyTypes.CostumeMakeup); break; default: ths.OnButtonTabClick(sender, args); break; } } catch (Exception e) { Common.Exception("OnButtonTabClick", e); } }
private static void OnAcceptClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { CASTattoo ths = CASTattoo.gSingleton; if (ths.HasAnyPartsInUse()) { Responder.Instance.CASModel.RequestFinalizeCommitPresetToPart(); AdvancedMode = false; ths.PopulateTattooGrid(false, true); ths.mTattooGrid.ShowSelectedItem(false); } else { ths.ClearAllParts(); ths.ClearTemplates(); ths.CurrentPreset.mPresetId = 0x0; ths.CurrentPreset.mPresetString = CASUtils.PartDataGetPreset(ths.mActiveTattooPart.Key, 0x0); AdvancedMode = false; ths.mRemoveTattooOnUndo = true; Responder.Instance.CASModel.RequestUndo(); } eventArgs.Handled = true; } catch (Exception e) { Common.Exception("OnAcceptClick", e); } }
public static void OnCASClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { Common.FunctionTask.Perform(GotoCASMode); } catch (Exception e) { Common.Exception("OnCASClick", e); } }
protected static void OnClickGenealogy(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { Common.FunctionTask.Perform(ShowFamilyTreeDialog); } catch (Exception e) { Common.Exception("OnClickGenealogy", e); } }
public static void OnSplitClick(WindowBase w, UIButtonClickEventArgs eventArgs) { try { GameEntryMovingModelEx.SplitHousehold(EditTownController.Instance, EditTownInfoPanel.sInstance.mInfo); } catch (Exception e) { Common.Exception("OnSplitClick", e); } }
protected static void OnClickGenealogy(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { Common.FunctionTask.Perform(ShowFamilyTreeDialog); } catch (Exception e) { Common.Exception("OnClickGenealogy", e); } }
public static void OnCASClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { Common.FunctionTask.Perform(GotoCASMode); } catch (Exception e) { Common.Exception("OnCASClick", e); } }
public static void OnButtonDesignClick(WindowBase sender, UIButtonClickEventArgs args) { try { Common.FunctionTask.Perform(ShowColorPickerTask); } catch (Exception e) { Common.Exception("OnButtonDesignClick", e); } }
private static void OnAdvancedClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { AdvancedMode = true; eventArgs.Handled = true; } catch (Exception e) { Common.Exception("OnAdvancedClick", e); } }
public static void OnSwitchToClick(WindowBase w, UIButtonClickEventArgs eventArgs) { try { eventArgs.Handled = true; Common.FunctionTask.Perform(SwitchToClick); } catch (Exception e) { Common.Exception("OnSwitchToClick", e); } }
public static void OnSwitchToClick(WindowBase w, UIButtonClickEventArgs eventArgs) { try { eventArgs.Handled = true; Common.FunctionTask.Perform(SwitchToClick); } catch (Exception e) { Common.Exception("OnSwitchToClick", e); } }
public static void OnAcceptHousehold(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { CASPuck ths = CASPuck.Instance; if (!ths.UiBusy && !ths.mAttemptingToAddSim) { Sims.CASBase.StoreChanges(); ths.UiBusy = true; Common.FunctionTask.Perform(delegate { if (Responder.Instance.CASModel.Species == CASAgeGenderFlags.Human) { CASController.Singleton.SetCurrentState(CASState.Summary); } else { CASController.Singleton.SetCurrentState(CASState.PetSummary); } if (ShowRequiredItemsDialogTask(ths)) { ths.AcceptHouseholdCallback(); } else { ths.UiBusy = false; } /* * // Custom * if (ShowRequiredItemsDialogTask(ths)) * { * AcceptHouseholdCallback(ths); * } * else * { * ths.UiBusy = false; * } */ }); } eventArgs.Handled = true; } catch (Exception exception) { Common.Exception("OnAcceptHousehold", exception); } }
public static void OnAcceptSim(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { CASPuck ths = CASPuck.Instance; if (!ths.UiBusy) { ths.UiBusy = true; CASExitLoadScreen.DisableQuit = true; // Custom if (CASLogic.Instance.OutfitCategory == OutfitCategories.Career) { CASLogic.Instance.OutfitCategory = OutfitCategories.Everyday; SpeedTrap.Sleep(); } if (Responder.Instance.CASModel.CASMode == CASMode.CreateABot) { Function f = delegate { CASController.Singleton.SetCurrentState(CASState.BotSummary); if (ths.ShowCABRequiredItemsDialogTask()) { // Custom AcceptSimCallback(ths); } else { ths.UiBusy = false; } }; Simulator.AddObject(new OneShotFunctionTask(f)); } else { // Custom AcceptSimCallback(ths); } } eventArgs.Handled = true; } catch (Exception exception) { Common.Exception("OnAcceptHousehold", exception); } }
private static void OnAcceptButtonClick(WindowBase sender, UIButtonClickEventArgs args) { try { CASGenetics ths = CASGenetics.gSingleton; if (ths == null) { return; } if (!ths.mHourglassVisible) { args.Handled = true; if (ths.mSelectedOffspring != null) { if (CASPuck.Instance != null) { ths.mReturnState = ths.mSelectedOffspring.IsPet ? CASState.PetSummary : CASState.Summary; CASPuck.Instance.AttemptingToAdd = true; CASPuck.ShowInputBlocker(); Responder.Instance.CASModel.RequestLoadSim(ths.mSelectedOffspring, false); Responder.Instance.CASModel.RequestAddSimToHousehold(false); Responder.Instance.CASModel.RequestClearStack(); CASController.Singleton.SetCurrentState(ths.mReturnState); } else { FacialBlends.CopyGenetics(ths.mSelectedOffspring as SimDescription, sChoice, false, false); new SavedOutfit.Cache(sChoice).PropagateGenetics(sChoice, CASParts.sPrimary); SimOutfit currentOutfit = sChoice.CreatedSim.CurrentOutfit; if (currentOutfit != null) { ThumbnailManager.GenerateHouseholdSimThumbnail(currentOutfit.Key, currentOutfit.Key.InstanceId, 0x0, ThumbnailSizeMask.Large | ThumbnailSizeMask.ExtraLarge | ThumbnailSizeMask.Medium | ThumbnailSizeMask.Small, ThumbnailTechnique.Default, true, false, sChoice.AgeGenderSpecies); } DestroyHousehold(); CASGenetics.Unload(); } } } } catch (Exception e) { Common.Exception("OnAcceptButtonClick", e); } }
private static void OnCancelButtonClick(WindowBase sender, UIButtonClickEventArgs args) { try { CASGenetics ths = CASGenetics.gSingleton; if (ths == null) { return; } if (!ths.mHourglassVisible) { args.Handled = true; if (CASPuck.Instance != null) { ths.mReturnState = Responder.Instance.CASModel.CurrentSimDescription.IsPet ? CASState.PetSummary : CASState.Summary; if (ths.mSelectedOffspring == null) { CASController.Singleton.SetCurrentState(ths.mReturnState); } else { int currentPreviewSim = CASPuck.gSingleton.CurrentPreviewSim; if (currentPreviewSim != -1) { ths.mCancelingSim = true; Responder.Instance.CASModel.RequestSetPreviewSim(currentPreviewSim); } else { CASController.Singleton.SetCurrentState(ths.mReturnState); } } } else { DestroyHousehold(); CASGenetics.Unload(); } } } catch (Exception e) { Common.Exception("OnCancelButtonClick", e); } }
private void OnArrowClickEx(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { mDegreeCombo.SelectionChange -= OnDegreeChangeEx; OnArrowClick(sender, eventArgs); UpdateSelection(); } catch (Exception e) { Common.Exception("OnArrowClickEx", e); } }
public static void OnRandomizeNameClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { CASRequiredItemsDialog dialog = CASRequiredItemsDialog.sDialog; if (dialog != null) { dialog.OnRandomizeNameClick(sender, eventArgs); } } catch (Exception e) { Common.Exception("OnRandomizeNameClick", e); } }
public static void OnCloseClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { CASPuck ths = CASPuck.gSingleton; if (ths == null) { return; } //Common.DebugNotify(delegate { return "UiBusy: " + ths.mUiBusy + Common.NewLine + "LeaveCAS: " + ths.mLeaveCAS; }); //if (!ths.UiBusy && !ths.mLeaveCAS) { ths.UiBusy = true; Simulator.AddObject(new Sims3.UI.OneShotFunctionTask(delegate { string entryKey = (Responder.Instance.CASModel.CASMode == CASMode.Full) ? "Ui/Caption/CAS/ExitDialog:Prompt" : "Ui/Caption/CAS/ExitDialog:AlternatePrompt"; if (TwoButtonDialog.Show(Common.LocalizeEAString(entryKey), Common.LocalizeEAString("Ui/Caption/Global:Yes"), Common.LocalizeEAString("Ui/Caption/Global:No"))) { CASController singleton = CASController.Singleton; singleton.AllowCameraMovement(false); ICASModel cASModel = Responder.Instance.CASModel; while (cASModel.IsProcessing()) { SpeedTrap.Sleep(); } Sims.CASBase.sWasCanceled = true; sender.Enabled = false; cASModel.RequestClearChangeReport(); singleton.SetCurrentState(CASState.None); } else { ths.UiBusy = false; } })); eventArgs.Handled = true; } } catch (Exception e) { Common.Exception("OnCloseClick", e); } }
public static void OnChangeTypeClick(WindowBase w, UIButtonClickEventArgs eventArgs) { try { EditTownInfoPanel ths = EditTownInfoPanel.Instance; if (ths.mInfo != null) { EditTownControllerEx.ChangeLotType(ths.mInfo); } } catch (Exception e) { Common.Exception("OnChangeTypeClick", e); } }
private void OnLotTypeClickEx(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { eventArgs.Handled = true; PopulateComboBox(sender.ID == 2, bIsHouseboatLot); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception("OnLotTypeClick", e); } }
private void OnLotTypeClickEx(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { eventArgs.Handled = true; PopulateComboBox(sender.ID == 2, bIsHouseboatLot); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception("OnLotTypeClick", e); } }
private static void OnNavButtonClicked(WindowBase sender, UIButtonClickEventArgs args) { try { CASTattoo ths = CASTattoo.gSingleton; if (!ths.AdvancedMode) { Simulator.AddObject(new OneShotFunctionTask(OnNavButtonClickedHelper)); } args.Handled = true; } catch (Exception e) { Common.Exception("OnNavButtonClicked", e); } }
public static void OnCloseClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { CASPuck ths = CASPuck.gSingleton; if (ths == null) return; //Common.DebugNotify(delegate { return "UiBusy: " + ths.mUiBusy + Common.NewLine + "LeaveCAS: " + ths.mLeaveCAS; }); //if (!ths.UiBusy && !ths.mLeaveCAS) { ths.UiBusy = true; Simulator.AddObject(new Sims3.UI.OneShotFunctionTask(delegate { string entryKey = (Responder.Instance.CASModel.CASMode == CASMode.Full) ? "Ui/Caption/CAS/ExitDialog:Prompt" : "Ui/Caption/CAS/ExitDialog:AlternatePrompt"; if (TwoButtonDialog.Show(Common.LocalizeEAString(entryKey), Common.LocalizeEAString("Ui/Caption/Global:Yes"), Common.LocalizeEAString("Ui/Caption/Global:No"))) { CASController singleton = CASController.Singleton; singleton.AllowCameraMovement(false); ICASModel cASModel = Responder.Instance.CASModel; while (cASModel.IsProcessing()) { SpeedTrap.Sleep(); } Sims.CASBase.sWasCanceled = true; sender.Enabled = false; cASModel.RequestClearChangeReport(); singleton.SetCurrentState(CASState.None); } else { ths.UiBusy = false; } })); eventArgs.Handled = true; } } catch (Exception e) { Common.Exception("OnCloseClick", e); } }
private static void OnReturnToLive(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { EditTownPuck ths = EditTownPuck.Instance; eventArgs.Handled = true; if (!ths.mExitingGameEntry) { ths.mExitingGameEntry = true; Common.FunctionTask.Perform(ReturnToLive); } } catch (Exception e) { Common.Exception("OnReturnToLive", e); } }
public static void OnMergeClick(WindowBase w, UIButtonClickEventArgs eventArgs) { try { EditTownInfoPanel ths = EditTownInfoPanel.Instance; if (!(EditTownMergeTool.sInstance is EditTownMergeToolEx)) { EditTownMergeTool.sInstance = new EditTownMergeToolEx(); } EditTownMergeTool.Instance.SetHouseholdToMergeFrom(ths.mInfo); EditTownTool.CurrentTool = EditTownMergeTool.Instance; } catch (Exception e) { Common.Exception("OnMergeClick", e); } }
private void OnFilterClickEx(WindowBase sender, UIButtonClickEventArgs eventArgs) { mFilterLabel.Caption = sender.TooltipText; switch (sender.ID) { case 0x5ef6bd6: mFilter = FilterType.kAll; break; case 0x5ef6bd7: mFilter = FilterType.kFriends; break; case 0x5ef6bd8: mFilter = FilterType.kCoworkers; break; } RepopulateSourceTableEx(); eventArgs.Handled = true; }
private void OnArrowClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { if (sender.ID == 99576788u) { TableRow row = this.mSelectedTable.GetRow(this.mSelectedTable.SelectedItem); DualPanelHouseholds.DualPaneSimPickerRowController dualPaneSimPickerRowController = row.RowController as DualPanelHouseholds.DualPaneSimPickerRowController; ObjectPicker.RowInfo info = dualPaneSimPickerRowController.Info; this.mSelectedSims.Remove(info); } else { TableRow row2 = this.mSourceTable.GetRow(this.mSourceTable.SelectedItem); DualPanelHouseholds.DualPaneSimPickerRowController dualPaneSimPickerRowController2 = row2.RowController as DualPanelHouseholds.DualPaneSimPickerRowController; ObjectPicker.RowInfo info2 = dualPaneSimPickerRowController2.Info; this.mSelectedSims.Add(info2); } this.mLeftArrow.Enabled = false; this.mRightArrow.Enabled = false; this.RepopulateSourceTable(); this.RepopulateSelectedSimTable(); }
public static void OnPlaceClick(WindowBase w, UIButtonClickEventArgs eventArgs) { try { EditTownInfoPanel ths = EditTownInfoPanel.Instance; if (ths.mInfo != null) { if (!(EditTownPlaceTool.sInstance is EditTownPlaceToolEx)) { EditTownPlaceTool.sInstance = new EditTownPlaceToolEx(); } UIBinInfo mInfo = ths.mInfo; InfoSource mSource = ths.mSource; EditTownPlaceTool.Instance.SetItemToPlace(ths.mInfo, ths.mSource); ths.mTriggerSound = false; try { EditTownTool.CurrentTool = EditTownPlaceTool.Instance; ths.mModel.SetCurrentSelection(mInfo, mSource); } finally { ths.mTriggerSound = true; } if (ths.Visible) { Audio.StartSound("ui_softwindow_close"); } ths.Visible = false; } } catch (Exception e) { Common.Exception("OnPlaceClick", e); } }
public static void OnCreateSimClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { CASPuck ths = CASPuck.gSingleton; Sims3.UI.Function f = null; if (ths.mAttemptingToAdd) { if (f == null) { f = delegate { while (ths.mAttemptingToAdd) { SpeedTrap.Sleep(); } // Custom CallCreateSimCallback((CASPuck.ControlIDs)sender.ID); }; } Simulator.AddObject(new Sims3.UI.OneShotFunctionTask(f)); } else { // Custom CallCreateSimCallback((CASPuck.ControlIDs)sender.ID); } ths.HideEditPopupMenu(); ths.HideAddPopupMenu(); eventArgs.Handled = true; } catch (Exception e) { Common.Exception("OnCreateSimClick", e); } }
public static void OnMenuButtonClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { PlayFlowMenuPanel playFlow = PlayFlowMenuPanel.gSingleton; if (sender == playFlow.mCASButton) { (playFlow.Model as PlayFlowModel).mSelectedBinContentId = ulong.MaxValue; Sims.Advanced.EditInCAS.Perform((SimDescription)null, OnGetMode); } else { playFlow.OnMenuButtonClick(sender, eventArgs); } } catch (Exception e) { Common.Exception("OnMenuButtonClick", e); } }
public static void OnMenuButtonClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { PlayFlowMenuPanel playFlow = PlayFlowMenuPanel.gSingleton; if (sender == playFlow.mCASButton) { (playFlow.Model as PlayFlowModel).mSelectedBinContentId = ulong.MaxValue; Sims.Advanced.EditInCAS.Perform((SimDescription)null, OnGetMode); } else { playFlow.OnMenuButtonClick(sender, eventArgs); } } catch (Exception e) { Common.Exception("OnMenuButtonClick", e); } }
private static void OnCancelClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { CASTattoo ths = CASTattoo.gSingleton; bool flag = ths.mUndoRedoQueueIndex > 0x1; AdvancedMode = false; if (flag) { Responder.Instance.CASModel.RequestUndo(); } else { ths.PopulateTattooGrid(false, ths.mWasCustom); } eventArgs.Handled = true; } catch (Exception e) { Common.Exception("OnCancelClick", e); } }
public static void OnCreateSimClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { CASPuck ths = CASPuck.gSingleton; Sims3.UI.Function f = null; if (ths.mAttemptingToAdd) { if (f == null) { f = delegate { while (ths.mAttemptingToAdd) { SpeedTrap.Sleep(); } // Custom CallCreateSimCallback((CASPuck.ControlIDs)sender.ID); }; } Simulator.AddObject(new Sims3.UI.OneShotFunctionTask(f)); } else { // Custom CallCreateSimCallback((CASPuck.ControlIDs)sender.ID); } ths.HideEditPopupMenu(); ths.HideAddPopupMenu(); eventArgs.Handled = true; } catch (Exception e) { Common.Exception("OnCreateSimClick", e); } }
public static void OnAcceptSim(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { CASPuck ths = CASPuck.Instance; if (!ths.UiBusy) { ths.UiBusy = true; CASExitLoadScreen.DisableQuit = true; // Custom if (CASLogic.Instance.OutfitCategory == OutfitCategories.Career) { CASLogic.Instance.OutfitCategory = OutfitCategories.Everyday; SpeedTrap.Sleep(); } if (Responder.Instance.CASModel.CASMode == CASMode.CreateABot) { Function f = delegate { CASController.Singleton.SetCurrentState(CASState.BotSummary); if (ths.ShowCABRequiredItemsDialogTask()) { // Custom AcceptSimCallback(ths); } else { ths.UiBusy = false; } }; Simulator.AddObject(new OneShotFunctionTask(f)); } else { // Custom AcceptSimCallback(ths); } } eventArgs.Handled = true; } catch (Exception exception) { Common.Exception("OnAcceptHousehold", exception); } }
public static void OnAcceptHousehold(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { CASPuck ths = CASPuck.Instance; if (!ths.UiBusy && !ths.mAttemptingToAddSim) { Sims.CASBase.StoreChanges(); ths.UiBusy = true; Common.FunctionTask.Perform(delegate { if (Responder.Instance.CASModel.Species == CASAgeGenderFlags.Human) { CASController.Singleton.SetCurrentState(CASState.Summary); } else { CASController.Singleton.SetCurrentState(CASState.PetSummary); } if (ShowRequiredItemsDialogTask(ths)) { ths.AcceptHouseholdCallback(); } else { ths.UiBusy = false; } /* // Custom if (ShowRequiredItemsDialogTask(ths)) { AcceptHouseholdCallback(ths); } else { ths.UiBusy = false; } */ }); } eventArgs.Handled = true; } catch (Exception exception) { Common.Exception("OnAcceptHousehold", exception); } }
private void OnArrowClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { if (sender.ID == 99576788u) { TableRow row = this.mSelectedTable.GetRow(this.mSelectedTable.SelectedItem); DualPanelShopping.DualPaneSimPickerRowController dualPaneSimPickerRowController = row.RowController as DualPanelShopping.DualPaneSimPickerRowController; ObjectPicker.RowInfo info = dualPaneSimPickerRowController.Info; this.mSelectedSims.Remove(info); } else { TableRow row2 = this.mSourceTable.GetRow(this.mSourceTable.SelectedItem); DualPanelShopping.DualPaneSimPickerRowController dualPaneSimPickerRowController2 = row2.RowController as DualPanelShopping.DualPaneSimPickerRowController; ObjectPicker.RowInfo info2 = dualPaneSimPickerRowController2.Info; this.mSelectedSims.Add(info2); } this.mLeftArrow.Enabled = false; this.mRightArrow.Enabled = false; this.RepopulateSourceTable(); this.RepopulateSelectedSimTable(); }
private void OnOkayButtonClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { eventArgs.Handled = true; EndDialog(OkayID); }
private void OnCloseButtonClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { this.mResult = null; eventArgs.Handled = true; this.EndDialog(0u); }
public static void OnSplitClick(WindowBase w, UIButtonClickEventArgs eventArgs) { try { GameEntryMovingModelEx.SplitHousehold(EditTownController.Instance, EditTownInfoPanel.sInstance.mInfo); } catch (Exception e) { Common.Exception("OnSplitClick", e); } }
private static void OnReturnToLive(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { EditTownPuck ths = EditTownPuck.Instance; eventArgs.Handled = true; if (!ths.mExitingGameEntry) { ths.mExitingGameEntry = true; Common.FunctionTask.Perform(ReturnToLive); } } catch (Exception e) { Common.Exception("OnReturnToLive", e); } }
public static void OnChangeTypeClick(WindowBase w, UIButtonClickEventArgs eventArgs) { try { EditTownInfoPanel ths = EditTownInfoPanel.Instance; if (ths.mInfo != null) { EditTownControllerEx.ChangeLotType(ths.mInfo); } } catch (Exception e) { Common.Exception("OnChangeTypeClick", e); } }
private void OnCloseButtonClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { eventArgs.Handled = true; EndDialog(CancelID); }
public static void OnMergeClick(WindowBase w, UIButtonClickEventArgs eventArgs) { try { EditTownInfoPanel ths = EditTownInfoPanel.Instance; if (!(EditTownMergeTool.sInstance is EditTownMergeToolEx)) { EditTownMergeTool.sInstance = new EditTownMergeToolEx(); } EditTownMergeTool.Instance.SetHouseholdToMergeFrom(ths.mInfo); EditTownTool.CurrentTool = EditTownMergeTool.Instance; } catch (Exception e) { Common.Exception("OnMergeClick", e); } }
private void OnOkayButtonClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { this.mResult = this.mSelectedSims; eventArgs.Handled = true; this.EndDialog(0u); }
private void OnGoHome(WindowBase sender, UIButtonClickEventArgs eventArgs) { try { Sim sim = (Skewer.Instance.mHudModel as Sims3.Gameplay.UI.HudModel).mSavedCurrentSim; bool success = false; if (PortraitPanel.Settings.mGoHomeTeleport) { if ((PortraitPanel.Settings.mGoHomeTeleportForAll) || (sim.SimDescription.IsVampire)) { TerrainInteraction instance = new Terrain.TeleportMeHere.Definition(false).CreateInstance(Terrain.Singleton, sim, new InteractionPriority(InteractionPriorityLevel.UserDirected), false, true) as TerrainInteraction; Mailbox mailboxOnHomeLot = Mailbox.GetMailboxOnHomeLot(sim); if (mailboxOnHomeLot != null) { Vector3 vector2; World.FindGoodLocationParams fglParams = new World.FindGoodLocationParams(mailboxOnHomeLot.Position); fglParams.BooleanConstraints |= FindGoodLocationBooleans.StayInRoom; fglParams.InitialSearchDirection = RandomUtil.GetInt(0x0, 0x7); if (GlobalFunctions.FindGoodLocation(sim, fglParams, out instance.Destination, out vector2)) { success = sim.InteractionQueue.Add(instance); } } } if (!success) { Phone phone = sim.Inventory.Find<Phone>(); if (phone != null) { success = sim.InteractionQueue.Add(Phone.TeleportHome.Singleton.CreateInstance(phone, sim, new InteractionPriority(InteractionPriorityLevel.UserDirected), false, true)); } } } if (!success) { if ((sim.LotHome == sim.LotCurrent) && (!sim.IsInPublicResidentialRoom) && (sim.InteractionQueue.Count > 0) && (Common.AssemblyCheck.IsInstalled("NRaasGoHere"))) { sim.InteractionQueue.Add(GoHome.Singleton.CreateInstance(sim.LotHome, sim, new InteractionPriority(InteractionPriorityLevel.UserDirected), false, true)); } else { Skewer.Instance.mHudModel.PushGoHome(); } } } catch (Exception exception) { Common.Exception("OnGoHome", exception); } }
private static void OnAcceptButtonClick(WindowBase sender, UIButtonClickEventArgs args) { try { CASGenetics ths = CASGenetics.gSingleton; if (ths == null) return; if (!ths.mHourglassVisible) { args.Handled = true; if (ths.mSelectedOffspring != null) { if (CASPuck.Instance != null) { ths.mReturnState = ths.mSelectedOffspring.IsPet ? CASState.PetSummary : CASState.Summary; CASPuck.Instance.AttemptingToAdd = true; CASPuck.ShowInputBlocker(); Responder.Instance.CASModel.RequestLoadSim(ths.mSelectedOffspring, false); Responder.Instance.CASModel.RequestAddSimToHousehold(false); Responder.Instance.CASModel.RequestClearStack(); CASController.Singleton.SetCurrentState(ths.mReturnState); } else { FacialBlends.CopyGenetics(ths.mSelectedOffspring as SimDescription, sChoice, false, false); new SavedOutfit.Cache(sChoice).PropagateGenetics(sChoice, CASParts.sPrimary); SimOutfit currentOutfit = sChoice.CreatedSim.CurrentOutfit; if (currentOutfit != null) { ThumbnailManager.GenerateHouseholdSimThumbnail(currentOutfit.Key, currentOutfit.Key.InstanceId, 0x0, ThumbnailSizeMask.Large | ThumbnailSizeMask.ExtraLarge | ThumbnailSizeMask.Medium | ThumbnailSizeMask.Small, ThumbnailTechnique.Default, true, false, sChoice.AgeGenderSpecies); } DestroyHousehold(); CASGenetics.Unload(); } } } } catch (Exception e) { Common.Exception("OnAcceptButtonClick", e); } }
public void OnCloseButtonClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { eventArgs.Handled = true; base.EndDialog(base.CancelID); }
public static void OnPlaceClick(WindowBase w, UIButtonClickEventArgs eventArgs) { try { EditTownInfoPanel ths = EditTownInfoPanel.Instance; if (ths.mInfo != null) { if (!(EditTownPlaceTool.sInstance is EditTownPlaceToolEx)) { EditTownPlaceTool.sInstance = new EditTownPlaceToolEx(); } UIBinInfo mInfo = ths.mInfo; InfoSource mSource = ths.mSource; EditTownPlaceTool.Instance.SetItemToPlace(ths.mInfo, ths.mSource); ths.mTriggerSound = false; try { EditTownTool.CurrentTool = EditTownPlaceTool.Instance; ths.mModel.SetCurrentSelection(mInfo, mSource); } finally { ths.mTriggerSound = true; } if (ths.Visible) { Audio.StartSound("ui_softwindow_close"); } ths.Visible = false; } } catch (Exception e) { Common.Exception("OnPlaceClick", e); } }
private static void OnCancelButtonClick(WindowBase sender, UIButtonClickEventArgs args) { try { CASGenetics ths = CASGenetics.gSingleton; if (ths == null) return; if (!ths.mHourglassVisible) { args.Handled = true; if (CASPuck.Instance != null) { ths.mReturnState = Responder.Instance.CASModel.CurrentSimDescription.IsPet ? CASState.PetSummary : CASState.Summary; if (ths.mSelectedOffspring == null) { CASController.Singleton.SetCurrentState(ths.mReturnState); } else { int currentPreviewSim = CASPuck.gSingleton.CurrentPreviewSim; if (currentPreviewSim != -1) { ths.mCancelingSim = true; Responder.Instance.CASModel.RequestSetPreviewSim(currentPreviewSim); } else { CASController.Singleton.SetCurrentState(ths.mReturnState); } } } else { DestroyHousehold(); CASGenetics.Unload(); } } } catch (Exception e) { Common.Exception("OnCancelButtonClick", e); } }
private void OnFilterClickEx(WindowBase sender, UIButtonClickEventArgs eventArgs) { mFilterLabel.Caption = sender.TooltipText; switch (sender.ID) { case 0x5ef6bd6: mFilter = FilterType.kAll; break; case 0x5ef6bd7: mFilter = FilterType.kFriends; break; case 0x5ef6bd8: mFilter = FilterType.kCoworkers; break; } RepopulateSourceTableEx(); eventArgs.Handled = true; }
public static void OnClickTimeAlmanac(WindowBase sender, UIButtonClickEventArgs eventArgs) { Simulator.AddObject(new Sims3.UI.OneShotFunctionTask(new Sims3.UI.Function(FutureDescendantServiceEx.ShowTimeAlmanacDialog))); eventArgs.Handled = true; }
private void OnArrowClickEx(WindowBase sender, UIButtonClickEventArgs eventArgs) { if (sender.ID == 0x5ef6bd4) { PartyPickerRowController rowController = mInviteesTable.GetRow(mInviteesTable.SelectedItem).RowController as PartyPickerRowController; PhoneSimPicker.SimPickerInfo item = rowController.Info; mInvitees.Remove(item); mSims.Add(item); } else { PartyPickerRowController controller2 = mSourceTable.GetRow(mSourceTable.SelectedItem).RowController as PartyPickerRowController; PhoneSimPicker.SimPickerInfo info = controller2.Info; mSims.Remove(info); mInvitees.Add(info); } UpdateSourceAvailability(); mLeftArrow.Enabled = false; mRightArrow.Enabled = false; RepopulateSourceTableEx(); RepopulateTargetTableEx(); ValidateParty(); }
public void OnOkayButtonClick(WindowBase sender, UIButtonClickEventArgs eventArgs) { eventArgs.Handled = true; base.EndDialog(base.OkayID); }
private void OnNavButtonClicked(WindowBase sender, UIButtonClickEventArgs args) { Simulator.AddObject(new OneShotFunctionTask(new Function(this.OnNavButtonClickedHelper))); args.Handled = true; }