Beispiel #1
0
        private void initGUI(int size)
        {
            GUIEnvironment gui = device.GUIEnvironment;
            VideoDriver    drv = gui.VideoDriver;

            gui.Clear();

            gui.AddImage(
                drv.GetTexture("../../media/lime_logo_alpha.png"),
                new Vector2Di(30, 0));

            guiWindow = gui.AddWindow(new Recti(20, 120, size + 20 + 20, size + 120 + 20 + 20 + 30), false, "Paint");

            guiSize128 = gui.AddButton(new Recti(10, 30, 40, 30 + 20), guiWindow, -1, "128");
            guiSize256 = gui.AddButton(new Recti(50, 30, 80, 30 + 20), guiWindow, -1, "256");
            guiSize512 = gui.AddButton(new Recti(90, 30, 120, 30 + 20), guiWindow, -1, "512");

            guiImage  = gui.AddImage(new Recti(10, 30 + 30, size + 10 - 1, size + 30 - 1 + 30), true, guiWindow);
            gui.Focus = guiImage;
        }