예제 #1
0
        public RoomSettings(Engine engine)
            : base("Room Settings")
        {
            NewSize = new Vector3(engine.room.Width, engine.room.Depth, engine.room.Height);

            AddCloseButton(engine);

            AddText("Use these buttons to resize the map. Left click extends a border, right click retracts the border.", engine.FontMain);
            DisplayText = new ScreenText(this, "#", engine.FontMain);
            UpdateText();
            AddElement(DisplayText);
            AddElement(new ScreenButton(this, "Update Room", engine.FontMain));

            Vector2 _tl = new Vector2(Screen.boarderSize, GetTotalElementHeight());
            Vector2 _sz = new Vector2(32, 32);
            Vector2 _left = new Vector2(32, 0);
            Vector2 _down = new Vector2(0, 32);
            ScreenPictureButton BTop = new ScreenPictureButton(this, "Up Border", engine.textureManager.Dic["uparrow"], _tl + _left, _sz);
            ScreenPictureButton BLeft = new ScreenPictureButton(this, "Left Border", engine.textureManager.Dic["leftarrow"], _tl + _down, _sz);
            ScreenPictureButton BRight = new ScreenPictureButton(this, "Right Border", engine.textureManager.Dic["rightarrow"], _tl + _down + _left * 2, _sz);
            ScreenPictureButton BFront = new ScreenPictureButton(this, "Down Border", engine.textureManager.Dic["downarrow"], _tl + _down + _left, _sz);
            this.AddElement(BTop);
            this.AddElement(BLeft);
            this.AddElement(BRight);
            this.AddElement(BFront);
            ScreenPictureButton BBack = new ScreenPictureButton(this, "ZUp", engine.textureManager.Dic["uparrow"], _tl + _left * 4, _sz);
            ScreenPictureButton BBottom = new ScreenPictureButton(this, "ZDown", engine.textureManager.Dic["downarrow"], _tl + _down + _left * 4, _sz);
            this.AddElement(BBack);
            this.AddElement(BBottom);

            AddCloseButton(engine);
        }
예제 #2
0
 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;
 }