Skip to content

Adopt 13718: remove irrlicht gradients #16015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
14 changes: 3 additions & 11 deletions irr/include/IGUIEnvironment.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,26 +130,18 @@ class IGUIEnvironment : public virtual IReferenceCounted

//! Sets a new GUI Skin
/** You can use this to change the appearance of the whole GUI
Environment. You can set one of the built-in skins or implement your
own class derived from IGUISkin and enable it using this method.
To set for example the built-in Windows classic skin, use the following
code:
\code
gui::IGUISkin* newskin = environment->createSkin(gui::EGST_WINDOWS_CLASSIC);
environment->setSkin(newskin);
newskin->drop();
\endcode
Environment.
\param skin New skin to use.
*/
virtual void setSkin(IGUISkin *skin) = 0;

//! Creates a new GUI Skin based on a template.
//! Creates a new GUI Skin.
/** Use setSkin() to set the created skin.
\param type The type of the new skin.
\return Pointer to the created skin.
If you no longer need it, you should call IGUISkin::drop().
See IReferenceCounted::drop() for more information. */
virtual IGUISkin *createSkin(EGUI_SKIN_TYPE type) = 0;
virtual IGUISkin *createSkin() = 0;

//! Creates the image list from the given texture.
/** \param texture Texture to split into images
Expand Down
39 changes: 0 additions & 39 deletions irr/include/IGUISkin.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,6 @@ class IGUIFont;
class IGUISpriteBank;
class IGUIElement;

//! Enumeration of available default skins.
/** To set one of the skins, use the following code, for example to set
the Windows classic skin:
\code
gui::IGUISkin* newskin = environment->createSkin(gui::EGST_WINDOWS_CLASSIC);
environment->setSkin(newskin);
newskin->drop();
\endcode
*/
enum EGUI_SKIN_TYPE
{
//! Default windows look and feel
EGST_WINDOWS_CLASSIC = 0,

//! Like EGST_WINDOWS_CLASSIC, but with metallic shaded windows and buttons
EGST_WINDOWS_METALLIC,

//! Burning's skin
EGST_BURNING_SKIN,

//! An unknown skin, not serializable at present
EGST_UNKNOWN,

//! this value is not used, it only specifies the number of skin types
EGST_COUNT
};

//! Names for gui element types
const c8 *const GUISkinTypeNames[EGST_COUNT + 1] = {
"windowsClassic",
"windowsMetallic",
"burning",
"unknown",
0,
};

//! Enumeration for skin colors
enum EGUI_DEFAULT_COLOR
{
Expand Down Expand Up @@ -570,9 +534,6 @@ class IGUISkin : virtual public IReferenceCounted
If the pointer is null, no clipping will be performed. */
virtual void draw2DRectangle(IGUIElement *element, const video::SColor &color,
const core::rect<s32> &pos, const core::rect<s32> *clip = 0) = 0;

//! get the type of this skin
virtual EGUI_SKIN_TYPE getType() const { return EGST_UNKNOWN; }
};

} // end namespace gui
Expand Down
8 changes: 4 additions & 4 deletions irr/src/CGUIEnvironment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ CGUIEnvironment::CGUIEnvironment(io::IFileSystem *fs, video::IVideoDriver *drive

loadBuiltInFont();

IGUISkin *skin = createSkin(gui::EGST_WINDOWS_METALLIC);
IGUISkin *skin = createSkin();
setSkin(skin);
skin->drop();

Expand Down Expand Up @@ -584,13 +584,13 @@ void CGUIEnvironment::setSkin(IGUISkin *skin)
CurrentSkin->grab();
}

//! Creates a new GUI Skin based on a template.
//! Creates a new GUI Skin.
/** \return Returns a pointer to the created skin.
If you no longer need the skin, you should call IGUISkin::drop().
See IReferenceCounted::drop() for more information. */
IGUISkin *CGUIEnvironment::createSkin(EGUI_SKIN_TYPE type)
IGUISkin *CGUIEnvironment::createSkin()
{
IGUISkin *skin = new CGUISkin(type, Driver);
IGUISkin *skin = new CGUISkin(Driver);

IGUIFont *builtinfont = getBuiltInFont();
IGUIFontBitmap *bitfont = 0;
Expand Down
4 changes: 2 additions & 2 deletions irr/src/CGUIEnvironment.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ class CGUIEnvironment : public IGUIEnvironment, public IGUIElement
//! Sets a new GUI Skin
void setSkin(IGUISkin *skin) override;

//! Creates a new GUI Skin based on a template.
//! Creates a new GUI Skin.
/** \return Returns a pointer to the created skin.
If you no longer need the skin, you should call IGUISkin::drop().
See IReferenceCounted::drop() for more information. */
IGUISkin *createSkin(EGUI_SKIN_TYPE type) override;
IGUISkin *createSkin() override;

//! Creates the image list from the given texture.
virtual IGUIImageList *createImageList(video::ITexture *texture,
Expand Down
Loading
Loading