Many enhancements in client API

* Fix issues in item use
* Stack animated texts values
* Add utility functions for changing creature color and jumping
* Add some new extended functionality
* Improve map shader API
This commit is contained in:
Eduardo Bart
2013-01-09 17:29:58 -02:00
parent aeb31f0669
commit cce2976156
38 changed files with 832 additions and 118 deletions

View File

@@ -29,6 +29,8 @@
StaticText::StaticText()
{
m_mode = Otc::MessageNone;
m_color = Color::white;
m_cachedText.setFont(g_fonts.getFont("verdana-11px-rounded"));
m_cachedText.setAlign(Fw::AlignCenter);
}
@@ -47,6 +49,16 @@ void StaticText::drawText(const Point& dest, const Rect& parentRect)
//}
}
void StaticText::setFont(const std::string& fontName)
{
m_cachedText.setFont(g_fonts.getFont(fontName));
}
void StaticText::setText(const std::string& text)
{
m_cachedText.setText(text);
}
bool StaticText::addMessage(const std::string& name, Otc::MessageMode mode, const std::string& text)
{
//TODO: this could be moved to lua