示例#1
0
        // Token: 0x06001386 RID: 4998 RVA: 0x0007CF90 File Offset: 0x0007B390
        protected virtual void handleBranchClimbButtonClicked(Sleek2ImageButton button)
        {
            TranslationBranchButton translationBranchButton = button.parent as TranslationBranchButton;

            if (translationBranchButton == null || translationBranchButton.branch == null)
            {
                return;
            }
            this.climbBranch(translationBranchButton.branch);
        }
示例#2
0
 // Token: 0x06001379 RID: 4985 RVA: 0x0007C98C File Offset: 0x0007AD8C
 protected virtual void climbBranch(TranslationBranch newBranch)
 {
     this.branch = newBranch;
     this.treePanel.clearElements();
     if (this.branch == null)
     {
         TranslationWindow.ETreeMode etreeMode = this.treeMode;
         string key;
         if (etreeMode != TranslationWindow.ETreeMode.ORIGIN)
         {
             if (etreeMode != TranslationWindow.ETreeMode.TRANSLATION)
             {
                 Debug.LogError("Unknown translation UI tree mode: " + this.treeMode);
                 return;
             }
             key = Translator.language;
         }
         else
         {
             key = Translator.ORIGIN_LANGUAGE;
         }
         Dictionary <string, Translation> dictionary;
         Translator.languages.TryGetValue(key, out dictionary);
         foreach (KeyValuePair <string, Translation> keyValuePair in dictionary)
         {
             TranslationNamespaceButton translationNamespaceButton = new TranslationNamespaceButton(keyValuePair.Value);
             translationNamespaceButton.clicked += this.handleNamespaceButtonClicked;
             this.treePanel.addElement(translationNamespaceButton);
         }
     }
     else
     {
         foreach (KeyValuePair <string, TranslationBranch> keyValuePair2 in this.branch.branches)
         {
             TranslationBranch value = keyValuePair2.Value;
             if (value.leaf != null)
             {
                 TranslationLeafField element = new TranslationLeafField(value.leaf);
                 this.treePanel.addElement(element);
             }
             else
             {
                 TranslationBranchButton translationBranchButton = new TranslationBranchButton(value);
                 translationBranchButton.climbButton.clicked += this.handleBranchClimbButtonClicked;
                 this.treePanel.addElement(translationBranchButton);
             }
         }
     }
 }