Exemplo n.º 1
0
Arquivo: Menu.cs Projeto: Lyloox/Abimn
        public Menu()
            : base(true)
        {
            Cursor.setCursor(Tiles.Cursor, 1, 2, new Pos(15, 5));

            create = new Button(new Pos((int)(C.Screen.Width * 0.15), (int)(C.Screen.Height * 0.30)));
            create.LoadContent(1, 4, 4, Tiles.Button);

            load = new Button(new Pos((int)(C.Screen.Width * 0.15), (int)(C.Screen.Height * 0.45)));
            load.LoadContent(2, 5, 5, Tiles.Button);

            quit = new Button(new Pos((int)(C.Screen.Width * 0.15), (int)(C.Screen.Height * 0.60)));
            quit.LoadContent(3, 6, 6, Tiles.Button);

            background = new Entity();
            background.LoadContent(1, Tiles.Menu);
        }
Exemplo n.º 2
0
        public MapSelector(bool creating)
            : base(true)
        {
            this.creating = creating;
            maps = System.IO.File.ReadAllLines(C.mapsPath);
            byte i = 0;

            while (i < C.nbSlots)
                slotIsEmpty[i] = maps[i++] == "";
            for (i = 0; i < slots.Length; i++)
            {
                slots[i] = new Button(new Pos(C.Screen.Width / 2 + (i < slots.Length / 2 ? -200 : 200), C.Screen.Height / 2 - 150 + (i%(slots.Length/2)) * 100));
                slots[i].LoadContent(slotIsEmpty[i] ? 9 : i + 1, slotIsEmpty[i] ? 10 : i + 11, slotIsEmpty[i] ? 10 : i + 11, Tiles.Slot, Center.All);
            }
            back = new Button();
            back.LoadContent(21, 22, 22, Tiles.Slot);
            back.Pos = new Pos(C.Screen.Width - back.Rect.Width, C.Screen.Height - back.Rect.Height);

            background = new Entity();
            background.LoadContent(1, Tiles.Menu);

            //id = id >= maps.Length ? maps.Length - 1 : id;
            //this.load(maps[id]);
        }