예제 #1
0
    // Token: 0x06000187 RID: 391 RVA: 0x0000EA60 File Offset: 0x0000CC60
    public string[] splitFontArray(string src, int lineWidth)
    {
        MyVector myVector = this.splitFontVector(src, lineWidth);

        string[] array = new string[myVector.size()];
        for (int i = 0; i < myVector.size(); i++)
        {
            array[i] = (string)myVector.elementAt(i);
        }
        return(array);
    }
예제 #2
0
    // Token: 0x0600045B RID: 1115 RVA: 0x00036214 File Offset: 0x00034414
    public static string[] split(string original, string separator)
    {
        MyVector myVector = new MyVector();

        for (int i = original.IndexOf(separator); i >= 0; i = original.IndexOf(separator))
        {
            myVector.addElement(original.Substring(0, i));
            original = original.Substring(i + separator.Length);
        }
        myVector.addElement(original);
        string[] array = new string[myVector.size()];
        if (myVector.size() > 0)
        {
            for (int j = 0; j < myVector.size(); j++)
            {
                array[j] = (string)myVector.elementAt(j);
            }
        }
        return(array);
    }
예제 #3
0
 // Token: 0x060001C8 RID: 456 RVA: 0x00010CBC File Offset: 0x0000EEBC
 public void drawlineGL(MyVector totalLine)
 {
     this.lineMaterial.SetPass(0);
     GL.PushMatrix();
     GL.Begin(1);
     for (int i = 0; i < totalLine.size(); i++)
     {
         mLine mLine = (mLine)totalLine.elementAt(i);
         GL.Color(new Color(mLine.r, mLine.g, mLine.b, mLine.a));
         int num  = mLine.x1 * mGraphics.zoomLevel;
         int num2 = mLine.y1 * mGraphics.zoomLevel;
         int num3 = mLine.x2 * mGraphics.zoomLevel;
         int num4 = mLine.y2 * mGraphics.zoomLevel;
         if (this.isTranslate)
         {
             num  += this.translateX;
             num2 += this.translateY;
             num3 += this.translateX;
             num4 += this.translateY;
         }
         for (int j = 0; j < mGraphics.zoomLevel; j++)
         {
             GL.Vertex(new Vector2((float)(num + j), (float)(num2 + j)));
             GL.Vertex(new Vector2((float)(num3 + j), (float)(num4 + j)));
             if (j > 0)
             {
                 GL.Vertex(new Vector2((float)(num + j), (float)num2));
                 GL.Vertex(new Vector2((float)(num3 + j), (float)num4));
                 GL.Vertex(new Vector2((float)num, (float)(num2 + j)));
                 GL.Vertex(new Vector2((float)num3, (float)(num4 + j)));
             }
         }
     }
     GL.End();
     GL.PopMatrix();
     totalLine.removeAllElements();
 }
예제 #4
0
 // Token: 0x0600072D RID: 1837 RVA: 0x0005F750 File Offset: 0x0005D950
 public void startAt(MyVector menuItems, int pos)
 {
     if (this.showMenu)
     {
         return;
     }
     this.isClose = false;
     this.touch   = false;
     this.close   = false;
     this.tDelay  = 0;
     if (menuItems.size() == 1)
     {
         this.menuSelectedItem = 0;
         Command command = (Command)menuItems.elementAt(0);
         if (command != null && command.caption.Equals(mResources.saying))
         {
             command.performAction();
             this.showMenu = false;
             InfoDlg.showWait();
             return;
         }
     }
     SoundMn.gI().openMenu();
     this.isNotClose = new bool[menuItems.size()];
     for (int i = 0; i < this.isNotClose.Length; i++)
     {
         this.isNotClose[i] = false;
     }
     this.disableClose       = false;
     ChatPopup.currChatPopup = null;
     Effect2.vEffect2.removeAllElements();
     Effect2.vEffect2Outside.removeAllElements();
     InfoDlg.hide();
     if (menuItems.size() == 0)
     {
         return;
     }
     this.menuItems = menuItems;
     this.menuW     = 60;
     this.menuH     = 60;
     for (int j = 0; j < menuItems.size(); j++)
     {
         Command command2 = (Command)menuItems.elementAt(j);
         command2.isPlaySoundButton = false;
         int width = mFont.tahoma_7_yellow.getWidth(command2.caption);
         command2.subCaption = mFont.tahoma_7_yellow.splitFontArray(command2.caption, this.menuW - 10);
         Res.outz("c caption= " + command2.caption);
     }
     Menu.menuTemY = new int[menuItems.size()];
     this.menuX    = (GameCanvas.w - menuItems.size() * this.menuW) / 2;
     if (this.menuX < 1)
     {
         this.menuX = 1;
     }
     this.menuY = GameCanvas.h - this.menuH - (Paint.hTab + 1) - 1;
     if (GameCanvas.isTouch)
     {
         this.menuY -= 3;
     }
     this.menuY += 27;
     for (int k = 0; k < Menu.menuTemY.Length; k++)
     {
         Menu.menuTemY[k] = GameCanvas.h;
     }
     this.showMenu         = true;
     this.menuSelectedItem = 0;
     Menu.cmxLim           = this.menuItems.size() * this.menuW - GameCanvas.w;
     if (Menu.cmxLim < 0)
     {
         Menu.cmxLim = 0;
     }
     Menu.cmtoX = 0;
     Menu.cmx   = 0;
     Menu.xc    = 50;
     this.w     = menuItems.size() * this.menuW - 1;
     if (this.w > GameCanvas.w - 2)
     {
         this.w = GameCanvas.w - 2;
     }
     if (GameCanvas.isTouch && !Main.isPC)
     {
         this.menuSelectedItem = -1;
     }
 }