mirror of
https://github.com/edubart/otclient.git
synced 2025-10-20 06:23:26 +02:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user