]> git.lizzy.rs Git - dragonfireclient.git/blob - src/guiFurnaceMenu.cpp
modified iron amount a bit
[dragonfireclient.git] / src / guiFurnaceMenu.cpp
1 /*
2 Minetest-c55
3 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #include "guiFurnaceMenu.h"
21 #include "client.h"
22
23 GUIFurnaceMenu::GUIFurnaceMenu(
24                 gui::IGUIEnvironment* env,
25                 gui::IGUIElement* parent, s32 id,
26                 IMenuManager *menumgr,
27                 v3s16 nodepos,
28                 Client *client
29                 ):
30         GUIInventoryMenu(env, parent, id, menumgr, v2s16(8,9),
31                         client->getInventoryContext(), client),
32         m_nodepos(nodepos),
33         m_client(client)
34 {
35         std::string furnace_inv_id;
36         furnace_inv_id += "nodemeta:";
37         furnace_inv_id += itos(nodepos.X);
38         furnace_inv_id += ",";
39         furnace_inv_id += itos(nodepos.Y);
40         furnace_inv_id += ",";
41         furnace_inv_id += itos(nodepos.Z);
42
43         core::array<GUIInventoryMenu::DrawSpec> draw_spec;
44         draw_spec.push_back(GUIInventoryMenu::DrawSpec(
45                         "list", furnace_inv_id, "fuel",
46                         v2s32(2, 3), v2s32(1, 1)));
47         draw_spec.push_back(GUIInventoryMenu::DrawSpec(
48                         "list", furnace_inv_id, "src",
49                         v2s32(2, 1), v2s32(1, 1)));
50         draw_spec.push_back(GUIInventoryMenu::DrawSpec(
51                         "list", furnace_inv_id, "dst",
52                         v2s32(5, 1), v2s32(2, 2)));
53         draw_spec.push_back(GUIInventoryMenu::DrawSpec(
54                         "list", "current_player", "main",
55                         v2s32(0, 5), v2s32(8, 4)));
56         setDrawSpec(draw_spec);
57 }
58