Beispiel #1
0
 public Button(string text, Point top_left_corner, int size, Colour color, float width, float height, Action action) : base(top_left_corner) //MISSING CODE
 {
     this.action          = action;
     this.width           = width;
     this.height          = height;
     this.color           = color;
     this.top_left_corner = top_left_corner;
     this.label           = new Label(text, top_left_corner, size, Colour.Black);
 }
 public Button(string text, Point top_left_corner, int size, Colour color, float width, float height, Action action) : base(top_left_corner)
     //MISSING CODE - DONE - Added :base(top_left_corner) + public GuiElement label + "this" code for label and top_left_corner
 {
     this.action          = action;
     this.width           = width;
     this.height          = height;
     this.color           = color;
     this.top_left_corner = top_left_corner;
     this.label           = new Label(text, top_left_corner, size, Colour.Black);
 }
Beispiel #3
0
        public void DrawGui(GuiManager gui_manager)
        {
            int listcount = gui_manager.elements.Count;

            for (int i = 0; i < listcount; i++)
            {
                GuiElement element = gui_manager.elements[i];
                element.Draw(this);
            }
        }