コード例 #1
0
        // SetText
        internal void SetAllText(bool setalign)
        {
            if (!Application.isPlaying)
            {
                return;
            }

            if (meterMode == MeterModes.Disable)
            {
                return;
            }

            // levData.Enabled
            if (levData.Enabled)
            {
                LEVresult = levData.GetLevelInfo();

                if (MeterMode == MeterModes.Enable)
                {
                    tempLabel = textLabels[( int )levData.Anchor];
                    tempLabel.AddText(LEVresult);
                    if (setalign)
                    {
                        tempLabel.SetAnchor(levData.Anchor, scrData.screenWidth, scrData.screenHeight);
                    }
                }
            }

            // fpsData.Enabled
            if (fpsData.Enabled)
            {
                FPSresult = fpsData.GetFPSData();

                if (MeterMode == MeterModes.Enable)
                {
                    /*
                     * tempLabel = textLabels[ ( int )fpsData.Anchor ];
                     * tempLabel.AddText( FPSresult );
                     * if( setalign ) tempLabel.SetAnchor( fpsData.Anchor, scrData.screenWidth, scrData.screenHeight );
                     */
                }
            }

            // memData.Enabled
            if (memData.Enabled)
            {
                MEMresult = memData.GetMemoryData();

                if (MeterMode == MeterModes.Enable)
                {
                    tempLabel = textLabels[( int )memData.Anchor];
                    tempLabel.AddText(MEMresult);
                    if (setalign)
                    {
                        tempLabel.SetAnchor(memData.Anchor, scrData.screenWidth, scrData.screenHeight);
                    }
                }
            }

            // scrData.Enabled
            if (scrData.Enabled)
            {
                SCRresult = scrData.GetScreenInfo();

                if (MeterMode == MeterModes.Enable)
                {
                    tempLabel = textLabels[( int )scrData.Anchor];
                    tempLabel.AddText(SCRresult);
                    if (setalign)
                    {
                        tempLabel.SetAnchor(scrData.Anchor, scrData.screenWidth, scrData.screenHeight);
                    }
                }
            }

            // hrwData.Enabled
            if (hrwData.Enabled)
            {
                HRWresult = hrwData.GetHardwareInfo();

                if (MeterMode == MeterModes.Enable)
                {
                    tempLabel = textLabels[( int )hrwData.Anchor];
                    tempLabel.AddText(HRWresult);
                    if (setalign)
                    {
                        tempLabel.SetAnchor(hrwData.Anchor, scrData.screenWidth, scrData.screenHeight);
                    }
                }
            }

            // UpdateText
            for (int cnt = 0; cnt < anchorsCount; cnt++)
            {
                textLabels[cnt].UpdateText();
            }
        }