public string GetPlatformText(int textID, TextPlatform platform, ref bool autoClose)
    {
        PlatformText[] psourceSet = null;
        PlatformText   psource    = null;
        int            platformId = INVALID_PLATFORM_ID;

        if (gameText != null)
        {
            psourceSet = gameText.Platform;
            if (psourceSet != null)
            {
                switch (platform)
                {
                case TextPlatform.Android:
                    platformId = TEXT_PLATFORM_ID_ANDROID;
                    break;

                case TextPlatform.PC:
                    platformId = TEXT_PLATFORM_ID_PC;
                    break;
                }
                if (platformId != INVALID_PLATFORM_ID)
                {
                    for (int i = 0; i < psourceSet.Length; i++)
                    {
                        psource = psourceSet[i];
                        if (psource != null)
                        {
                            if ((psource.Id == textID) && (psource.PlatformId == platformId))
                            {
                                autoClose = psource.AutoClose;
                                return(psource.Text);
                            }
                        }
                    }
                }
            }
        }
        return(null);
    }
Beispiel #2
0
 public TextMetrics MeasureText(string text, Font font)
 {
     return(TextPlatform.MeasureText(text, font));
 }