1 /* 2 * Copyright (C) 2015-2020 by the Widelands Development Team 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 * 18 */ 19 20 #ifndef WL_WUI_SUGGESTED_TEAMS_BOX_H 21 #define WL_WUI_SUGGESTED_TEAMS_BOX_H 22 23 #include "logic/widelands.h" 24 #include "ui_basic/box.h" 25 #include "ui_basic/icon.h" 26 #include "ui_basic/textarea.h" 27 28 namespace UI { 29 30 struct SuggestedTeamsBox : public UI::Box { 31 SuggestedTeamsBox(Panel* parent, 32 int32_t x, 33 int32_t y, 34 uint32_t orientation, 35 int32_t padding, 36 int32_t indent, 37 int32_t max_x = 0, 38 int32_t max_y = 0); 39 ~SuggestedTeamsBox(); 40 41 void hide(); 42 void show(const std::vector<Widelands::SuggestedTeamLineup>& suggested_teams); 43 44 private: 45 int32_t const padding_; 46 int32_t const indent_; 47 int32_t const label_height_; 48 UI::Textarea* suggested_teams_box_label_; 49 UI::Box* lineup_box_; 50 std::vector<UI::Icon*> player_icons_; 51 std::vector<UI::Textarea*> vs_labels_; 52 std::vector<Widelands::SuggestedTeamLineup> suggested_teams_; 53 }; 54 } // namespace UI 55 56 #endif // end of include guard: WL_WUI_SUGGESTED_TEAMS_BOX_H 57