aboutsummaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/guiButton.cpp2
-rw-r--r--src/gui/guiButton.h88
-rw-r--r--src/gui/guiChatConsole.cpp2
-rw-r--r--src/gui/guiEditBox.cpp3
4 files changed, 12 insertions, 83 deletions
diff --git a/src/gui/guiButton.cpp b/src/gui/guiButton.cpp
index be7e0c439..3a2ddde1c 100644
--- a/src/gui/guiButton.cpp
+++ b/src/gui/guiButton.cpp
@@ -499,12 +499,10 @@ video::SColor GUIButton::getOverrideColor() const
return OverrideColor;
}
-#if IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR > 8
video::SColor GUIButton::getActiveColor() const
{
return video::SColor(0,0,0,0); // unused?
}
-#endif
void GUIButton::enableOverrideColor(bool enable)
{
diff --git a/src/gui/guiButton.h b/src/gui/guiButton.h
index ee9bb6f21..5e379b28f 100644
--- a/src/gui/guiButton.h
+++ b/src/gui/guiButton.h
@@ -17,64 +17,8 @@
using namespace irr;
-#if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR <= 8)
- namespace irr { namespace gui {
-
- //! State of buttons used for drawing texture images.
- //! Note that only a single state is active at a time
- //! Also when no image is defined for a state it will use images from another state
- //! and if that state is not set from the replacement for that,etc.
- //! So in many cases setting EGBIS_IMAGE_UP and EGBIS_IMAGE_DOWN is sufficient.
- enum EGUI_BUTTON_IMAGE_STATE {
- //! When no other states have images they will all use this one.
- EGBIS_IMAGE_UP,
- //! When not set EGBIS_IMAGE_UP is used.
- EGBIS_IMAGE_UP_MOUSEOVER,
- //! When not set EGBIS_IMAGE_UP_MOUSEOVER is used.
- EGBIS_IMAGE_UP_FOCUSED,
- //! When not set EGBIS_IMAGE_UP_FOCUSED is used.
- EGBIS_IMAGE_UP_FOCUSED_MOUSEOVER,
- //! When not set EGBIS_IMAGE_UP is used.
- EGBIS_IMAGE_DOWN,
- //! When not set EGBIS_IMAGE_DOWN is used.
- EGBIS_IMAGE_DOWN_MOUSEOVER,
- //! When not set EGBIS_IMAGE_DOWN_MOUSEOVER is used.
- EGBIS_IMAGE_DOWN_FOCUSED,
- //! When not set EGBIS_IMAGE_DOWN_FOCUSED is used.
- EGBIS_IMAGE_DOWN_FOCUSED_MOUSEOVER,
- //! When not set EGBIS_IMAGE_UP or EGBIS_IMAGE_DOWN are used (depending on button state).
- EGBIS_IMAGE_DISABLED,
- //! not used, counts the number of enumerated items
- EGBIS_COUNT
- };
-
- //! Names for gui button image states
- const c8 *const GUIButtonImageStateNames[EGBIS_COUNT + 1] =
- {
- "Image", // not "ImageUp" as it otherwise breaks serialization of old files
- "ImageUpOver",
- "ImageUpFocused",
- "ImageUpFocusedOver",
- "PressedImage", // not "ImageDown" as it otherwise breaks serialization of old files
- "ImageDownOver",
- "ImageDownFocused",
- "ImageDownFocusedOver",
- "ImageDisabled",
- 0 // count
- };
-
- }}
-
-#endif
-
class ISimpleTextureSource;
-#if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR <= 8)
-#define OVERRIDE_19
-#else
-#define OVERRIDE_19 override
-#endif
-
class GUIButton : public gui::IGUIButton
{
public:
@@ -103,27 +47,25 @@ public:
virtual gui::IGUIFont* getActiveFont() const override;
//! Sets another color for the button text.
- virtual void setOverrideColor(video::SColor color) OVERRIDE_19;
+ virtual void setOverrideColor(video::SColor color) override;
//! Gets the override color
- virtual video::SColor getOverrideColor(void) const OVERRIDE_19;
+ virtual video::SColor getOverrideColor() const override;
- #if IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR > 8
//! Gets the currently used text color
virtual video::SColor getActiveColor() const override;
- #endif
//! Sets if the button text should use the override color or the color in the gui skin.
- virtual void enableOverrideColor(bool enable) OVERRIDE_19;
+ virtual void enableOverrideColor(bool enable) override;
//! Checks if an override color is enabled
- virtual bool isOverrideColorEnabled(void) const OVERRIDE_19;
+ virtual bool isOverrideColorEnabled(void) const override;
// PATCH
//! Sets an image which should be displayed on the button when it is in the given state.
virtual void setImage(gui::EGUI_BUTTON_IMAGE_STATE state,
video::ITexture* image=nullptr,
- const core::rect<s32>& sourceRect=core::rect<s32>(0,0,0,0)) OVERRIDE_19;
+ const core::rect<s32>& sourceRect=core::rect<s32>(0,0,0,0)) override;
//! Sets an image which should be displayed on the button when it is in normal state.
virtual void setImage(video::ITexture* image=nullptr) override;
@@ -152,25 +94,19 @@ public:
*/
virtual void setSprite(gui::EGUI_BUTTON_STATE state, s32 index,
video::SColor color=video::SColor(255,255,255,255),
- bool loop=false, bool scale=false) OVERRIDE_19;
-
-#if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR <= 8)
- void setSprite(gui::EGUI_BUTTON_STATE state, s32 index, video::SColor color, bool loop) override {
- setSprite(state, index, color, loop, false);
- }
-#endif
+ bool loop=false, bool scale=false) override;
//! Get the sprite-index for the given state or -1 when no sprite is set
- virtual s32 getSpriteIndex(gui::EGUI_BUTTON_STATE state) const OVERRIDE_19;
+ virtual s32 getSpriteIndex(gui::EGUI_BUTTON_STATE state) const override;
//! Get the sprite color for the given state. Color is only used when a sprite is set.
- virtual video::SColor getSpriteColor(gui::EGUI_BUTTON_STATE state) const OVERRIDE_19;
+ virtual video::SColor getSpriteColor(gui::EGUI_BUTTON_STATE state) const override;
//! Returns if the sprite in the given state does loop
- virtual bool getSpriteLoop(gui::EGUI_BUTTON_STATE state) const OVERRIDE_19;
+ virtual bool getSpriteLoop(gui::EGUI_BUTTON_STATE state) const override;
//! Returns if the sprite in the given state is scaled
- virtual bool getSpriteScale(gui::EGUI_BUTTON_STATE state) const OVERRIDE_19;
+ virtual bool getSpriteScale(gui::EGUI_BUTTON_STATE state) const override;
//! Sets if the button should behave like a push button. Which means it
//! can be in two states: Normal or Pressed. With a click on the button,
@@ -210,13 +146,13 @@ public:
virtual bool isScalingImage() const override;
//! Get if the shift key was pressed in last EGET_BUTTON_CLICKED event
- virtual bool getClickShiftState() const OVERRIDE_19
+ virtual bool getClickShiftState() const override
{
return ClickShiftState;
}
//! Get if the control key was pressed in last EGET_BUTTON_CLICKED event
- virtual bool getClickControlState() const OVERRIDE_19
+ virtual bool getClickControlState() const override
{
return ClickControlState;
}
diff --git a/src/gui/guiChatConsole.cpp b/src/gui/guiChatConsole.cpp
index 787afed7e..df4fd466b 100644
--- a/src/gui/guiChatConsole.cpp
+++ b/src/gui/guiChatConsole.cpp
@@ -673,13 +673,11 @@ bool GUIChatConsole::OnEvent(const SEvent& event)
}
}
}
-#if (IRRLICHT_VERSION_MT_REVISION >= 2)
else if(event.EventType == EET_STRING_INPUT_EVENT)
{
prompt.input(std::wstring(event.StringInput.Str->c_str()));
return true;
}
-#endif
return Parent ? Parent->OnEvent(event) : false;
}
diff --git a/src/gui/guiEditBox.cpp b/src/gui/guiEditBox.cpp
index 4a0f5013d..e25c9ace3 100644
--- a/src/gui/guiEditBox.cpp
+++ b/src/gui/guiEditBox.cpp
@@ -200,7 +200,6 @@ void GUIEditBox::sendGuiEvent(EGUI_EVENT_TYPE type)
bool GUIEditBox::OnEvent(const SEvent &event)
{
if (isEnabled()) {
-
switch (event.EventType) {
case EET_GUI_EVENT:
if (event.GUIEvent.EventType == EGET_ELEMENT_FOCUS_LOST) {
@@ -218,11 +217,9 @@ bool GUIEditBox::OnEvent(const SEvent &event)
if (processMouse(event))
return true;
break;
-#if (IRRLICHT_VERSION_MT_REVISION >= 2)
case EET_STRING_INPUT_EVENT:
inputString(*event.StringInput.Str);
return true;
-#endif
default:
break;
}