public Game() { WaypointGraph.init("TestWaypointNeighbors.xml"); this.Title = "Minions of Death"; this.UpdateFrame += Game_UpdateFrame; this.RenderFrame += Game_RenderFrame; Mouse.Move += Mouse_Move; this.WindowBorder = WindowBorder.Fixed; this.Width = 1000; WindowWidth = this.Width; this.Height = 700; WindowHeight = this.Height; Sound.Load(); _map = new Sprite(new List<string>() { "Images/Map1.png" }, 0); _ui = new UserInterface(); #if GRAPHMAKER doc.Add(new XElement("Waypoints")); #endif }
public Select(int x, int y, bool staticImage, List<string> selections, Sprite background, List<string> backgroundFilenames) : base(x, y, 0, 0, staticImage) { _background = background; _buttons = new StackPanel(x, y, staticImage, false); selections.ForEach(e => _buttons.Children.Add(new Button(x, (int)(y + background.Height), (int)background.Width, (int)background.Height, false, e, new Sprite(backgroundFilenames, 0)))); }
public TextBlock(int x, int y, int width, int height, bool staticImage, string text, Sprite background) : base(x, y, width, height, staticImage) { _font = new QFont (SystemFonts.DialogFont); _background = background; _text = text; }
public StackPanel(int x, int y, int width, int height, bool staticImage, bool horizontal, Sprite verticalScrollBar, Sprite horizontalScrollBar) : base(x, y, width, height, staticImage) { _scrollable = true; _horizontal = horizontal; _verticalScrollbar = new ScrollBar((int)(x + width - verticalScrollBar.Width), y, (int)verticalScrollBar.Width, height, staticImage, 0, height, false, verticalScrollBar); _horizontalScrollbar = new ScrollBar(x, (int)(y + height - horizontalScrollBar.Height), width, (int)horizontalScrollBar.Height, staticImage, 0, width, true, horizontalScrollBar); }
public ScrollBar(int x, int y, int width, int height, bool staticImage, int minValue, int maxValue, bool horizontal, Sprite scrollBar) : base(x, y, width, height, staticImage) { _minValue = minValue; _maxValue = maxValue - (horizontal ? Game.WindowWidth : Game.WindowHeight); _horizontal = horizontal; _currentValue = minValue; _scrollBar = scrollBar; }
public Button(int x, int y, int width, int height, bool staticImage, string text, Sprite background) : base(x, y, width, height, staticImage, text, background) { }