Exemplo n.º 1
0
        // CActivity 実装(共通クラスからの差分のみ)

        public override int OnUpdateAndDraw()
        {
            if (!base.bNotActivated)
            {
                for (int i = 0; i < 6; i++)
                {
                    if (!base.ctUpdate[i].b停止中)
                    {
                        EInstrumentPart e楽器パート  = (i < 3) ? EInstrumentPart.GUITAR : EInstrumentPart.BASS;
                        CTexture        texture = CDTXMania.ConfigIni.bReverse[(int)e楽器パート] ? base.txFlush[(i % 3) + 3] : base.txFlush[i % 3];
                        int             num2    = CDTXMania.ConfigIni.bLeft[(int)e楽器パート] ? 1 : 0;
                        for (int j = 0; j < 3; j++)
                        {
                            int x = (((i < 3) ? 0x1fb : 0x18e) + this.nRGBのX座標[num2, i]) + ((0x10 * base.ctUpdate[i].nCurrentValue) / 100);
                            int y = ((i < 3) ? 0x39 : 0x39) + (j * 0x76);
                            if (texture != null)
                            {
                                texture.tDraw2D(CDTXMania.app.Device, x, y, new Rectangle(j * 0x20, 0, (0x18 * (100 - base.ctUpdate[i].nCurrentValue)) / 100, 0x76));
                            }
                        }
                        base.ctUpdate[i].tUpdate();
                        if (base.ctUpdate[i].bReachedEndValue)
                        {
                            base.ctUpdate[i].tStop();
                        }
                    }
                }
            }
            return(0);
        }
Exemplo n.º 2
0
 public void t文字列描画(int x, int y, string str, bool b強調, float fScale)
 {
     if (!base.bNotActivated && !string.IsNullOrEmpty(str))
     {
         CTexture texture = b強調 ? this.tx強調文字 : this.tx通常文字;
         if (texture != null)
         {
             texture.vcScaleRatio = new Vector3(fScale, fScale, 1f);
             foreach (char ch in str)
             {
                 foreach (ST文字領域 st文字領域 in this.st文字領域)
                 {
                     if (st文字領域.ch == ch)
                     {
                         texture.tDraw2D(CDTXMania.app.Device, x, y, st文字領域.rc);
                         x += (int)((st文字領域.rc.Width - 5) * fScale);
                         break;
                     }
                 }
             }
         }
     }
 }
