7#include <IGUIStaticText.h>
10#include "IGUISpriteBank.h"
25 GUIButton(gui::IGUIEnvironment* environment, gui::IGUIElement* parent,
33 virtual bool OnEvent(
const SEvent& event)
override;
36 virtual void draw()
override;
64 virtual void setImage(gui::EGUI_BUTTON_IMAGE_STATE state,
65 video::ITexture* image=
nullptr,
66 const core::rect<s32>& sourceRect=core::rect<s32>(0,0,0,0))
override;
69 virtual void setImage(video::ITexture* image=
nullptr)
override;
72 virtual void setImage(video::ITexture* image,
const core::rect<s32>& pos)
override;
78 virtual void setPressedImage(video::ITexture* image,
const core::rect<s32>& pos)
override;
81 virtual void setText(
const wchar_t* text)
override;
85 virtual void setSpriteBank(gui::IGUISpriteBank* bank=0)
override;
93 virtual void setSprite(gui::EGUI_BUTTON_STATE state, s32 index,
94 video::SColor color=video::SColor(255,255,255,255),
95 bool loop=
false,
bool scale=
false)
override;
98 virtual s32
getSpriteIndex(gui::EGUI_BUTTON_STATE state)
const override;
101 virtual video::SColor
getSpriteColor(gui::EGUI_BUTTON_STATE state)
const override;
104 virtual bool getSpriteLoop(gui::EGUI_BUTTON_STATE state)
const override;
107 virtual bool getSpriteScale(gui::EGUI_BUTTON_STATE state)
const override;
118 virtual void setPressed(
bool pressed=
true)
override;
170 void setStyles(
const std::array<StyleSpec, StyleSpec::NUM_STATES>& styles);
177 IGUIElement* parent, s32
id,
const wchar_t* text,
178 const wchar_t *tooltiptext=L
"");
181 void drawSprite(gui::EGUI_BUTTON_STATE state, u32 startTime,
const core::position2di& center);
182 gui::EGUI_BUTTON_IMAGE_STATE
getImageState(
bool pressed)
const;
203 if (
this == &other )
247 std::array<StyleSpec, StyleSpec::NUM_STATES>
Styles;
278 video::SColor
BgColor = video::SColor(0xFF,0xFF,0xFF,0xFF);
Definition: texturesource.h:34
Definition: StyleSpec.h:32