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
1=== modified file 'src/wui/interactive_base.cc'
2--- src/wui/interactive_base.cc 2014-07-16 06:41:27 +0000
3+++ src/wui/interactive_base.cc 2014-07-21 19:59:45 +0000
4@@ -401,12 +401,12 @@
5 ===============
6 */
7 void Interactive_Base::draw_overlay(RenderTarget& dst) {
8- // Blit node information when in debug mode.
9- if (get_display_flag(dfDebug) or not dynamic_cast<const Game*>(&egbase())) {
10- static format node_format("%3i %3i");
11+ // Blit node information when in debug mode or if the chat window is on.
12+ if (get_display_flag(dfDebug) || !dynamic_cast<const Game*>(&egbase())) {
13+ static format node_format("(%i, %i)");
14 const std::string node_text = as_uifont
15- ((node_format % m_sel.pos.node.x % m_sel.pos.node.y).str(), UI_FONT_SIZE_BIG);
16- dst.blit(Point(5, 5), UI::g_fh1->render(node_text), CM_Normal, UI::Align_Left);
17+ ((node_format % m_sel.pos.node.x % m_sel.pos.node.y).str(), UI_FONT_SIZE_SMALL);
18+ dst.blit(Point(get_w() - 5, get_h() - 5), UI::g_fh1->render(node_text), CM_Normal, UI::Align_BottomRight);
19 }
20
21 // Blit FPS when in debug mode.
22@@ -415,8 +415,8 @@
23 const std::string fps_text = as_uifont
24 ((fps_format %
25 (1000.0 / m_frametime) % (1000.0 / (m_avg_usframetime / 1000)))
26- .str(), UI_FONT_SIZE_BIG);
27- dst.blit(Point(90, 5), UI::g_fh1->render(fps_text), CM_Normal, UI::Align_Left);
28+ .str(), UI_FONT_SIZE_SMALL);
29+ dst.blit(Point(5, 5), UI::g_fh1->render(fps_text), CM_Normal, UI::Align_Left);
30 }
31 }
32

Subscribers

People subscribed via source and target branches

to status/vote changes: