27 lines
658 B
C++
27 lines
658 B
C++
#pragma once
|
|
|
|
#include "libtcod.hpp"
|
|
|
|
class Gui {
|
|
public:
|
|
Gui(tcod::Context *ctx, tcod::Console *root);
|
|
~Gui();
|
|
void render();
|
|
void message(const TCOD_ColorRGB& col, const char* text, ...);
|
|
|
|
protected:
|
|
tcod::Console con;
|
|
tcod::Console* root;
|
|
void renderBar(int x, int y, int width, std::string name,
|
|
float value, float maxValue, const TCOD_ColorRGB& barColor,
|
|
const TCOD_ColorRGB& backColor);
|
|
void renderMouseLook();
|
|
struct Message {
|
|
std::string text;
|
|
TCOD_ColorRGB col;
|
|
Message(std::string text, const TCOD_ColorRGB& col);
|
|
~Message();
|
|
};
|
|
|
|
TCODList<Message*> log;
|
|
}; |