← Back to team overview

widelands-dev team mailing list archive

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

 

GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1322741 into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1322741 in widelands: "text issue: fps statistics overlaps with xz coordinates"
  https://bugs.launchpad.net/widelands/+bug/1322741

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1322741/+merge/227626

Debug overlay: Made FPS string smaller and moved coordinate information to bottom right.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1322741/+merge/227626
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1322741 into lp:widelands.
=== 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 @@
 ===============
 */
 void Interactive_Base::draw_overlay(RenderTarget& dst) {
-	// Blit node information when in debug mode.
-	if (get_display_flag(dfDebug) or not dynamic_cast<const Game*>(&egbase())) {
-		static format node_format("%3i %3i");
+	// Blit node information when in debug mode or if the chat window is on.
+	if (get_display_flag(dfDebug) || !dynamic_cast<const Game*>(&egbase())) {
+		static format node_format("(%i, %i)");
 		const std::string node_text = as_uifont
-			((node_format % m_sel.pos.node.x % m_sel.pos.node.y).str(), UI_FONT_SIZE_BIG);
-		dst.blit(Point(5, 5), UI::g_fh1->render(node_text), CM_Normal, UI::Align_Left);
+			((node_format % m_sel.pos.node.x % m_sel.pos.node.y).str(), UI_FONT_SIZE_SMALL);
+		dst.blit(Point(get_w() - 5, get_h() - 5), UI::g_fh1->render(node_text), CM_Normal, UI::Align_BottomRight);
 	}
 
 	// Blit FPS when in debug mode.
@@ -415,8 +415,8 @@
 		const std::string fps_text = as_uifont
 			((fps_format %
 			  (1000.0 / m_frametime) % (1000.0 / (m_avg_usframetime / 1000)))
-			 .str(), UI_FONT_SIZE_BIG);
-		dst.blit(Point(90, 5), UI::g_fh1->render(fps_text), CM_Normal, UI::Align_Left);
+			 .str(), UI_FONT_SIZE_SMALL);
+		dst.blit(Point(5, 5), UI::g_fh1->render(fps_text), CM_Normal, UI::Align_Left);
 	}
 }
 


Follow ups