Add warning when disabling secure.enable_security (#9943)
[oweals/minetest.git] / src / gui / guiBackgroundImage.h
1 /*
2 Part of Minetest
3 Copyright (C) 2013 RealBadAngel, Maciej Kasatkin <mk@realbadangel.pl>
4
5 Permission to use, copy, modify, and distribute this software for any
6 purpose with or without fee is hereby granted, provided that the above
7 copyright notice and this permission notice appear in all copies.
8
9 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18 #pragma once
19
20 #include "irrlichttypes_extrabloated.h"
21 #include "util/string.h"
22 #include "client/tile.h" // ITextureSource
23
24 class GUIBackgroundImage : public gui::IGUIElement
25 {
26 public:
27         GUIBackgroundImage(gui::IGUIEnvironment *env, gui::IGUIElement *parent, s32 id,
28                 const core::rect<s32> &rectangle, const std::string &name,
29                 const core::rect<s32> &middle, ISimpleTextureSource *tsrc, bool autoclip);
30
31         virtual void draw() override;
32
33 private:
34         std::string m_name;
35         core::rect<s32> m_middle;
36         ISimpleTextureSource *m_tsrc;
37         bool m_autoclip;
38 };