Example #1
0
        public BlockDesigner(Engine engine, Tileset tileset, BlockPlacer parentScreen)
            : base("Block Designer")
        {
            this.parentScreen = parentScreen;
            this.tileset      = tileset;
            this.EditMode     = false;
            this.CurrentBlock = new Block("", 0, tileset, true, true);

            SetUpScreen(engine);
        }
Example #2
0
        public BlockDesigner(Engine engine, Tileset tileset, BlockPlacer parentScreen)
            : base("Block Designer")
        {
            this.parentScreen = parentScreen;
            this.tileset = tileset;
            this.EditMode = false;
            this.CurrentBlock = new Block("", 0, tileset, true, true);

            SetUpScreen(engine);
        }
 public SaveLoadBlockset(Engine engine, BlockPlacer parentScreen)
     : base("Save or Load Prompt")
 {
     DemandPriority = true;
     text           = new ScreenText(this, "Type in the name of this set below.", engine.FontMain);
     AddElement(text);
     input             = new ScreenInput(this, engine.FontMain);
     input.InputString = engine.room.BlockSet.Name;
     AddElement(input);
     AddElement(new ScreenButton(this, "Save", engine.FontMain));
     AddElement(new ScreenButton(this, "Load", engine.FontMain));
     AddCloseButton(engine);
     this.parentScreen = parentScreen;
 }
 public SaveLoadBlockset(Engine engine, BlockPlacer parentScreen)
     : base("Save or Load Prompt")
 {
     DemandPriority = true;
     text = new ScreenText(this, "Type in the name of this set below.", engine.FontMain);
     AddElement(text);
     input = new ScreenInput(this, engine.FontMain);
     input.InputString = engine.room.BlockSet.Name;
     AddElement(input);
     AddElement(new ScreenButton(this, "Save", engine.FontMain));
     AddElement(new ScreenButton(this, "Load", engine.FontMain));
     AddCloseButton(engine);
     this.parentScreen = parentScreen;
 }
Example #5
0
        public BlockDesigner(Engine engine, Tileset tileset, BlockPlacer parentScreen, Block block)
            : base("Block Designer")
        {
            this.parentScreen = parentScreen;
            this.tileset = tileset;
            this.EditMode = true;
            this.CurrentBlock = block;

            SetUpScreen(engine);

            ScreenButton _but = new ScreenButton(this, "Delete", "Del", engine.FontMain);
            _but.Position.X = Screen.boarderSize * 6 + 2 * 32 + 48 + 64 + 48;
            _but.Position.Y = PrevBox.Y + PrevBoxSize + boarderSize;;
            _but.Size.X = 32;
            this.AddElement(_but);
        }
Example #6
0
        public BlockDesigner(Engine engine, Tileset tileset, BlockPlacer parentScreen, Block block)
            : base("Block Designer")
        {
            this.parentScreen = parentScreen;
            this.tileset      = tileset;
            this.EditMode     = true;
            this.CurrentBlock = block;

            SetUpScreen(engine);

            ScreenButton _but = new ScreenButton(this, "Delete", "Del", engine.FontMain);

            _but.Position.X = Screen.boarderSize * 6 + 2 * 32 + 48 + 64 + 48;
            _but.Position.Y = PrevBox.Y + PrevBoxSize + boarderSize;;
            _but.Size.X     = 32;
            this.AddElement(_but);
        }
Example #7
0
        public LevelEditor(Engine engine)
            : base("Editor")
        {
            this.Size    = new Vector2(Screen.boarderSize * 4 + 32);
            CameraButton = new ScreenPictureButton(this, "Toggle Camera", engine.textureManager.Dic["camera_button"]);
            this.AddElement(CameraButton);
            StackButton = new ScreenPictureButton(this, "Toggle Block Stacking", engine.textureManager.Dic["stack_on_button"]);
            this.AddElement(StackButton);
            this.AddElement(new ScreenPictureButton(this, "Save Layout", engine.textureManager.Dic["save_button"]));
            this.AddElement(new ScreenPictureButton(this, "Load Layout", engine.textureManager.Dic["open_button"]));
            this.AddElement(new ScreenPictureButton(this, "Open Directory", engine.textureManager.Dic["dir_button"]));
            this.AddElement(new ScreenPictureButton(this, "Room Settings", engine.textureManager.Dic["room_settings"]));
            ShowNullButton = new ScreenPictureButton(this, "Toggle Show Null", engine.textureManager.Dic["show_null"]);
            this.AddElement(ShowNullButton);
            this.AddElement(new ScreenPictureButton(this, "Light Settings", engine.textureManager.Dic["light_button"]));
            this.Position = Vector2.Zero;
            blockSelector = new BlockPlacer(engine, this);
            engine.screenManager.AddScreen(blockSelector);

            engine.camera.Set(engine, CameraSetting.Free);
            this.PreformAction(engine, "Reset Camera");
        }
Example #8
0
        public LevelEditor(Engine engine)
            : base("Editor")
        {
            this.Size = new Vector2(Screen.boarderSize * 4 + 32);
            CameraButton = new ScreenPictureButton(this, "Toggle Camera", engine.textureManager.Dic["camera_button"]);
            this.AddElement(CameraButton);
            StackButton = new ScreenPictureButton(this, "Toggle Block Stacking", engine.textureManager.Dic["stack_on_button"]);
            this.AddElement(StackButton);
            this.AddElement(new ScreenPictureButton(this, "Save Layout", engine.textureManager.Dic["save_button"]));
            this.AddElement(new ScreenPictureButton(this, "Load Layout", engine.textureManager.Dic["open_button"]));
            this.AddElement(new ScreenPictureButton(this, "Open Directory", engine.textureManager.Dic["dir_button"]));
            this.AddElement(new ScreenPictureButton(this, "Room Settings", engine.textureManager.Dic["room_settings"]));
            ShowNullButton = new ScreenPictureButton(this, "Toggle Show Null", engine.textureManager.Dic["show_null"]);
            this.AddElement(ShowNullButton);
            this.AddElement(new ScreenPictureButton(this, "Light Settings", engine.textureManager.Dic["light_button"]));
            this.Position = Vector2.Zero;
            blockSelector = new BlockPlacer(engine, this);
            engine.screenManager.AddScreen(blockSelector);

            engine.camera.Set(engine, CameraSetting.Free);
            this.PreformAction(engine, "Reset Camera");
        }