Пример #1
0
        private static void startUp()
        {
            frameCount = 0;
            TCM_Graphics.Initialize("Game", 1920, 1080, new Color(0, 0, 0, 1));
            TCM_Audio.Initialize();
            rooms = new List <Room>();
            rooms.Add(new Room(2, 1, true));
            currentRoom = rooms[0];
            currentRoom.initialize();

            pause = new Frame();



            //working on it, does scrolly text, needs to be able to reset
            //ProgressingTextVisual pauseText = new ProgressingTextVisual("PAUSED - back to quit\ntesting how much text i can fit in this box"
            //    + "\napparently that wasn't enough, so i'll just keep adding until something weird starts happening", new Color(1, 1, 1, 1));
            //pauseText.setBoundingBox(490, 280, 940, 520);
            //pauseText.setFormat("Consolas", 32);

            //List<ProgressingTextVisual> scrolly = new List<ProgressingTextVisual>();
            //scrolly.Add(pauseText);

            TextVisual pauseText = new TextVisual("PAUSED - back to quit\ntesting how much text i can fit in this box"
                                                  + "\napparently that wasn't enough, so i'll just keep adding until something weird starts happening", new Color(1, 1, 1, 1));

            pauseText.setBoundingBox(490, 280, 940, 520);
            pauseText.setFormat(pauseText.format.FontFamilyName, 32);
            pauseText.setFormat("Consolas", 32);

            BitmapVisual pauseBitmap = new BitmapVisual(TCM_Graphics.loadPNG("blank"), 480, 270, 960, 540);

            pauseBitmap.setTransparency(.5f);
            pause.addVisual(pauseBitmap);
            pause.addVisual(pauseText);
            if (new Controller() != null)
            {
                control            = new TCM_Controller(new Controller(UserIndex.One));
                control.LSDeadZone = .18;
                control.RSDeadZone = .18;
                control.axialLeft  = false;
                control.axialRight = false;
            }
            else
            {
            }
        }
Пример #2
0
 //drawing
 public static void drawTextVisual(TextVisual tv)
 {
     brush.Color = tv.color;
     rt.DrawText(tv.text, tv.format, tv.boundingBox, brush);
 }