1 #ifndef SPRINGLOBBY_HEADERGUARD_ICONIMAGELIST_H 2 #define SPRINGLOBBY_HEADERGUARD_ICONIMAGELIST_H 3 4 5 #include <wx/imaglist.h> 6 #include <map> 7 #include <vector> 8 9 class IBattle; 10 class wxColour; 11 struct UserStatus; 12 13 class IconImageList : public wxImageList 14 { 15 public: 16 IconImageList(); 17 18 int GetUserListStateIcon( const UserStatus& us, bool chanop, bool inbroom ) const; 19 int GetUserBattleStateIcon( const UserStatus& us ) const; 20 21 int GetRankLimitIcon( int rank, bool showlowest = true ) const; 22 int GetRankIcon( const unsigned int& rank, const bool& showlowest = true ) const; 23 int GetFlagIcon( const wxString& flagname ) const; 24 int GetBattleStatusIcon( const IBattle& battle ) const; 25 wxString GetBattleStatus(const IBattle& battle) const; 26 int GetHostIcon( const bool& spectator = false ) const; 27 int GetColourIcon( const wxColour& colour ) const; 28 void SetColourIcon( const wxColour& colour ); 29 int GetSideIcon( const wxString& modname, int side ); 30 int GetReadyIcon( const bool& spectator, const bool& ready, const unsigned int& sync, const bool& bot ); 31 32 int ICON_NONE; 33 34 int ICON_ADMIN; 35 int ICON_ADMIN_AWAY; 36 int ICON_ADMIN_BROOM; 37 int ICON_ADMIN_INGAME; 38 39 int ICON_BOT; 40 int ICON_BOT_BROOM; 41 int ICON_BOT_INGAME; 42 int ICON_BOT_AWAY; 43 44 int ICON_NOSTATE; 45 int ICON_AWAY; 46 int ICON_BROOM; 47 int ICON_INGAME; 48 49 int ICON_OP; 50 int ICON_OP_AWAY; 51 int ICON_OP_BROOM; 52 int ICON_OP_INGAME; 53 54 int ICON_UP; 55 int ICON_DOWN; 56 57 int ICON_RANK_NONE; 58 int ICON_RANK_UNKNOWN; 59 int ICON_RANK1; 60 int ICON_RANK2; 61 int ICON_RANK3; 62 int ICON_RANK4; 63 int ICON_RANK5; 64 int ICON_RANK6; 65 int ICON_RANK7; 66 int ICON_RANK8; 67 68 int ICON_GAME_UNKNOWN; 69 int ICON_OPEN_GAME; 70 int ICON_OPEN_PW_GAME; 71 int ICON_OPEN_FULL_PW_GAME; 72 int ICON_OPEN_FULL_GAME; 73 int ICON_CLOSED_GAME; 74 int ICON_CLOSED_PW_GAME; 75 int ICON_CLOSED_FULL_PW_GAME; 76 int ICON_CLOSED_FULL_GAME; 77 int ICON_STARTED_GAME; 78 int ICON_STARTED_GAME_LOCKED; 79 80 int ICON_READY_UNSYNC; 81 int ICON_NREADY_UNSYNC; 82 int ICON_READY_QSYNC; 83 int ICON_NREADY_QSYNC; 84 int ICON_NREADY; 85 int ICON_READY; 86 87 int ICON_NEXISTS; 88 int ICON_EXISTS; 89 90 int ICON_SPECTATOR; 91 int ICON_HOST; 92 int ICON_HOST_SPECTATOR; 93 94 int ICON_SIDEPIC_0; 95 int ICON_SIDEPIC_1; 96 97 //int ICON_FIXCOLOURS_PALETTE; 98 99 int ICON_UNK_FLAG; 100 int ICON_FLAGS_BASE; 101 102 int ICON_WARNING_OVERLAY; 103 104 int ICON_CHANNEL_OPTIONS; 105 106 int ICON_EMPTY; 107 108 int ICON_SPRINGLOBBY; 109 110 protected: 111 std::map<wxString, int> m_cached_side_icons; 112 // why map? because i already included and didn't want to include more stuff, it's not time-critical code anyway 113 typedef std::map<wxString, unsigned int> 114 PlayerColourMap; 115 PlayerColourMap m_player_colour_icons; 116 117 std::vector<int> m_rank_requirements; 118 int m_minimum_rank_requirement_border; 119 120 typedef std::map<int,int> IndexMap; 121 IndexMap m_state_index_map; 122 }; 123 124 IconImageList& icons(); 125 126 #endif // SPRINGLOBBY_HEADERGUARD_ICONIMAGELIST_H 127 128 /** 129 This file is part of SpringLobby, 130 Copyright (C) 2007-2011 131 132 SpringLobby is free software: you can redistribute it and/or modify 133 it under the terms of the GNU General Public License version 2 as published by 134 the Free Software Foundation. 135 136 SpringLobby is distributed in the hope that it will be useful, 137 but WITHOUT ANY WARRANTY; without even the implied warranty of 138 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 139 GNU General Public License for more details. 140 141 You should have received a copy of the GNU General Public License 142 along with SpringLobby. If not, see <http://www.gnu.org/licenses/>. 143 **/ 144 145