widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #03113
[Merge] lp:~widelands-dev/widelands/bug-768826 into lp:widelands
TiborB has proposed merging lp:~widelands-dev/widelands/bug-768826 into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #768826 in widelands: "Show altitude level in the editor"
https://bugs.launchpad.net/widelands/+bug/768826
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-768826/+merge/242544
This adds information about height into bottom right corner - next to x,y coordinates, hope you will find this useful.
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-768826 into lp:widelands.
=== modified file 'src/wui/interactive_base.cc'
--- src/wui/interactive_base.cc 2014-11-13 08:25:45 +0000
+++ src/wui/interactive_base.cc 2014-11-21 21:28:04 +0000
@@ -403,15 +403,18 @@
*/
void InteractiveBase::draw_overlay(RenderTarget& dst) {
+ const Map & map = egbase().map();
+
// Blit node information when in debug mode.
if (get_display_flag(dfDebug) || !dynamic_cast<const Game*>(&egbase())) {
const std::string gametime(gametimestring(egbase().get_gametime()));
const std::string gametime_text = as_uifont(gametime, UI_FONT_SIZE_SMALL);
- dst.blit(Point(5, 5), UI::g_fh1->render(gametime_text), CM_UseAlpha, UI::Align_TopLeft);
- static boost::format node_format("(%i, %i)");
+ static boost::format node_format("(%3i, %3i; %2i)");
+
+ const int32_t height=map[m_sel.pos.node].get_height();
const std::string node_text = as_uifont
- ((node_format % m_sel.pos.node.x % m_sel.pos.node.y).str(), UI_FONT_SIZE_SMALL);
+ ((node_format % m_sel.pos.node.x % m_sel.pos.node.y % height).str(), UI_FONT_SIZE_SMALL);
dst.blit(
Point(get_w() - 5, get_h() - 5),
UI::g_fh1->render(node_text),
Follow ups
-
[Merge] lp:~widelands-dev/widelands/bug-768826 into lp:widelands
From: noreply, 2014-11-27
-
Re: [Merge] lp:~widelands-dev/widelands/bug-768826 into lp:widelands
From: GunChleoc, 2014-11-27
-
Re: [Merge] lp:~widelands-dev/widelands/bug-768826 into lp:widelands
From: TiborB, 2014-11-27
-
Re: [Merge] lp:~widelands-dev/widelands/bug-768826 into lp:widelands
From: GunChleoc, 2014-11-27
-
Re: [Merge] lp:~widelands-dev/widelands/bug-768826 into lp:widelands
From: TiborB, 2014-11-27
-
Re: [Merge] lp:~widelands-dev/widelands/bug-768826 into lp:widelands
From: GunChleoc, 2014-11-27
-
Re: [Merge] lp:~widelands-dev/widelands/bug-768826 into lp:widelands
From: TiborB, 2014-11-26
-
Re: [Merge] lp:~widelands-dev/widelands/bug-768826 into lp:widelands
From: GunChleoc, 2014-11-26
-
Re: [Merge] lp:~widelands-dev/widelands/bug-768826 into lp:widelands
From: TiborB, 2014-11-26
-
Re: [Merge] lp:~widelands-dev/widelands/bug-768826 into lp:widelands
From: GunChleoc, 2014-11-26
-
Re: [Merge] lp:~widelands-dev/widelands/bug-768826 into lp:widelands
From: TiborB, 2014-11-26
-
Re: [Merge] lp:~widelands-dev/widelands/bug-768826 into lp:widelands
From: TiborB, 2014-11-25
-
Re: [Merge] lp:~widelands-dev/widelands/bug-768826 into lp:widelands
From: GunChleoc, 2014-11-22