Merge lp:~alocritani/widelands/resource_info_in_editor into lp:widelands

Proposed by Angelo Locritani
Status: Merged
Merged at revision: 6323
Proposed branch: lp:~alocritani/widelands/resource_info_in_editor
Merge into: lp:widelands
Diff against target: 32 lines (+22/-0)
1 file modified
src/editor/tools/editor_info_tool.cc (+22/-0)
To merge this branch: bzr merge lp:~alocritani/widelands/resource_info_in_editor
Reviewer Review Type Date Requested Status
Widelands Developers Pending
Review via email: mp+98110@code.launchpad.net

Description of the change

Added to info tool information regarding resource name and amount

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/editor/tools/editor_info_tool.cc'
--- src/editor/tools/editor_info_tool.cc 2012-02-21 13:52:14 +0000
+++ src/editor/tools/editor_info_tool.cc 2012-03-18 20:34:23 +0000
@@ -89,6 +89,28 @@
89 buf += buf1;89 buf += buf1;
90 }90 }
9191
92 buf += _("3) Resources Info\n");
93 {
94 Widelands::Resource_Index ridx = f.get_resources();
95 int ramount = f.get_resources_amount();
96
97 if (ramount > 0){
98 snprintf
99 (buf1, sizeof(buf1), _("Resource name: %s\n"), world.get_resource(ridx)->name().c_str());
100 }
101 else
102 {
103 snprintf
104 (buf1, sizeof(buf1), _("Resource name: %s\n"), _("<none>"));
105 }
106
107 buf += buf1;
108
109 snprintf
110 (buf1, sizeof(buf1), _("Resource amount: %i\n"), ramount);
111 buf += buf1;
112 }
113
92 buf += _("4) Map Info\n Name: ");114 buf += _("4) Map Info\n Name: ");
93 buf += map.get_name();115 buf += map.get_name();
94 snprintf116 snprintf

Subscribers

People subscribed via source and target branches

to status/vote changes: