Minetest 5.9.0-dev
 
Loading...
Searching...
No Matches
guiItemImage.h
Go to the documentation of this file.
1/*
2Minetest
3Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5This program is free software; you can redistribute it and/or modify
6it under the terms of the GNU Lesser General Public License as published by
7the Free Software Foundation; either version 2.1 of the License, or
8(at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU Lesser General Public License for more details.
14
15You should have received a copy of the GNU Lesser General Public License along
16with this program; if not, write to the Free Software Foundation, Inc.,
1751 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18*/
19
20#pragma once
21
23#include "util/string.h"
24
25class Client;
26
27class GUIItemImage : public gui::IGUIElement
28{
29public:
30 GUIItemImage(gui::IGUIEnvironment *env, gui::IGUIElement *parent, s32 id,
31 const core::rect<s32> &rectangle, const std::string &item_name,
32 gui::IGUIFont *font, Client *client);
33
34 virtual void draw() override;
35
36 virtual void setText(const wchar_t *text) override
37 {
38 m_label = text;
39 }
40
41private:
42 std::string m_item_name;
43 gui::IGUIFont *m_font;
45 core::stringw m_label;
46};
Definition: client.h:119
Definition: guiItemImage.h:28
gui::IGUIFont * m_font
Definition: guiItemImage.h:43
core::stringw m_label
Definition: guiItemImage.h:45
virtual void setText(const wchar_t *text) override
Definition: guiItemImage.h:36
std::string m_item_name
Definition: guiItemImage.h:42
Client * m_client
Definition: guiItemImage.h:44
virtual void draw() override
Definition: guiItemImage.cpp:32
Definition: activeobjectmgr.cpp:26