| 1 |
/*************************************************************************** |
| 2 |
* Copyright (C) 2005-2019 by the FIFE team * |
| 3 |
* http://www.fifengine.net * |
| 4 |
* This file is part of FIFE. * |
| 5 |
* * |
| 6 |
* FIFE is free software; you can redistribute it and/or * |
| 7 |
* modify it under the terms of the GNU Lesser General Public * |
| 8 |
* License as published by the Free Software Foundation; either * |
| 9 |
* version 2.1 of the License, or (at your option) any later version. * |
| 10 |
* * |
| 11 |
* This library is distributed in the hope that it will be useful, * |
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * |
| 14 |
* Lesser General Public License for more details. * |
| 15 |
* * |
| 16 |
* You should have received a copy of the GNU Lesser General Public * |
| 17 |
* License along with this library; if not, write to the * |
| 18 |
* Free Software Foundation, Inc., * |
| 19 |
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * |
| 20 |
***************************************************************************/ |
| 21 |
|
| 22 |
#ifndef FIFE_BLOCKINGINFORENDERER_H |
| 23 |
#define FIFE_BLOCKINGINFORENDERER_H |
| 24 |
|
| 25 |
// Standard C++ library includes |
| 26 |
|
| 27 |
// 3rd party library includes |
| 28 |
|
| 29 |
// FIFE includes |
| 30 |
// These includes are split up in two parts, separated by one empty line |
| 31 |
// First block: files included from the FIFE root src directory |
| 32 |
// Second block: files included from the same folder |
| 33 |
#include "view/rendererbase.h" |
| 34 |
|
| 35 |
namespace FIFE { |
| 36 |
class RenderBackend; |
| 37 |
|
| 38 |
class BlockingInfoRenderer: public RendererBase { |
| 39 |
public: |
| 40 |
/** Constructor. |
| 41 |
* |
| 42 |
* @param renderbackend The renderbackend to use. |
| 43 |
* @param position The position for this renderer in rendering pipeline. |
| 44 |
* @ see setPipelinePosition |
| 45 |
*/ |
| 46 |
BlockingInfoRenderer(RenderBackend* renderbackend, int32_t position); |
| 47 |
|
| 48 |
/** Copy Constructor. |
| 49 |
*/ |
| 50 |
BlockingInfoRenderer(const BlockingInfoRenderer& old); |
| 51 |
|
| 52 |
/** Makes copy of this renderer. |
| 53 |
*/ |
| 54 |
RendererBase* clone(); |
| 55 |
|
| 56 |
/** Destructor. |
| 57 |
*/ |
| 58 |
virtual ~BlockingInfoRenderer(); |
| 59 |
|
| 60 |
/** Returns the renderer name. |
| 61 |
* |
| 62 |
* @return The name as string. |
| 63 |
*/ |
| 64 |
std::string getName() { return "BlockingInfoRenderer"; } |
| 65 |
|
| 66 |
/** This method is called by the view to ask renderer to draw its rendering aspect based on |
| 67 |
* given parameters. |
| 68 |
* |
| 69 |
* @param cam Camera view to draw |
| 70 |
* @param layer Current layer to be rendered |
| 71 |
* @param instances Instances on the current layer |
| 72 |
*/ |
| 73 |
void render(Camera* cam, Layer* layer, RenderList& instances); |
| 74 |
|
| 75 |
/** Changes the used color. |
| 76 |
* |
| 77 |
* @param r The value for red, range 0-255. |
| 78 |
* @param g The value for green, range 0-255. |
| 79 |
* @param b The value for blue, range 0-255. |
| 80 |
*/ |
| 81 |
void setColor(uint8_t r, uint8_t g, uint8_t b); |
| 82 |
|
| 83 |
/** Gets instance for interface access. |
| 84 |
*/ |
| 85 |
static BlockingInfoRenderer* getInstance(IRendererContainer* cnt); |
| 86 |
|
| 87 |
private: |
| 88 |
//! currently used color |
| 89 |
SDL_Color m_color; |
| 90 |
}; |
| 91 |
} |
| 92 |
|
| 93 |
#endif |