コード例 #1
0
    private void PrintMapInfo(RegMap reg)
    {
        Color txtMainColor = GlobalVars.Instance.txtMainColor;

        LabelUtil.TextOut(crdDeveloperLabel, StringMgr.Instance.Get("DEVELOPER") + " : ", "MiniLabel", txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdDeveloperVal, reg.Developer, "MiniLabel", Color.white, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdMapAliasLabel, StringMgr.Instance.Get("MAP_NAME_IS") + " " + StringMgr.Instance.Get("MAP_VERSION") + " : ", "MiniLabel", txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdMapAliasVal, reg.Alias + reg.Version, "MiniLabel", Color.white, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdLastModifiedLabel, StringMgr.Instance.Get("LAST_MODIFIED_DATE"), "MiniLabel", txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdLastModifiedVal, DateTimeLocal.ToString(reg.RegisteredDate), "MiniLabel", Color.white, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdPlayCountLabel, StringMgr.Instance.Get("PLAY_COUNT") + " : ", "MiniLabel", txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdPlayCountVal, reg.DisLikes.ToString(), "MiniLabel", Color.white, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdDownloadCountLabel, StringMgr.Instance.Get("DOWNLOAD_COUNT") + " : ", "MiniLabel", txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdDownloadCountVal, reg.DownloadCount.ToString(), "MiniLabel", Color.white, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdDownloadFeeLabel, StringMgr.Instance.Get("DOWNLOAD_FEE") + " : ", "MiniLabel", txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdDownloadFeeVal, reg.DownloadFee.ToString(), "MiniLabel", Color.white, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        LabelUtil.TextOut(crdMapEvalLabel, StringMgr.Instance.Get("MAP_EVAL") + " : ", "MiniLabel", txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        TextureUtil.DrawTexture(crdStar, texStarGradeBg, ScaleMode.StretchToFill);
        LabelUtil.TextOut(crdGradeText, "[ " + reg.GetStarAvgString() + " ]", "MiniLabel", txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
        float num      = (float)reg.Likes / 100f;
        Rect  position = new Rect(crdStar.x, crdStar.y, crdStar.width * num, crdStar.height);

        GUI.BeginGroup(position);
        TextureUtil.DrawTexture(new Rect(0f, 0f, crdStar.width, crdStar.height), texStarGrade);
        GUI.EndGroup();
        LabelUtil.TextOut(crdSupportModeLabel, StringMgr.Instance.Get("SUPPORT_MODE") + " : ", "MiniLabel", txtMainColor, new Color(0f, 0f, 0f, 0f), TextAnchor.UpperLeft);
    }
コード例 #2
0
    private void PrintMapInfo(RegMap reg, Vector2 pos)
    {
        Texture2D image = (!(reg.Thumbnail == null)) ? reg.Thumbnail : nonAvailable;

        TextureUtil.DrawTexture(new Rect(pos.x + 5f, pos.y + 10f, crdThumbnail.x, crdThumbnail.y), image, ScaleMode.StretchToFill);
        Color txtMainColor = GlobalVars.Instance.txtMainColor;

        LabelUtil.TextOut(new Vector2(pos.x + 115f, pos.y - 3f), StringMgr.Instance.Get("DEVELOPER"), "MiniLabel", txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 120f, pos.y + 12f), reg.Developer, "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 115f, pos.y + 37f), StringMgr.Instance.Get("MAP_NAME_IS") + " " + StringMgr.Instance.Get("MAP_VERSION"), "MiniLabel", txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 120f, pos.y + 52f), reg.Alias + reg.Version, "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 115f, pos.y + 77f), StringMgr.Instance.Get("LAST_MODIFIED_DATE"), "MiniLabel", txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 120f, pos.y + 92f), DateTimeLocal.ToString(reg.RegisteredDate), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 280f, pos.y - 3f), StringMgr.Instance.Get("PLAY_COUNT"), "MiniLabel", txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 286f, pos.y + 12f), reg.DisLikes.ToString(), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 280f, pos.y + 37f), StringMgr.Instance.Get("DOWNLOAD_COUNT"), "MiniLabel", txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 286f, pos.y + 52f), reg.DownloadCount.ToString(), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        LabelUtil.TextOut(new Vector2(pos.x + 280f, pos.y + 77f), StringMgr.Instance.Get("MAP_EVAL"), "MiniLabel", txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        Rect position = new Rect(pos.x + 286f, pos.y + 95f, 74f, 14f);

        TextureUtil.DrawTexture(position, texStarGradeBg, ScaleMode.StretchToFill);
        Vector2 pos2 = new Vector2(position.x + 80f, position.y - 4f);
        string  text = "[ " + reg.GetStarAvgString() + " ]";

        LabelUtil.TextOut(pos2, text, "MiniLabel", txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft);
        float num = (float)reg.Likes / 100f;

        TextureUtil.DrawTexture(new Rect(position.x, position.y, position.width * num, position.height), srcRect: new Rect(0f, 0f, num, 1f), image: texStarGrade);
    }