guiButtonItemImage.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. Minetest
  3. Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU Lesser General Public License as published by
  6. the Free Software Foundation; either version 2.1 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public License along
  13. with this program; if not, write to the Free Software Foundation, Inc.,
  14. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  15. */
  16. #include "guiButton.h"
  17. #include "IGUIButton.h"
  18. using namespace irr;
  19. class Client;
  20. class GUIItemImage;
  21. class GUIButtonItemImage : public GUIButton
  22. {
  23. public:
  24. //! constructor
  25. GUIButtonItemImage(gui::IGUIEnvironment *environment, gui::IGUIElement *parent,
  26. s32 id, core::rect<s32> rectangle, std::string item,
  27. Client *client, bool noclip = false);
  28. //! Do not drop returned handle
  29. static GUIButtonItemImage *addButton(gui::IGUIEnvironment *environment,
  30. const core::rect<s32> &rectangle, IGUIElement *parent, s32 id,
  31. const wchar_t *text, std::string item, Client *client);
  32. private:
  33. std::string m_item_name;
  34. Client *m_client;
  35. GUIItemImage *m_image;
  36. };