예제 #1
0
파일: TextBox.cs 프로젝트: kjchiu/zomgame-2
 public TextBox(int x, int y, int width, int height, Screen screen, IEnumerable<string> _messages, SpriteFont _font, Color _color)
     : base(x, y, width, height, screen)
 {
     font = _font;
     textReader = new TextReader(font, width);
     messages = _messages;
     color = _color;
 }
예제 #2
0
파일: Panel.cs 프로젝트: kjchiu/zomgame-2
 public Panel(int x, int y, int width, int height, Color backgroundColour, Color BorderColour, Screen screen)
     : base(x, y, width, height)
 {
     margin = 5;
     border = 1;
     Screen = screen;
     BackgroundColour = backgroundColour;
     BorderColour = BorderColour;
 }
예제 #3
0
 protected GameState(Game game, Screen screen)
 {
     this.spriteBatch = game.SpriteBatch;
     this.player = game.Player;
     this.map = game.Map;
     this.entities = game.Entities;
     this.Exit = game.Exit;
     this.font = game.Font;
     Screen = screen;
 }
예제 #4
0
 public MessageLog(int x, int y, int width, int height, Screen screen, Color color)
     : base(x, y, width, height, screen, String.Empty)
 {
     MessageBus.Instance.AddListener(this);
     int textHeight = (int)Font.MeasureString("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!?").Y;
     this.bufferSize = (int)Math.Floor((float)(height - (2 * margin)) / textHeight);
     this.color = color;
     buffer = new Queue<string>();
     base.messages = buffer as IEnumerable<string>;
 }
예제 #5
0
파일: TextBox.cs 프로젝트: kjchiu/zomgame-2
 public TextBox(int x, int y, int width, int height, Screen screen, IEnumerable<string> _messages)
     : this(x, y, width, height, screen, _messages, GraphicsDispenser.GetFont("Calibri"), Color.Gold)
 {
 }
예제 #6
0
파일: TextBox.cs 프로젝트: kjchiu/zomgame-2
 public TextBox(int x, int y, int width, int height, Screen screen, string _message)
     : this(x, y, width, height, screen, new string[] { _message })
 {
 }
예제 #7
0
 public InteractivePanel(int x, int y, int width, int height, Screen screen)
     : base(x, y, width, height, screen)
 {
 }
예제 #8
0
파일: Panel.cs 프로젝트: kjchiu/zomgame-2
 public Panel(int x, int y, int width, int height, Screen screen)
     : this(x, y, width, height, Color.Black, Color.DarkGray, screen)
 {
 }
예제 #9
0
 public MessageLog(int x, int y, int width, int height, Screen screen)
     : this(x, y, width, height, screen, new Color(0xEB, 0xC0, 0x2C))
 {
 }