Example #1
0
    /// <summary>
    /// 创建多选
    /// </summary>
    /// <param name="title"></param>
    /// <param name="listSelectData"></param>
    /// <param name="callBack"></param>
    /// <returns></returns>
    public UIListItemGameSettingSelect CreateItemForSelect(string title, List <string> listSelectData, Action <int> callBack)
    {
        GameObject objItem = LoadItem("ListItemGameSettingSelect");
        UIListItemGameSettingSelect selectItem = objItem.GetComponent <UIListItemGameSettingSelect>();

        selectItem.SetData(title, listSelectData, callBack);
        return(selectItem);
    }
Example #2
0
    public override void Open()
    {
        base.Open();

        //ÓïÑÔÑ¡Ôñ
        settingSelectLanguage = CreateItemForSelect(TextHandler.Instance.GetTextById(101), listLanguageData, HandleForSelectLanguage);
        settingSelectLanguage.SetIndex((int)gameConfig.GetLanguage());

        //¼ÓÔØ·¶Î§¡¤
        worldRefreshRange = CreateItemForRange(TextHandler.Instance.GetTextById(116), HandleForWorldRefreshRange);
        worldRefreshRange.SetMinMax(3, 16);
        isInitWorldRefreshRange = true;
        worldRefreshRange.SetPro(gameConfig.worldRefreshRange);

        //жÔØ·¶Î§
        worldDestoryRange = CreateItemForRange(TextHandler.Instance.GetTextById(117), HandleForWorldDestoryRange);
        worldDestoryRange.SetMinMax(3, 10);
        isInitWorldDestoryRange = true;
        worldDestoryRange.SetPro(gameConfig.worldDestoryRange);
    }
Example #3
0
    public override void Open()
    {
        base.Open();

        listAntiAliasingQualityLevelData = new List <string>()
        {
            TextHandler.Instance.GetTextById(10011),
            TextHandler.Instance.GetTextById(10012),
            TextHandler.Instance.GetTextById(10013)
        };

        listShadowResolutionLevelData = new List <string>()
        {
            TextHandler.Instance.GetTextById(10011),
            TextHandler.Instance.GetTextById(10012),
            TextHandler.Instance.GetTextById(10013),
            TextHandler.Instance.GetTextById(10014)
        };

        //是否全屏
        settingFullScreen = CreateItemForRB(TextHandler.Instance.GetTextById(102), HandleForFullScreen);
        settingFullScreen.SetState(gameConfig.window == 1 ? true : false);

        //屏幕分辨率
        settingScreenResolutionSelect = CreateItemForSelect(TextHandler.Instance.GetTextById(111), listScreenResolutionData, HandleForScreenResolution);
        int indexScreenResolutionSelect = GetScreenResolutionIndex(gameConfig.screenResolution);

        settingScreenResolutionSelect.SetIndex(indexScreenResolutionSelect);

        //显示帧数
        settingFrameShow = CreateItemForRB(TextHandler.Instance.GetTextById(110), HandleForFrameShow);
        settingFrameShow.SetState(gameConfig.framesShow);

        //锁定帧数
        settingLockFrame = CreateItemForRB(TextHandler.Instance.GetTextById(103), HandleForLockFrame);
        settingLockFrame.SetState(gameConfig.stateForFrames == 1 ? true : false);

        //帧数
        settingFrame = CreateItemForRange(TextHandler.Instance.GetTextById(104), HandleForFrame);
        settingFrame.SetPro((gameConfig.frames - 20) / 100f);

        //UI大小
        settingUISize = CreateItemForSelect(TextHandler.Instance.GetTextById(113), listUISizeData, HandleForUISize);
        settingUISize.SetIndex(GetUISizeIndex(gameConfig.uiSize));

        //阴影质量等级
        settingShadowResolutionLevelData = CreateItemForSelect(TextHandler.Instance.GetTextById(112), listShadowResolutionLevelData, HandleForShadowResolutionLevel);
        settingShadowResolutionLevelData.SetIndex(gameConfig.shadowResolutionLevel);

        //阴影距离
        settingShadowDis = CreateItemForRange(TextHandler.Instance.GetTextById(105), HandleForShadowDis);
        settingShadowDis.SetPro(gameConfig.shadowDis / 200);

        //抗锯齿
        settingAntiAliasingSelect = CreateItemForSelect(TextHandler.Instance.GetTextById(108), listAntiAliasingData, HandleForAntiAliasing);
        settingAntiAliasingSelect.SetIndex((int)gameConfig.GetAntialiasingMode());

        //抗锯齿质量
        settingAntiAliasingQualityLevelSelect = CreateItemForSelect(TextHandler.Instance.GetTextById(109), listAntiAliasingQualityLevelData, HandleForAntiAliasingQualityLevel);
        settingAntiAliasingQualityLevelSelect.SetIndex(gameConfig.antialiasingQualityLevel);
    }