コード例 #1
0
ファイル: Program.cs プロジェクト: masums/NetCoreNanoVG
        static void Demo(NanoVGContext vg)
        {
            int x = 0;
            int y = 0;

            x = 60;
            y = 95;

            int sWinX = 650;
            int sWinY = 50;

            // Widgets

            DrawColorWheel(vg, 400, 50, 200, 200, 1);
            DemoData data = new DemoData();

            LoadDemoData(vg, ref data);
            DrawThumbnails(vg, 400, 250, 200, 300, data.images, 12, 10);

            DrawWindow(vg, "Left Widgets Stuff", 50, 50, 300, 600);

            DrawSearchBox(vg, "Search ", x, y, 200, 25);

            DrawLabel(vg, "OMG Label", x, 120, 200, 50);
            DrawDropDown(vg, "My Dropdown", x, 170, 200, 25);
            DrawEditBox(vg, "Edit Text", x, 200, 200, 30);
            DrawEditBoxNum(vg, "0123455", new byte[] { 1 }, x, 240, 200, 30);
            DrawCheckBox(vg, "Check 1", x, 280, 200, 20);
            DrawButton(vg, 1, "Click me!", x, 300, 200, 30, NVG.RGB(10, 10, 10));
            DrawSlider(vg, 0.4f, x, 340, 200, 30);

            DrawWindow(vg, "Right Widgets", sWinX, sWinY, 300, 600);
            DrawEyes(vg, sWinX + 10, sWinY + 10, 100, 50, 10, 10, 20);
            DrawGraph(vg, 0, 360, 1024, 350, 500);
            DrawSpinner(vg, 800, 150, 60, 100);
            DrawLines(vg, sWinX + 10, sWinY + 100, 200, 10, 10);
            //DrawParagraph(vg, sWinX + 10, sWinY + 200, 200, 100, 10f, 10f);
        }