예제 #1
0
        private void InitGUI()
        {
            //Coordinate Select
            ChaFileDefine.CoordinateType[] coordinateList = new ChaFileDefine.CoordinateType[]
            {
                ChaFileDefine.CoordinateType.School01,
                ChaFileDefine.CoordinateType.School02,
                ChaFileDefine.CoordinateType.Gym,
                ChaFileDefine.CoordinateType.Swim,
                ChaFileDefine.CoordinateType.Club,
                ChaFileDefine.CoordinateType.Plain,
                ChaFileDefine.CoordinateType.Pajamas,
            };
            List <string> coordinateStringList = new List <string>();

            for (int i = 0; i < coordinateList.Count(); i++)
            {
                coordinateStringList.Add(coordinateList[i].ToString());
            }
            coordinateSelect = new CoordinateSelect(coordinateStringList.ToArray(), coordinateList, "");

            //Preset select
            presetSelectBust = new PresetSelect(PluginPath.presetDirBust, "Load Bust preset", 0, 20);
            presetSelectHip  = new PresetSelect(PluginPath.presetDirHip, "Load Hip preset", 0, 20);

            //Save dialog
            s_dialog = new DialogSavePreset(_parent, _s_dialogID, "Save preset", SDRect);

            //message box
            msgBox = new MessageBox(WindowID.GetNewID());
        }
예제 #2
0
        private bool OnPresetSelected(PresetSelect presetSelect)
        {
            ParamCharaController controller = _parent.GetSelectedController();

            ChaFileDefine.CoordinateType    coordinate = _parent.GetSelectedCoordinate();
            ParamCharaController.ParamsKind kind       = _parent.GetSelectedParamsKind();
            string xmlPath = presetSelect.GetSelectedFilePath();

            switch (_parent.GetSelectedParamsKind())
            {
            case ParamCharaController.ParamsKind.Naked:
                if (!XMLPresetIO.LoadXMLBust(controller.paramCustom.paramBustNaked, xmlPath))
                {
                    return(false);
                }
                break;

            case ParamCharaController.ParamsKind.Bra:
                if (!XMLPresetIO.LoadXMLBust(controller.paramCustom.paramBust[coordinate][kind], xmlPath))
                {
                    return(false);
                }
                break;

            case ParamCharaController.ParamsKind.Tops:
                if (!XMLPresetIO.LoadXMLBust(controller.paramCustom.paramBust[coordinate][kind], xmlPath))
                {
                    return(false);
                }
                break;

            case ParamCharaController.ParamsKind.Hip:
                if (!XMLPresetIO.LoadXMLHip(controller.paramCustom.paramHip, xmlPath))
                {
                    return(false);
                }
                break;

            default:
                break;
            }
            controller.changedInfo.SetInfo(coordinate, kind, false, true, false);
            return(true);
        }