コード例 #1
0
        private void ColorItemSelected(object sender, EventArgs e)
        {
            EnsureAvatarConfigController();
            AvatarPartConfigurationController selectedPartController = GetSelectedController();

            selectedPartController.ColorIndex = colorSelector.SelectedIndex;
            selectedPartController.ApplyConfiguration();

            PlayerPropertyUtilities.SetProperty(
                avatarConfigurationController.AvatarPartControllers[categoryToggles.CurrentIndex].Name + "Color",
                (byte)colorSelector.SelectedIndex);
        }
コード例 #2
0
        private void MaterialItemSelected(object sender, EventArgs e)
        {
            EnsureAvatarConfigController();
            AvatarPartConfigurationController selectedPartController = GetSelectedController();

            selectedPartController.MaterialIndex = materialSelector.SelectedIndex;
            selectedPartController.ApplyConfiguration();

            PlayerPropertyUtilities.SetProperty(
                avatarConfigurationController.AvatarPartControllers[categoryToggles.CurrentIndex].Name + "Material",
                (byte)materialSelector.SelectedIndex);

            UpdateColorChooser(selectedPartController);
        }
コード例 #3
0
        private void ModelItemSelected(object sender, EventArgs e)
        {
            EnsureAvatarConfigController();
            AvatarPartConfigurationController selectedPartController = GetSelectedController();

            selectedPartController.ModelIndex = modelSelector.SelectedIndex;
            selectedPartController.ApplyConfiguration();

            PlayerPropertyUtilities.SetProperty(
                avatarConfigurationController.AvatarPartControllers[categoryToggles.CurrentIndex].Name + AvatarAppearanceSynchronizer.modelKeySuffix,
                (byte)selectedPartController.ModelIndex);
            PlayerPropertyUtilities.SetProperty(
                avatarConfigurationController.AvatarPartControllers[categoryToggles.CurrentIndex].Name + AvatarAppearanceSynchronizer.materialKeySuffix,
                (byte)selectedPartController.MaterialIndex);
            PlayerPropertyUtilities.SetProperty(
                avatarConfigurationController.AvatarPartControllers[categoryToggles.CurrentIndex].Name + AvatarAppearanceSynchronizer.colorKeySuffix,
                (byte)selectedPartController.ColorIndex);


            UpdateMaterialChooser(selectedPartController);
        }