1 // 2 // SuperTuxKart - a fun racing game with go-kart 3 // Copyright (C) 2014-2015 Joerg Henrichs 4 // 5 // This program is free software; you can redistribute it and/or 6 // modify it under the terms of the GNU General Public License 7 // as published by the Free Software Foundation; either version 3 8 // of the License, or (at your option) any later version. 9 // 10 // This program is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU General Public License for more details. 14 // 15 // You should have received a copy of the GNU General Public License 16 // along with this program; if not, write to the Free Software 17 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 19 #ifndef HEADER_MESSAGE_QUEUE_HPP 20 #define HEADER_MESSAGE_QUEUE_HPP 21 22 #include "guiengine/widgets/label_widget.hpp" 23 24 #include "irrString.h" 25 26 #include <queue> 27 #include <vector> 28 29 using namespace irr; 30 31 namespace MessageQueue 32 { 33 /** The various message type which can be shown (which might use a 34 * different look. This type is used to sort the messages, so it is 35 * important that messages that need to be shown as early as possible 36 * will be listed last (i.e. have highest priority). */ 37 enum MessageType 38 { 39 MT_FRIEND, 40 MT_ACHIEVEMENT, 41 MT_GENERIC, 42 MT_ERROR, 43 MT_PROGRESS 44 }; 45 46 void add(MessageType mt, const core::stringw &message); 47 void addStatic(MessageType mt, const core::stringw &message); 48 void showProgressBar(int progress, const core::stringw& msg); 49 void updatePosition(); 50 void update(float dt); 51 void discardStatic(); 52 void resetGlobalVariables(); 53 }; // namespace GUIEngine 54 #endif 55