mirror of
https://github.com/edubart/otclient.git
synced 2025-10-19 14:03:26 +02:00
back to otclient dev, with new background!
* show otclient version in background * disable about module (don't really need it) * new function for formating strings like sprintf, Fw::formatString * new nice background (taken from RPG maker XV) * update contact information in README * fix text rendering issues with opacity
This commit is contained in:
@@ -41,7 +41,7 @@ void UIFrameCounter::draw()
|
||||
UIWidget::draw();
|
||||
|
||||
if(g_clock.ticksElapsed(m_lastFrameTicks) >= 1000) {
|
||||
m_fpsText = Fw::mkstr("FPS: ", m_frameCount);
|
||||
m_fpsText = Fw::formatString("FPS: %d", m_frameCount);
|
||||
m_lastFrameTicks = g_clock.ticks();
|
||||
m_frameCount = 0;
|
||||
}
|
||||
|
@@ -61,9 +61,10 @@ void UIWidget::drawText(const Rect& screenCoords)
|
||||
m_textFramebuffer->bind();
|
||||
Rect virtualTextRect(0, 0, boxSize);
|
||||
virtualTextRect.translate(m_textOffset);
|
||||
g_painter.saveAndResetState();
|
||||
g_painter.setCompositionMode(Painter::CompositionMode_DestBlending);
|
||||
m_font->renderText(m_text, virtualTextRect, m_textAlign, Fw::white);
|
||||
g_painter.resetCompositionMode();
|
||||
g_painter.restoreSavedState();
|
||||
m_textFramebuffer->release();
|
||||
|
||||
m_textMustRecache = false;
|
||||
|
Reference in New Issue
Block a user