20#ifndef HEADER_IBTN_HPP
21#define HEADER_IBTN_HPP
31 namespace video {
class ITexture; }
34#include "guiengine/widget.hpp"
35#include "utils/leak_check.hpp"
36#include "utils/cpp2011.hpp"
46 irr::core::rect<s32> m_list_header_icon_rect;
47 irr::video::ITexture* m_texture;
48 irr::video::ITexture* m_deactivated_texture;
49 irr::video::ITexture* m_highlight_texture;
50 int m_texture_w, m_texture_h;
52 video::ITexture* getDeactivatedTexture(video::ITexture* texture);
59 SCALE_MODE_LIST_WIDGET,
60 SCALE_MODE_KEEP_TEXTURE_ASPECT_RATIO,
61 SCALE_MODE_KEEP_CUSTOM_ASPECT_RATIO
65 ICON_PATH_TYPE_ABSOLUTE,
79 irr::gui::IGUIStaticText* m_label;
82 ScaleMode m_scale_mode;
83 float m_custom_aspect_ratio;
85 void setTexture(video::ITexture* texture);
94 IconButtonWidget(ScaleMode scale_mode=SCALE_MODE_KEEP_TEXTURE_ASPECT_RATIO, const
bool tab_stop=true,
99 virtual void add() OVERRIDE;
115 void setLabel(
const irr::core::stringw& new_label);
131 void setImage(
const char* path_to_texture,
138 setImage(path_to_texture.c_str(), path_type);
152 void setHighlightedImage(irr::video::ITexture* texture)
154 m_highlight_texture = texture;
159 virtual EventPropagation
focused(
const int playerID) OVERRIDE;
163 virtual void unfocused(
const int playerID,
Widget* new_focus) OVERRIDE;
168 virtual void setVisible(
bool visible) OVERRIDE;
176 const irr::core::rect<s32>& getListHeaderIconRect()
const
178 return m_list_header_icon_rect;
Object used to render the GUI widgets see Overview of GUI skin for more information about skinning in...
Definition: skin.hpp:269
Definition: scalable_font.hpp:35
Contains all GUI engine related classes and functions.
Definition: abstract_state_manager.hpp:33