- Warnings completely suppressed for the included TinyXML and gzstream libraries - Parentheses warnings are now errors, since there were several that looked like bugs - Ditto for dangling else warnings Some of these warnings were actually bugs: - Town wandering monsters would have never spawned, because the code to do so was accidentally nested within a check for overall_mode == MODE_OUTDOORS ---> boe.monster.cpp, lines 105-137 - Monster's behaviour with respect to elemental fields did not correctly depend on their immunities (this is the same precedence issue Sylae messed up fixing in the Windows code) ---> boe.monsters.cpp, lines 345-359 - Display of damage blocked by armour appeared to be incorrect (needs verification) ---> boe.newgraph.cpp, line 1079 - Three-choice dialogs probably weren't dealing with unusual button types correctly, though that's a minor point since they aren't expected to use such buttons
43 lines
1.0 KiB
C++
43 lines
1.0 KiB
C++
/*
|
|
* message.h
|
|
* BoE
|
|
*
|
|
* Created by Celtic Minstrel on 11/05/09.
|
|
*
|
|
*/
|
|
|
|
#ifndef MESSAGE_H
|
|
#define MESSAGE_H
|
|
|
|
#include <SFML/Graphics.hpp>
|
|
|
|
#include <string>
|
|
#include "control.h"
|
|
#include "graphtool.h" // for eFont
|
|
|
|
class cTextMsg : public cControl {
|
|
public:
|
|
void attachClickHandler(click_callback_t f) throw();
|
|
void attachFocusHandler(focus_callback_t f) throw(xHandlerNotSupported);
|
|
bool triggerClickHandler(cDialog& me, std::string id, eKeyMod mods);
|
|
void setFormat(eFormat prop, short val) throw(xUnsupportedProp);
|
|
short getFormat(eFormat prop) throw(xUnsupportedProp);
|
|
void setColour(sf::Color clr) throw(xUnsupportedProp);
|
|
sf::Color getColour() throw(xUnsupportedProp);
|
|
explicit cTextMsg(cDialog& parent);
|
|
explicit cTextMsg(sf::RenderWindow& parent);
|
|
bool isClickable();
|
|
virtual ~cTextMsg();
|
|
void draw();
|
|
cTextMsg& operator=(cTextMsg& other) = delete;
|
|
cTextMsg(cTextMsg& other) = delete;
|
|
private:
|
|
bool drawFramed, clickable;
|
|
short textSize;
|
|
eFont textFont;
|
|
sf::Color color;
|
|
std::string fromList;
|
|
click_callback_t onClick;
|
|
};
|
|
#endif
|