Luanti 5.15.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
7#include <IGUIElement.h>
8#include <IGUIEnvironment.h>
9
10
11class Client;
12
13class GUIItemImage : public gui::IGUIElement
14{
15public:
16 GUIItemImage(gui::IGUIEnvironment *env, gui::IGUIElement *parent, s32 id,
17 const core::rect<s32> &rectangle, const std::string &item_name,
18 gui::IGUIFont *font, Client *client);
19
20 virtual void draw() override;
21
22 virtual void setText(const wchar_t *text) override
23 {
24 m_label = text;
25 }
26
27private:
28 std::string m_item_name;
29 gui::IGUIFont *m_font;
31 core::stringw m_label;
32};
Definition client.h:106
Definition guiItemImage.h:14
gui::IGUIFont * m_font
Definition guiItemImage.h:29
core::stringw m_label
Definition guiItemImage.h:31
virtual void setText(const wchar_t *text) override
Definition guiItemImage.h:22
std::string m_item_name
Definition guiItemImage.h:28
Client * m_client
Definition guiItemImage.h:30
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