예제 #1
0
    private void CreateSelectPanel(CMD_Mission.MissionType newFocus)
    {
        if (this.missionStateData_BAK != null)
        {
            this.missionStateData_BAK.nowSelectLoc = this.missionList.SelectLoc;
        }
        CMD_Mission.nowFocusType = newFocus;
        CMD_Mission.MissionStateData missionStateDataByType = this.GetMissionStateDataByType(CMD_Mission.nowFocusType);
        this.missionList.SelectLoc = missionStateDataByType.nowSelectLoc;
        this.missionStateData_BAK  = missionStateDataByType;
        GameWebAPI.RespDataMS_MissionInfoLogic.Result.Mission[] missionData = this.GetMissionData(CMD_Mission.nowFocusType);
        this.missionList.gameObject.SetActive(true);
        this.missionListOriginalItem.gameObject.SetActive(true);
        this.missionList.StartFadeEfcCT = 0;
        bool isFirst = missionStateDataByType.isFirst;

        if (!this.isRebuildRecycle)
        {
            this.missionList.AllBuild(missionData.Length, isFirst, 1f, 1f, null, this, true);
            this.isRebuildRecycle = true;
        }
        else
        {
            GUISelectPanelViewPartsUD guiselectPanelViewPartsUD = this.missionList;
            int  partsCount           = missionData.Length;
            int  horizontalPartsCount = 1;
            bool initLoc = isFirst;
            guiselectPanelViewPartsUD.RefreshList(partsCount, horizontalPartsCount, null, initLoc);
            this.missionListOriginalItem.gameObject.SetActive(false);
            this.missionList.FadeOutAllListParts(null, true);
            this.missionList.FadeInAllListParts(null);
        }
        missionStateDataByType.isFirst = false;
    }
예제 #2
0
    public CMD GetInstanceCMD()
    {
        GUISelectPanelViewPartsUD guiselectPanelViewPartsUD = (GUISelectPanelViewPartsUD)this.parent;

        if (guiselectPanelViewPartsUD != null)
        {
            CMD instanceCMD = guiselectPanelViewPartsUD.InstanceCMD;
            if (instanceCMD == null)
            {
                global::Debug.LogError("========================================== ベース class GUISelectPanelViewPartsUD.AllBuild() で、instCMD : this を指定してください!");
            }
            return(instanceCMD);
        }
        global::Debug.LogError("========================================== ベース class GUISelectPanelViewPartsUD を使っていないのであれば GetInstanceCMD() は使わないでください!");
        return(null);
    }
    public void InitializeView(int recycleSectorNum)
    {
        this.cmdRecycleView = base.gameObject.GetComponent <GUISelectPanelViewPartsUD>();
        this.cmdRecycleView.touchBehavior        = GUICollider.TouchBehavior.None;
        this.cmdRecycleView.dontAddToDialogEvent = true;
        this.cmdRecycleView.selectParts          = this.listParts.gameObject;
        BoxCollider component          = base.gameObject.GetComponent <BoxCollider>();
        float       x                  = component.size.x * -0.5f;
        float       y                  = component.size.y * -0.5f;
        float       x2                 = component.size.x;
        float       y2                 = component.size.y;
        Rect        listWindowViewRect = new Rect(x, y, x2, y2);

        if (this.adjustBorder)
        {
            listWindowViewRect.yMin -= GUIMain.VerticalSpaceSize;
            listWindowViewRect.yMax += GUIMain.VerticalSpaceSize;
        }
        this.cmdRecycleView.ListWindowViewRect = listWindowViewRect;
        this.cmdRecycleView.verticalBorder     = this.verticalBorder;
        this.cmdRecycleView.verticalMargin     = this.verticalMargin;
        this.cmdRecycleView.horizontalMargin   = this.horizontalMargin;
        Vector3 vector = base.transform.localPosition;

        vector.x = this.listOffsetX;
        base.transform.localPosition = vector;
        vector           = component.center;
        vector.y         = this.listOffsetY;
        component.center = vector;
        this.cmdRecycleView.ScrollBarPosX   = this.scrollPosAdjX;
        this.cmdRecycleView.ScrollBarBGPosX = this.scrollPosAdjX;
        this.cmdRecycleView.SetScrollBarParam(this.scrollBarSlider, this.scrollBarBackground);
        float num        = component.size.y * 0.5f + this.listParts.GetPartsSize().y;
        float viewBottom = num * -1f;

        this.cmdRecycleView.SetRecycleViewParam(num, viewBottom, this.horizontalPartsNum, recycleSectorNum);
    }