Esempio n. 1
0
        /// render
        public static bool Render()
        {
            graphics.SetViewport(0, 0, screenWidth, screenHeight);
            graphics.SetClearColor(0.0f, 0.0f, 0.0f, 0.0f);
            graphics.Clear();

            button0.Draw();
            button1.Draw();
            button2.Draw();

            inputTextButton.Draw();

            SampleDraw.DrawText("Storage Sample", 0xffffffff, 0, 0);
            SampleDraw.DrawText("data", 0xffffffff, dialogXPos, 224);

            SampleDraw.DrawText(EVENT_LABEL, 0xffffffff, dialogXPos, 320);

            if (eventAction.Length > 0)
            {
                SampleDraw.DrawText(eventAction, 0xffffffff, dialogXPos, 360);
            }

            graphics.SwapBuffers();

            return(true);
        }
Esempio n. 2
0
 public void Draw()
 {
     SampleDraw.DrawSprite(textSprite);
     playButton.Draw();
     stopButton.Draw();
     volumeSlider.Draw();
 }
Esempio n. 3
0
        public static bool Render()
        {
            graphics.SetClearColor(0.0f, 0.0f, 0.0f, 0.0f);
            graphics.Clear();

            browserButton.Draw();

            SampleDraw.DrawText("Shell Sample", 0xffffffff, 0, 0);
            graphics.SwapBuffers();

            return(true);
        }
Esempio n. 4
0
        public static bool Render()
        {
            graphics.SetClearColor(0.0f, 0.0f, 0.0f, 0.0f);
            graphics.Clear();

            inputTextButton.Draw();
            copyButton.Draw();
            pasteButton.Draw();
            copyTextButton.Draw();

            SampleDraw.DrawText("Clipboard Sample", 0xffffffff, 0, 0);
            graphics.SwapBuffers();

            return(true);
        }
Esempio n. 5
0
        public static bool Render()
        {
            graphics.SetClearColor(0.0f, 0.0f, 0.0f, 0.0f);
            graphics.Clear();

            if (httpText != null)
            {
                SampleDraw.DrawSprite(httpText);
            }

            connectButton.Draw();

            SampleDraw.DrawText("Http Sample", 0xffffffff, 0, 0);
            graphics.SwapBuffers();

            return(true);
        }
Esempio n. 6
0
        public static bool Render()
        {
            graphics.SetClearColor(0.0f, 0.0f, 0.0f, 0.0f);
            graphics.Clear();

            SampleDraw.DrawText("Status : " + bgmPlayer.Status, 0xffffffff, 0, 64);
            SampleDraw.DrawText("Volume", 0xffffffff, volTextPosX, volTextPosY);

            playButton.Draw();
            stopButton.Draw();
            pauseButton.Draw();
            resumeButton.Draw();
            volumeSlider.Draw();

            SampleDraw.DrawText("BgmPlayer Sample", 0xffffffff, 0, 0);
            graphics.SwapBuffers();

            return(true);
        }
        public static bool Render()
        {
            graphics.SetViewport(0, 0, screenWidth, screenHeight);
            graphics.SetClearColor(0.0f, 0.0f, 0.0f, 0.0f);
            graphics.Clear();

            button0.Draw();
            button1.Draw();
            button2.Draw();
            button3.Draw();

            slider.Draw();

            inputTextButton.Draw();

            SampleDraw.DrawText("PersistentMemory Sample", 0xffffffff, 0, 0);
            SampleDraw.DrawText("Toggle Button", 0xffffffff, (((screenWidth - (BUTTON_NO * 128)) / 2) + 16), 96);
            SampleDraw.DrawText("TextDialog", 0xffffffff, ((screenWidth - 480) / 2), 224);
            SampleDraw.DrawText("Slider", 0xffffffff, ((screenWidth - 384) / 2), 330);
            graphics.SwapBuffers();

            return(true);
        }
Esempio n. 8
0
        public static bool Render()
        {
            graphics.SetClearColor(0.0f, 0.0f, 0.0f, 0.0f);
            graphics.Clear();
            serverButton.SetText(tcpServer.buttonString);
            clientButton.SetText(tcpClient.buttonString);

            List <TouchData> touchDataList = Touch.GetData(0);

            // Modify status
            if (serverButton.TouchDown(touchDataList))
            {
                tcpServer.ChangeStatus();
            }
            if (clientButton.TouchDown(touchDataList))
            {
                tcpClient.ChangeStatus();
            }

            /*
             * uint[] colorTable = {0xffff0000,
             *                                       0xff00ff00,
             *                                       0xff0000ff,
             *                                       0xffffff00};
             */
            foreach (var touchData in touchDataList)
            {
                /*
                 *                      if (touchData.Status == TouchStatus.Down ||
                 *                              touchData.Status == TouchStatus.Move) {
                 *
                 *                              int pointX = (int)((touchData.X + 0.5f) * Graphics2D.Width);
                 *                              int pointY = (int)((touchData.Y + 0.5f) * Graphics2D.Height);
                 *                              int radius = (int)(touchData.Force * 32);
                 *                              int colorId = touchData.ID % colorTable.Length;
                 *
                 *                              Graphics2D.FillCircle(colorTable[colorId], pointX, pointY, radius);
                 *
                 *                      }
                 */
                if (touchData.Status == TouchStatus.Down)
                {
                    int pointX = (int)((touchData.X + 0.5f) * SampleDraw.Width);
                    int pointY = (int)((touchData.Y + 0.5f) * SampleDraw.Height);
                    if (pointX < (SampleDraw.Width / 2))
                    {
                        tcpServer.SetMyPosition(pointX, pointY);
                    }
                    else
                    {
                        tcpClient.SetMyPosition(pointX - (SampleDraw.Width / 2), pointY);
                    }
                }
            }

            // Display button and status
            serverButton.Draw();
            clientButton.Draw();
            drawStatus(tcpServer);
            drawStatus(tcpClient);

            SampleDraw.DrawText("Network Sample", 0xffffffff, 0, 0);
            graphics.SwapBuffers();

            return(true);
        }