Exemplo n.º 3
0
        public override int OnUpdateAndDraw()
        {
            if (!base.bNotActivated)
            {
                #region [ レーンの描画 ]
                //---------------
                //レ-ンのみ先に描画しておく。
                if (CDTXMania.DTX.bチップがある.Guitar)
                {
                    if (CDTXMania.ConfigIni.nLaneDisp.Guitar == 0 || CDTXMania.ConfigIni.nLaneDisp.Guitar == 2)
                    {
                        this.txLane.tDraw2D(CDTXMania.app.Device, 67, 42);
                    }
                    else
                    {
                        this.txLaneDark.tDraw2D(CDTXMania.app.Device, 67, 42);
                    }
                }
                if (CDTXMania.DTX.bチップがある.Bass)
                {
                    if (CDTXMania.ConfigIni.nLaneDisp.Bass == 0 || CDTXMania.ConfigIni.nLaneDisp.Bass == 2)
                    {
                        this.txLane.tDraw2D(CDTXMania.app.Device, 937, 42);
                    }
                    else
                    {
                        this.txLaneDark.tDraw2D(CDTXMania.app.Device, 937, 42);
                    }
                }
                //---------------
                #endregion

                for (int i = 0; i < 10; i++)
                {
                    if (!base.ctUpdate[i].b停止中)
                    {
                        EInstrumentPart e楽器パート  = (i < 5) ? EInstrumentPart.GUITAR : EInstrumentPart.BASS;
                        CTexture        texture = CDTXMania.ConfigIni.bReverse[(int)e楽器パート] ? base.txFlush[(i % 5) + 5] : base.txFlush[i % 5];
                        int             num2    = CDTXMania.ConfigIni.bLeft[(int)e楽器パート] ? 1 : 0;
                        //int x = ( ( ( i < 5 ) ? 88 : 480 ) + this.nRGBのX座標[ num2, i ] ) + ( ( 37 * base.ctUpdate[ i ].nCurrentValue ) / 100 );
                        int x  = (((i < 5) ? 88 : 958) + this.nRGBのX座標[num2, i] + ((19 * base.ctUpdate[i].nCurrentValue) / 70));
                        int x2 = ((i < 5) ? 88 : 954);
                        int y  = CDTXMania.ConfigIni.bReverse[(int)e楽器パート] ? 414 : 100;
                        int y2 = CDTXMania.ConfigIni.bReverse[(int)e楽器パート] ? 414 : 104;
                        if (texture != null && CDTXMania.ConfigIni.bLaneFlush[(int)e楽器パート])
                        {
                            texture.tDraw2D(CDTXMania.app.Device, x, y, new Rectangle(37, 0, (37 * (70 - base.ctUpdate[i].nCurrentValue)) / 70, 256));
                            //if( j == 4 )
                            //this.txレーンフラッシュ.tDraw2D( CDTXMania.app.Device, x2 + ( ( i < 5 ? i : i - 5 ) * 39 ), y2, new Rectangle( i * 39, 0, 41, 566 ) );
                        }
                        base.ctUpdate[i].tUpdate();
                        if (base.ctUpdate[i].bReachedEndValue)
                        {
                            base.ctUpdate[i].tStop();
                        }
                    }
                }
                //ここの分岐文はbase.ctUpdate[ n ]のものを使わないと、停止中にレーンフラッシュが消えてしまう。

                if (!base.ctUpdate[0].b停止中 && CDTXMania.ConfigIni.bLaneFlush.Guitar)
                {
                    this.txLaneFlush.tDraw2D(CDTXMania.app.Device, (CDTXMania.ConfigIni.bLeft.Guitar ? 242 : 86), 104, new Rectangle(0, 0, 41, 566));
                }
                if (!base.ctUpdate[1].b停止中 && CDTXMania.ConfigIni.bLaneFlush.Guitar)
                {
                    this.txLaneFlush.tDraw2D(CDTXMania.app.Device, (CDTXMania.ConfigIni.bLeft.Guitar ? 203 : 125), 104, new Rectangle(39, 0, 41, 566));
                }
                if (!base.ctUpdate[2].b停止中 && CDTXMania.ConfigIni.bLaneFlush.Guitar)
                {
                    this.txLaneFlush.tDraw2D(CDTXMania.app.Device, 164, 104, new Rectangle(78, 0, 41, 566));
                }
                if (!base.ctUpdate[3].b停止中 && CDTXMania.ConfigIni.bLaneFlush.Guitar)
                {
                    this.txLaneFlush.tDraw2D(CDTXMania.app.Device, (CDTXMania.ConfigIni.bLeft.Guitar ? 125 : 203), 104, new Rectangle(117, 0, 41, 566));
                }
                if (!base.ctUpdate[4].b停止中 && CDTXMania.ConfigIni.bLaneFlush.Guitar)
                {
                    this.txLaneFlush.tDraw2D(CDTXMania.app.Device, (CDTXMania.ConfigIni.bLeft.Guitar ? 86 : 242), 104, new Rectangle(156, 0, 41, 566));
                }

                if (!base.ctUpdate[5].b停止中 && CDTXMania.ConfigIni.bLaneFlush.Bass)
                {
                    this.txLaneFlush.tDraw2D(CDTXMania.app.Device, (CDTXMania.ConfigIni.bLeft.Bass ? 1112 : 957), 104, new Rectangle(0, 0, 41, 566));
                }
                if (!base.ctUpdate[6].b停止中 && CDTXMania.ConfigIni.bLaneFlush.Bass)
                {
                    this.txLaneFlush.tDraw2D(CDTXMania.app.Device, (CDTXMania.ConfigIni.bLeft.Bass ? 1073 : 995), 104, new Rectangle(39, 0, 41, 566));
                }
                if (!base.ctUpdate[7].b停止中 && CDTXMania.ConfigIni.bLaneFlush.Bass)
                {
                    this.txLaneFlush.tDraw2D(CDTXMania.app.Device, 1034, 104, new Rectangle(78, 0, 41, 566));
                }
                if (!base.ctUpdate[8].b停止中 && CDTXMania.ConfigIni.bLaneFlush.Bass)
                {
                    this.txLaneFlush.tDraw2D(CDTXMania.app.Device, (CDTXMania.ConfigIni.bLeft.Bass ? 995 : 1073), 104, new Rectangle(117, 0, 41, 566));
                }
                if (!base.ctUpdate[9].b停止中 && CDTXMania.ConfigIni.bLaneFlush.Bass)
                {
                    this.txLaneFlush.tDraw2D(CDTXMania.app.Device, (CDTXMania.ConfigIni.bLeft.Bass ? 957 : 1112), 104, new Rectangle(156, 0, 41, 566));
                }
            }
            return(0);
        }
