Merge lp:~widelands-dev/widelands/bug-1322741 into lp:widelands

Proposed by GunChleoc
Status: Merged
Merged at revision: 7123
Proposed branch: lp:~widelands-dev/widelands/bug-1322741
Merge into: lp:widelands
Diff against target: 31 lines (+7/-7)
1 file modified
src/wui/interactive_base.cc (+7/-7)
To merge this branch: bzr merge lp:~widelands-dev/widelands/bug-1322741
Reviewer Review Type Date Requested Status
SirVer Approve
Review via email: mp+227626@code.launchpad.net

Description of the change

Debug overlay: Made FPS string smaller and moved coordinate information to bottom right.

To post a comment you must log in.
Revision history for this message
SirVer (sirver) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/wui/interactive_base.cc'
--- src/wui/interactive_base.cc 2014-07-16 06:41:27 +0000
+++ src/wui/interactive_base.cc 2014-07-21 19:59:45 +0000
@@ -401,12 +401,12 @@
401===============401===============
402*/402*/
403void Interactive_Base::draw_overlay(RenderTarget& dst) {403void Interactive_Base::draw_overlay(RenderTarget& dst) {
404 // Blit node information when in debug mode.404 // Blit node information when in debug mode or if the chat window is on.
405 if (get_display_flag(dfDebug) or not dynamic_cast<const Game*>(&egbase())) {405 if (get_display_flag(dfDebug) || !dynamic_cast<const Game*>(&egbase())) {
406 static format node_format("%3i %3i");406 static format node_format("(%i, %i)");
407 const std::string node_text = as_uifont407 const std::string node_text = as_uifont
408 ((node_format % m_sel.pos.node.x % m_sel.pos.node.y).str(), UI_FONT_SIZE_BIG);408 ((node_format % m_sel.pos.node.x % m_sel.pos.node.y).str(), UI_FONT_SIZE_SMALL);
409 dst.blit(Point(5, 5), UI::g_fh1->render(node_text), CM_Normal, UI::Align_Left);409 dst.blit(Point(get_w() - 5, get_h() - 5), UI::g_fh1->render(node_text), CM_Normal, UI::Align_BottomRight);
410 }410 }
411411
412 // Blit FPS when in debug mode.412 // Blit FPS when in debug mode.
@@ -415,8 +415,8 @@
415 const std::string fps_text = as_uifont415 const std::string fps_text = as_uifont
416 ((fps_format %416 ((fps_format %
417 (1000.0 / m_frametime) % (1000.0 / (m_avg_usframetime / 1000)))417 (1000.0 / m_frametime) % (1000.0 / (m_avg_usframetime / 1000)))
418 .str(), UI_FONT_SIZE_BIG);418 .str(), UI_FONT_SIZE_SMALL);
419 dst.blit(Point(90, 5), UI::g_fh1->render(fps_text), CM_Normal, UI::Align_Left);419 dst.blit(Point(5, 5), UI::g_fh1->render(fps_text), CM_Normal, UI::Align_Left);
420 }420 }
421}421}
422422

Subscribers

People subscribed via source and target branches

to status/vote changes: