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); } }
public static void OnSimOutfitIndexChanged(int index) { try { CASDresserClothing ths = CASDresserClothing.gSingleton; if (ths == null) { return; } foreach (Button button in ths.mOutfitButtons) { button.Selected = false; } /* * ICASModel cASModel = Responder.Instance.CASModel; * if (ths.mDefaultText != null) * { * if ((index == 0x0) && (cASModel.OutfitCategory == OutfitCategories.Career)) * { * ths.mDefaultText.Visible = true; * } * else * { * ths.mDefaultText.Visible = false; * } * } */ // Custom if (index < ths.mOutfitButtons.Length) { ths.mOutfitButtons[index].Selected = true; } CASController.Singleton.Activate(true); ths.UpdateOutfitButtons(Responder.Instance.CASModel.OutfitCategory); ths.UpdateOutfitDeleteButtons(index); if (CASPuck.Instance != null) { CASPuck.Instance.OnDynamicUpdateCurrentSimThumbnail(); } } catch (Exception e) { Common.Exception("OnOutfitButtonMouseDown", e); } }
private static bool OnPerform(StackTrace trace, StackFrame frame) { if (sSemaphore) { return(true); } try { sSemaphore = true; //if (CASDresserSheet.gSingleton != null) return true; CASDresserClothing dresser = CASDresserClothing.gSingleton; if (dresser != null) { dresser.mDefaultText.Visible = false; } CASClothingCategory ths = CASClothingCategory.gSingleton; if (ths == null) { return(true); } if (ths.mCategoryText.Caption.Equals(ths.GetClothingStateName(CASClothingState.Career)) && (Responder.Instance.CASModel.OutfitIndex == 0x0)) { ths.mCurrentPreset = null; ths.mCurrentFocusedRow = null; ths.mTempFocusedRow = null; ths.mSelectedType = CASClothingRow.SelectedTypes.None; ths.mShareButton.Enabled = false; ths.mTrashButton.Enabled = false; ths.mSaveButton.Enabled = false; ths.mSortButton.Enabled = false; ths.mSortButton.Tag = false; ResourceKey layoutKey = ResourceKey.CreateUILayoutKey("CASClothingRow", 0x0); ths.mClothingTypesGrid.BeginPopulating(ths.AddGridItem, ths.mPartsList, 0x3, layoutKey, null); } return(true); } finally { sSemaphore = false; } }