replaceTextBy() public static method

public static replaceTextBy ( string target, string replacement, MainMenuItem items, string debug = "" ) : void
target string
replacement string
items MainMenuItem
debug string
return void
    public void setPlatform()
    {
        if (!isPlatformSet)
        {
            switch (Application.platform)
            {
            case RuntimePlatform.WindowsPlayer:
            case RuntimePlatform.OSXPlayer:
            case RuntimePlatform.WindowsEditor:
            case RuntimePlatform.OSXEditor:
                Logger.Log("LearnMoreOptionsMainMenuItemArray::setPlatform Editor/Standalone prepares choices");
                //hide "same tab" option
                MainMenuManager.setVisibility(_items, sameTabKey, false, "setPlatform");
                //rename "new tab" into "open in browser"
                MainMenuManager.replaceTextBy(newTabKey, browserKey, _items, "setPlatform");
                break;

            default:
                Logger.Log("LearnMoreOptionsMainMenuItemArray::setPlatform default nothing to do");
                MainMenuManager.setVisibility(_items, sameTabKey, true, "setPlatform");
                //rename "open in browser tab" into "new tab"
                MainMenuManager.replaceTextBy(browserKey, newTabKey, _items, "setPlatform");
                break;
            }
            isPlatformSet = true;
        }
    }
Esempio n. 2
0
 private void replaceTextBy(string target, string replacement, string debug = "")
 {
     //Debug.Log(string.Format("replaceTextBy({0}, {1}, {2})", target, replacement, debug));
     MainMenuManager.replaceTextBy(target, replacement, _items, debug);
 }