public Tab (Texture2D icon, Texture2D background, int order, string title, int width) { this.buttons = new List<Button>(); this.collapsed = true; this.order = order; this.icon = icon; Icon = new Button(icon, new Vector2(globals.Width-40, 10 + this.order * 40), 40, 40); this.background = background; this.title = title; this.width = width; }
public Time() { Timer = 0; Gametimestamp = 0; Week_day = 0; Day = 0; Step = 1000; Pause = new Button(globals.games_pause, new Vector2(170, 5), 25, 25); Speed = new Button(new List<Texture2D> { globals.game_normal, globals.game_fast, globals.game_faster }, new Vector2(200, 5), 25, 25); Speed.type = 1; current_state = time_flow.Normal; location = new Vector2(0, 0); }
public Window_tab( Texture2D open_texture, Texture2D closed_texture, Airport AIRPORT ,Rectangle Position, Rectangle tab_position, bool open, Tab_type Type) { this.flights = new List<Flight>(); this.selected = new Button(open_texture, tab_position); this.not_selected = new Button(closed_texture, tab_position); this.open = open; this.tab_location = tab_position; this.Location = Position; this.airport = AIRPORT; this.Type = Type; if (Type == Tab_type.departure) { for (int i = 0; i < globals.Flights.Count(); i++) { bool departure = (globals.Flights[i].origin == this.airport); if (departure && !globals.Flights[i].flightComplete) { this.flights.Add(globals.Flights[i]); } } this.Title = "DEPARTURES"; this.list = new List_items(this.flights, this.Location, list_type.airport_board_d); } else if (Type == Tab_type.arrival) { for (int i = 0; i < globals.Flights.Count(); i++) { bool arrival = (globals.Flights[i].destination == this.airport); if (arrival && !globals.Flights[i].flightComplete) { this.flights.Add(globals.Flights[i]); } } this.Title = "ARRIVALS"; this.list = new List_items(this.flights, this.Location, list_type.airport_board_a); } // eventually we should change that to another type to give us a little more room and more details.... }
public void add_button(Button newB) { buttons.Add(newB); }