Exemple #1
0
        private static void SetHairTypeCategory(CASHair ths, CASHair.HairType cat)
        {
            try
            {
                ths.mHairType = cat;
                CASPart wornPart = ths.GetWornPart();
                ths.mHatsCustomWindow.Visible = ths.mHairType == CASHair.HairType.Hat;
                CASPhysical.gSingleton.SetLongPanel(ths.mHairType == CASHair.HairType.Hair);
                if (ths.mHairType == CASHair.HairType.Hat)
                {
                    ths.mHairColorPanel.Position = new Vector2(ths.mHairColorPanel.Position.x, 421f);
                    CASPhysical.gSingleton.SetShortPanelHeight(ths.mHatsCustomWindow.Area.Height);
                }
                else
                {
                    ths.mHairColorPanel.Position = new Vector2(ths.mHairColorPanel.Position.x, 395f);
                }

                ths.mDesignButton.Enabled = CASHair.PartIsHat(wornPart);
                LoadParts(ths);
                PopulateTypesGrid(ths);
                if (ths.mHairType == CASHair.HairType.Hair)
                {
                    ths.ReselectCurrentHairPresetItem();
                }
            }
            catch (Exception e)
            {
                Common.Exception("SetHairTypeCategory", e);
            }
        }
Exemple #2
0
        private static void SetHairTypeCategory(CASHair ths, CASHair.HairType cat)
        {
            try
            {
                ths.mHairType = cat;
                CASPart wornPart = ths.GetWornPart();
                ths.mHatsCustomWindow.Visible = ths.mHairType == CASHair.HairType.Hat;
                CASPhysical.gSingleton.SetLongPanel(ths.mHairType == CASHair.HairType.Hair);
                if (ths.mHairType == CASHair.HairType.Hat)
                {
                    ths.mHairColorPanel.Position = new Vector2(ths.mHairColorPanel.Position.x, 421f);
                    CASPhysical.gSingleton.SetShortPanelHeight(ths.mHatsCustomWindow.Area.Height);
                }
                else
                {
                    ths.mHairColorPanel.Position = new Vector2(ths.mHairColorPanel.Position.x, 395f);
                }

                ths.mDesignButton.Enabled = CASHair.PartIsHat(wornPart);
                LoadParts(ths);
                PopulateTypesGrid(ths);
                if (ths.mHairType == CASHair.HairType.Hair)
                {
                    ths.ReselectCurrentHairPresetItem();
                }
            }
            catch (Exception e)
            {
                Common.Exception("SetHairTypeCategory", e);
            }
        }