Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
guiItemImage.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5#pragma once
6
8#include "util/string.h"
9
10class Client;
11
12class GUIItemImage : public gui::IGUIElement
13{
14public:
15 GUIItemImage(gui::IGUIEnvironment *env, gui::IGUIElement *parent, s32 id,
16 const core::rect<s32> &rectangle, const std::string &item_name,
17 gui::IGUIFont *font, Client *client);
18
19 virtual void draw() override;
20
21 virtual void setText(const wchar_t *text) override
22 {
23 m_label = text;
24 }
25
26private:
27 std::string m_item_name;
28 gui::IGUIFont *m_font;
30 core::stringw m_label;
31};
Definition client.h:105
Definition guiItemImage.h:13
gui::IGUIFont * m_font
Definition guiItemImage.h:28
core::stringw m_label
Definition guiItemImage.h:30
virtual void setText(const wchar_t *text) override
Definition guiItemImage.h:21
std::string m_item_name
Definition guiItemImage.h:27
Client * m_client
Definition guiItemImage.h:29
virtual void draw() override
Definition guiItemImage.cpp:19
GUIItemImage(gui::IGUIEnvironment *env, gui::IGUIElement *parent, s32 id, const core::rect< s32 > &rectangle, const std::string &item_name, gui::IGUIFont *font, Client *client)
Definition guiItemImage.cpp:11
Definition activeobjectmgr.cpp:11