Exemplo n.º 4
0
 public override int OnUpdateAndDraw()
 {
     if (base.bNotActivated)
     {
         return(0);
     }
     if (b表示中)
     {
         tx背景?.tDraw2D(CDTXMania.app.Device, rectパネル基本位置.X, rectパネル基本位置.Y);
         if (b入力中)
         {
             bool flag = false;
             if (bIME取得可能)
             {
                 strIME入力中文字列_前フレーム = strIME入力中文字列;
                 strIME入力中文字列       = CDTXMania.app.cIMEHook.str入力中文字列;
                 strIME確定文字列        = CDTXMania.app.cIMEHook.str確定文字列;
                 if (strIME入力中文字列 != strIME入力中文字列_前フレーム)
                 {
                     flag = true;
                 }
                 if (strIME確定文字列 != "")
                 {
                     if (strIME確定文字列 != strIME確定文字列_前回)
                     {
                         t入力中文字列のカーソル位置に文字を挿入する(strIME確定文字列);
                         bIME確定文字列を入力した直後 = true;
                         flag             = true;
                         strIME確定文字列_前回   = strIME確定文字列;
                     }
                     else
                     {
                         bIME確定文字列を入力した直後 = false;
                     }
                 }
             }
             if (CDTXMania.InputManager.Keyboard.bKeyPressed(117) || CDTXMania.InputManager.Keyboard.bKeyPressed(100))
             {
                 if (!bIME確定文字列を入力した直後)
                 {
                     t入力を確定して終了();
                 }
             }
             else if (CDTXMania.InputManager.Keyboard.bKeyPressed(53))
             {
                 if (strIME入力中文字列_前フレーム == "")
                 {
                     t入力を確定せずに終了();
                 }
             }
             else if (CDTXMania.InputManager.Keyboard.bKeyPressed(31))
             {
                 if ((CDTXMania.InputManager.Keyboard.bKeyPressing(75) || CDTXMania.InputManager.Keyboard.bKeyPressing(116)) && strIME入力中文字列 == "")
                 {
                     string text = tクリップボードから文字列を取得する().Replace("\r\n", "");
                     if (text != string.Empty)
                     {
                         str入力中文字列 = str入力中文字列.Substring(0, nカーソル位置) + text + str入力中文字列.Substring(nカーソル位置);
                         nカーソル位置  += text.Length;
                         flag      = true;
                     }
                 }
             }
             else if (CDTXMania.InputManager.Keyboard.bKeyPressed(12))
             {
                 if ((CDTXMania.InputManager.Keyboard.bKeyPressing(75) || CDTXMania.InputManager.Keyboard.bKeyPressing(116)) && strIME入力中文字列 == "")
                 {
                     tクリップボードに文字列を設定する(str入力中文字列);
                 }
             }
             else if (CDTXMania.InputManager.Keyboard.bKeyPressed(10))
             {
                 if ((CDTXMania.InputManager.Keyboard.bKeyPressing(75) || CDTXMania.InputManager.Keyboard.bKeyPressing(116)) && strIME入力中文字列 == "")
                 {
                     str入力中文字列 = "";
                     nカーソル位置   = 0;
                     flag      = true;
                 }
             }
             else if (CDTXMania.InputManager.Keyboard.bKeyPressed(76))
             {
                 if (strIME入力中文字列 == "")
                 {
                     nカーソル位置--;
                     if (nカーソル位置 < 0)
                     {
                         nカーソル位置 = 0;
                     }
                     flag = true;
                 }
             }
             else if (CDTXMania.InputManager.Keyboard.bKeyPressed(118))
             {
                 if (strIME入力中文字列 == "")
                 {
                     nカーソル位置++;
                     if (nカーソル位置 > str入力中文字列.Length)
                     {
                         nカーソル位置 = str入力中文字列.Length;
                     }
                     flag = true;
                 }
             }
             else if (CDTXMania.InputManager.Keyboard.bKeyPressed(132))
             {
                 if (strIME入力中文字列 == "" && L前回確定した文字列リスト.Count > 0)
                 {
                     n前回確定した文字列リスト_参照カウンタ--;
                     if (n前回確定した文字列リスト_参照カウンタ < 0)
                     {
                         n前回確定した文字列リスト_参照カウンタ = 0;
                     }
                     str入力中文字列 = L前回確定した文字列リスト[n前回確定した文字列リスト_参照カウンタ];
                     nカーソル位置   = str入力中文字列.Length;
                     flag      = true;
                 }
             }
             else if (CDTXMania.InputManager.Keyboard.bKeyPressed(50))
             {
                 if (strIME入力中文字列 == "" && L前回確定した文字列リスト.Count > 0)
                 {
                     n前回確定した文字列リスト_参照カウンタ++;
                     if (n前回確定した文字列リスト_参照カウンタ >= L前回確定した文字列リスト.Count)
                     {
                         n前回確定した文字列リスト_参照カウンタ = L前回確定した文字列リスト.Count;
                         str入力中文字列            = "";
                     }
                     else
                     {
                         str入力中文字列 = L前回確定した文字列リスト[n前回確定した文字列リスト_参照カウンタ];
                     }
                     nカーソル位置 = str入力中文字列.Length;
                     flag    = true;
                 }
             }
             else if (CDTXMania.InputManager.Keyboard.bKeyPressed(49))
             {
                 if (strIME入力中文字列 == "")
                 {
                     if (nカーソル位置 < str入力中文字列.Length)
                     {
                         str入力中文字列 = str入力中文字列.Substring(0, nカーソル位置) + str入力中文字列.Substring(nカーソル位置 + 1);
                     }
                     flag = true;
                 }
             }
             else
             {
                 _ = (strIME入力中文字列 == "");
             }
             if (flag)
             {
                 t文字テクスチャを生成();
             }
             ctカーソル?.tUpdateLoop();
             CCounter cCounter = ctカーソル;
             if (cCounter != null && cCounter.nCurrentValue <= 500)
             {
                 txカーソル?.tDraw2D(CDTXMania.app.Device, rectパネル基本位置.X + nカーソル座標X, rectパネル基本位置.Y + 2);
             }
             if (b検索説明文表示)
             {
                 tx説明?.tDraw2D(CDTXMania.app.Device, rectパネル基本位置.X, rectパネル基本位置.Y + 60);
             }
         }
         tx文字列?.tDraw2D(CDTXMania.app.Device, rectパネル基本位置.X, rectパネル基本位置.Y);
     }
     if (b次のフレームで入力中にする)
     {
         b入力中           = true;
         b次のフレームで入力中にする = false;
     }
     return(0);
 }