aboutsummaryrefslogtreecommitdiff
path: root/textures/base/pack
Commit message (Collapse)AuthorAge
* Add no_texture.png as fallback for unspecified texturesWuzzy2021-10-20
|
* Mainmenu: Improve "Join Game" tab (#11078)sfan52021-03-20
|
* Use "Aux1" key name consistently everywhereWuzzy2021-02-24
|
* "Browse online content" formspec improvement (#10756)Zughy2021-01-02
|
* MainMenu: Add clear button and icon for search input (#10363)Andrey2020-12-19
|
* Improve default inventory+wield images of node drawtypes (#9299)Wuzzy2020-07-23
|
* Add buttons to ContentDB in game bar and configure world (#9944)rubenwardy2020-06-04
|
* Update ContentDB dialog (#9949)rubenwardy2020-05-29
|
* Add support for statbar “off state” icons (#9462)Wuzzy2020-05-11
| | | | | | | This adds support for optional “off state” icons for statbars. “off state icons” can be used to denote the lack of something, like missing hearts or bubbles. Add "off state" textures to the builtin statbars. Co-authored-by: SmallJoker <mk939@ymail.com>
* Tweak default textures (#9237)Wuzzy2020-01-04
|
* Add 4 missing fallback/default textures (#8845)Wuzzy2019-10-23
| | | Processed using 'optipng -o7 -strip all '
* Add player sprite textures back into the engine as a fallback (#8823)Paramat2019-08-20
| | | | | | | 'player.png' and 'player_back.png' are hardcoded into the engine as the default appearence of the player object, so the textures should be present in the engine. This results in a functional fallback sprite player for when a game has no player appearence related code.
* Mirror 'sunrisebg' texture to fix chopped right edge (#7935)Paramat2018-12-04
|
* Re-master and improve touchscreen gui icons (#7931)stujones112018-12-03
| | | | Increase the resolution of the smaller icons to look better on modern HD screens. All master SVGs included in the the Android build directory.
* Android: Improve UI scaling on smaller high-density displays (#7834)stujones112018-11-18
| | | | * Android: Improve UI scaling on smaller high-density displays
* Android buttons: Inset 'rare controls', inset and resize 'gear icon' (#7792)Paramat2018-10-19
| | | | | Previously these were both inconsistently close to the screen edge. 'gear icon' has been enlarged to match the width of 'zoom' and 'aux' buttons.
* Android: Add 'aux' button (#7477)Muhammad Rifqi Priyo Susanto2018-07-10
| | | | | Add 'aux' button. Use joystick to trigger 'aux' button when forward and out of main circle, by enabling 'virtual_joystick_triggers_aux' setting.
* Android: Resize jump and sneak buttons' touch target (#7498)Muhammad Rifqi Priyo Susanto2018-06-30
|
* Add screenshots to online content browserrubenwardy2018-05-20
|
* Android: Modify touch screen GUI's buttons (#7240)Muhammad Rifqi Priyo Susanto2018-04-18
| | | | | | | * Android: Add zoom, minimap, and toggle chat button Zoom button is put above jump button. Minimap and toggle chat button are put in settings bar. * Jump button is rotated down button * Move three buttons on the right screen higher
* Android: Replace movement buttons with joystick (#7126)Muhammad Rifqi Priyo Susanto2018-04-10
| | | | | | | | | | | | | | | | | * Android: Replace movement buttons with joystick Replace movement control buttons (arrows at bottom left screen) with virtual joystick. Joystick has 8 directions (same as keyboard). Basically, just map it to keyboard input. Joystick applies only on left 1/3 of screen. Joystick's position can be fixed by enabling fixed_virtual_joystick setting. Three new images: (1) placeholder joystick, (2) joystick container (background), and (3) joystick cursor. Remove unused images: movement control buttons (*_arrow.png). New data type: touch_gui_joystick_move_id Joystick's fixed position is spaced one button size from bottom and from left of screen. Remove unused variable: m_joystick_downlocation
* Add a refresh button to the serverlist (#6957)Tre2018-02-19
| | | | | | | | * add refresh button * Make search and refresh buttons smaller * Change to image button
* Minimap: Leaner minimap arrow makes it easier to see the directionJens Rottmann2017-08-09
| | | | | | | | The arrow symbolizing the player in the square minimap looks almost like a triangle, making it a bit hard to see which direction it is currently pointing in when in a hurry. Redraw it leaner, pointier. Colors unchanged.
* GUI: Convert loading screen's progress bar to image (#5362)kilbith2017-03-10
|
* Add textures for air and ignore items (#5196)Wuzzy2017-02-10
|
* Serverlist: Add ping indicators (#5164)kilbith2017-02-03
|
* Halo: Highlight selected faceRealBadAngel2016-11-12
| | | | | This is a slightly modified and cleaned up version of #3774 by RealBadAngel. By sofar: Remove color change (just make it lighter) and some minor cleanups.
* Textures: New 'smoke puff' texture from TNT modparamat2016-10-04
|
* Main menu, lua_api.txt: Fix mod/texture pack screenshot size issuesWuzzy2016-07-27
| | | | | | Recommend mod screenshot size in lua_api.txt Adjust displayed screenshot size of texture packs Document texture pack files in lua_api.txt
* Textures: Replace menu background fallback dirt_bg.png with empty sky textureparamat2016-04-21
|
* Mainmenu: Unify favorite servers with main serverlistkilbith2016-04-20
|
* Minimap: revert change from RGBA to IndexedAuke Kok2016-04-11
| | | | | | @kilbith spotted correctly that I had accidentally removed the "soft" edging on the minimap overlay by converting it from RGBA to Indexed, which killed the transparent pixels on the edging.
* Minimap: "North" indicator arrow for circle minimapAuke Kok2016-04-08
| | | | | | | | | | Related: #3730 This adds a simple, and small "North" indicator to the circular minimap. The indicator is in a classical triangle-like arrow with a little bit of shading to accentuate the shape and give it a little bit depth. The indicator is stuck exactly at the edge as far outwards as possible, and is not too intrusive but still easy enough to spot.
* Update menu header imageJean-Patrick Guerrero2016-03-25
|
* Resize object_marker_red.png to 16x16ShadowNinja2016-02-28
| | | | Having a non-power-of-two image broke the Android app.
* Minimap: show player markersRealBadAngel2016-02-19
|
* Cleanup selection mesh code, add shaders for halo and selection boxesRealBadAngel2016-02-08
|
* Android: Implement Autohiding button bars to cleanup screenSapier2015-12-18
|
* Compress textures and fontsMaksim Gamarnik2015-10-15
| | | | | Used PNGOUT, OptiPNG and DeflOpt. Removes ~350 KB without any loss in quality.
* Fix relief mapping issuesRealBadAngel2015-07-16
|
* Add minimap featureRealBadAngel2015-06-27
|
* Use frame instead of words 'no screenshot available'rubenwardy2015-06-24
|
* Add extra buttons to Android GUI. All icons are licensed by freepik.com ↵Kodexky2014-12-30
| | | | under CC BY 3.0
* Regenerate server_flags_creative.png from XCFKahrl2014-12-21
|
* Fix background of creative icon (was black, now transparent)Kahrl2014-12-14
|
* Display serverlist flags as iconsKahrl2014-12-13
|
* Fix MSVC compiling warnings and remove an unused textureSmallJoker2014-12-12
|
* Change default halo.png for better visibility.RealBadAngel2014-09-19
|
* Node highlighting.RealBadAngel2014-09-17
|
* Add support for Android 2.3+sapier2014-06-29
| | | | | | | | | | | | | There have been plenty of ppl involved in creating this version. I don't wanna mention names as I'm sure I'd forget someone so I just tell where help has been done: - The partial android versions done by various ppl - Testing on different android devices - reviewing code (especially the in core changes) - testing controls - reviewing texts A big thank you to everyone helping this to be completed!
21'>921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084
// Copyright (C) 2002-2012 Nikolaus Gebhardt
// Copyright (C) 2019 Irrlick
//
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h

#include "guiSkin.h"
#ifdef _IRR_COMPILE_WITH_GUI_

#include "IGUIFont.h"
#include "IGUISpriteBank.h"
#include "IGUIElement.h"
#include "IVideoDriver.h"
#include "IAttributes.h"

namespace irr
{
namespace gui
{

GUISkin::GUISkin(EGUI_SKIN_TYPE type, video::IVideoDriver* driver)
: SpriteBank(0), Driver(driver), Type(type)
{
	#ifdef _DEBUG
	setDebugName("GUISkin");
	#endif

	if ((Type == EGST_WINDOWS_CLASSIC) || (Type == EGST_WINDOWS_METALLIC))
	{
		Colors[EGDC_3D_DARK_SHADOW]     = video::SColor(101,50,50,50);
		Colors[EGDC_3D_SHADOW]          = video::SColor(101,130,130,130);
		Colors[EGDC_3D_FACE]            = video::SColor(220,100,100,100);
		Colors[EGDC_3D_HIGH_LIGHT]      = video::SColor(101,255,255,255);
		Colors[EGDC_3D_LIGHT]           = video::SColor(101,210,210,210);
		Colors[EGDC_ACTIVE_BORDER]      = video::SColor(101,16,14,115);
		Colors[EGDC_ACTIVE_CAPTION]     = video::SColor(255,255,255,255);
		Colors[EGDC_APP_WORKSPACE]      = video::SColor(101,100,100,100);
		Colors[EGDC_BUTTON_TEXT]        = video::SColor(240,10,10,10);
		Colors[EGDC_GRAY_TEXT]          = video::SColor(240,130,130,130);
		Colors[EGDC_HIGH_LIGHT]         = video::SColor(101,8,36,107);
		Colors[EGDC_HIGH_LIGHT_TEXT]    = video::SColor(240,255,255,255);
		Colors[EGDC_INACTIVE_BORDER]    = video::SColor(101,165,165,165);
		Colors[EGDC_INACTIVE_CAPTION]   = video::SColor(255,30,30,30);
		Colors[EGDC_TOOLTIP]            = video::SColor(200,0,0,0);
		Colors[EGDC_TOOLTIP_BACKGROUND] = video::SColor(200,255,255,225);
		Colors[EGDC_SCROLLBAR]          = video::SColor(101,230,230,230);
		Colors[EGDC_WINDOW]             = video::SColor(101,255,255,255);
		Colors[EGDC_WINDOW_SYMBOL]      = video::SColor(200,10,10,10);
		Colors[EGDC_ICON]               = video::SColor(200,255,255,255);
		Colors[EGDC_ICON_HIGH_LIGHT]    = video::SColor(200,8,36,107);
		Colors[EGDC_GRAY_WINDOW_SYMBOL] = video::SColor(240,100,100,100);
		Colors[EGDC_EDITABLE] 			= video::SColor(255,255,255,255);
		Colors[EGDC_GRAY_EDITABLE]		= video::SColor(255,120,120,120);
		Colors[EGDC_FOCUSED_EDITABLE]	= video::SColor(255,240,240,255);


		Sizes[EGDS_SCROLLBAR_SIZE] = 14;
		Sizes[EGDS_MENU_HEIGHT] = 30;
		Sizes[EGDS_WINDOW_BUTTON_WIDTH] = 15;
		Sizes[EGDS_CHECK_BOX_WIDTH] = 18;
		Sizes[EGDS_MESSAGE_BOX_WIDTH] = 500;
		Sizes[EGDS_MESSAGE_BOX_HEIGHT] = 200;
		Sizes[EGDS_BUTTON_WIDTH] = 80;
		Sizes[EGDS_BUTTON_HEIGHT] = 30;

		Sizes[EGDS_TEXT_DISTANCE_X] = 2;
		Sizes[EGDS_TEXT_DISTANCE_Y] = 0;

		Sizes[EGDS_TITLEBARTEXT_DISTANCE_X] = 2;
		Sizes[EGDS_TITLEBARTEXT_DISTANCE_Y] = 0;
	}
	else
	{
		//0x80a6a8af
		Colors[EGDC_3D_DARK_SHADOW] 	=	0x60767982;
		//Colors[EGDC_3D_FACE]			=	0xc0c9ccd4;		// tab background
		Colors[EGDC_3D_FACE]			=	0xc0cbd2d9;		// tab background
		Colors[EGDC_3D_SHADOW]			=	0x50e4e8f1;		// tab background, and left-top highlight
		Colors[EGDC_3D_HIGH_LIGHT]		=	0x40c7ccdc;
		Colors[EGDC_3D_LIGHT]			=	0x802e313a;
		Colors[EGDC_ACTIVE_BORDER]		=	0x80404040;		// window title
		Colors[EGDC_ACTIVE_CAPTION] 	=	0xffd0d0d0;
		Colors[EGDC_APP_WORKSPACE]		=	0xc0646464;		// unused
		Colors[EGDC_BUTTON_TEXT]		=	0xd0161616;
		Colors[EGDC_GRAY_TEXT]			=	0x3c141414;
		Colors[EGDC_HIGH_LIGHT]			=	0x6c606060;
		Colors[EGDC_HIGH_LIGHT_TEXT]	=	0xd0e0e0e0;
		Colors[EGDC_INACTIVE_BORDER]	=	0xf0a5a5a5;
		Colors[EGDC_INACTIVE_CAPTION]	=	0xffd2d2d2;
		Colors[EGDC_TOOLTIP]			=	0xf00f2033;
		Colors[EGDC_TOOLTIP_BACKGROUND]	= 	0xc0cbd2d9;
		Colors[EGDC_SCROLLBAR]			= 	0xf0e0e0e0;
		Colors[EGDC_WINDOW]				= 	0xf0f0f0f0;
		Colors[EGDC_WINDOW_SYMBOL]		= 	0xd0161616;
		Colors[EGDC_ICON]				= 	0xd0161616;
		Colors[EGDC_ICON_HIGH_LIGHT]	= 	0xd0606060;
		Colors[EGDC_GRAY_WINDOW_SYMBOL] = 	0x3c101010;
		Colors[EGDC_EDITABLE] 			= 	0xf0ffffff;
		Colors[EGDC_GRAY_EDITABLE]		= 	0xf0cccccc;
		Colors[EGDC_FOCUSED_EDITABLE]	= 	0xf0fffff0;

		Sizes[EGDS_SCROLLBAR_SIZE] = 14;
		Sizes[EGDS_MENU_HEIGHT] = 48;
		Sizes[EGDS_WINDOW_BUTTON_WIDTH] = 15;
		Sizes[EGDS_CHECK_BOX_WIDTH] = 18;
		Sizes[EGDS_MESSAGE_BOX_WIDTH] = 500;
		Sizes[EGDS_MESSAGE_BOX_HEIGHT] = 200;
		Sizes[EGDS_BUTTON_WIDTH] = 80;
		Sizes[EGDS_BUTTON_HEIGHT] = 30;

		Sizes[EGDS_TEXT_DISTANCE_X] = 3;
		Sizes[EGDS_TEXT_DISTANCE_Y] = 2;

		Sizes[EGDS_TITLEBARTEXT_DISTANCE_X] = 3;
		Sizes[EGDS_TITLEBARTEXT_DISTANCE_Y] = 2;
	}

	Sizes[EGDS_MESSAGE_BOX_GAP_SPACE] = 15;
	Sizes[EGDS_MESSAGE_BOX_MIN_TEXT_WIDTH] = 0;
	Sizes[EGDS_MESSAGE_BOX_MAX_TEXT_WIDTH] = 500;
	Sizes[EGDS_MESSAGE_BOX_MIN_TEXT_HEIGHT] = 0;
	Sizes[EGDS_MESSAGE_BOX_MAX_TEXT_HEIGHT] = 99999;

	Sizes[EGDS_BUTTON_PRESSED_IMAGE_OFFSET_X] = 1;
	Sizes[EGDS_BUTTON_PRESSED_IMAGE_OFFSET_Y] = 1;
	Sizes[EGDS_BUTTON_PRESSED_TEXT_OFFSET_X] = 0;
	Sizes[EGDS_BUTTON_PRESSED_TEXT_OFFSET_Y] = 2;

	Texts[EGDT_MSG_BOX_OK] = L"OK";
	Texts[EGDT_MSG_BOX_CANCEL] = L"Cancel";
	Texts[EGDT_MSG_BOX_YES] = L"Yes";
	Texts[EGDT_MSG_BOX_NO] = L"No";
	Texts[EGDT_WINDOW_CLOSE] = L"Close";
	Texts[EGDT_WINDOW_RESTORE] = L"Restore";
	Texts[EGDT_WINDOW_MINIMIZE] = L"Minimize";
	Texts[EGDT_WINDOW_MAXIMIZE] = L"Maximize";

	Icons[EGDI_WINDOW_MAXIMIZE] = 225;
	Icons[EGDI_WINDOW_RESTORE] = 226;
	Icons[EGDI_WINDOW_CLOSE] = 227;
	Icons[EGDI_WINDOW_MINIMIZE] = 228;
	Icons[EGDI_CURSOR_UP] = 229;
	Icons[EGDI_CURSOR_DOWN] = 230;
	Icons[EGDI_CURSOR_LEFT] = 231;
	Icons[EGDI_CURSOR_RIGHT] = 232;
	Icons[EGDI_MENU_MORE] = 232;
	Icons[EGDI_CHECK_BOX_CHECKED] = 233;
	Icons[EGDI_DROP_DOWN] = 234;
	Icons[EGDI_SMALL_CURSOR_UP] = 235;
	Icons[EGDI_SMALL_CURSOR_DOWN] = 236;
	Icons[EGDI_RADIO_BUTTON_CHECKED] = 237;
	Icons[EGDI_MORE_LEFT] = 238;
	Icons[EGDI_MORE_RIGHT] = 239;
	Icons[EGDI_MORE_UP] = 240;
	Icons[EGDI_MORE_DOWN] = 241;
	Icons[EGDI_WINDOW_RESIZE] = 242;
	Icons[EGDI_EXPAND] = 243;
	Icons[EGDI_COLLAPSE] = 244;

	Icons[EGDI_FILE] = 245;
	Icons[EGDI_DIRECTORY] = 246;

	for (u32 i=0; i<EGDF_COUNT; ++i)
		Fonts[i] = 0;

	UseGradient = (Type == EGST_WINDOWS_METALLIC) || (Type == EGST_BURNING_SKIN) ;
}


//! destructor
GUISkin::~GUISkin()
{
	for (u32 i=0; i<EGDF_COUNT; ++i)
	{
		if (Fonts[i])
			Fonts[i]->drop();
	}

	if (SpriteBank)
		SpriteBank->drop();
}


//! returns default color
video::SColor GUISkin::getColor(EGUI_DEFAULT_COLOR color) const
{
	if ((u32)color < EGDC_COUNT)
		return Colors[color];
	else
		return video::SColor();
}


//! sets a default color
void GUISkin::setColor(EGUI_DEFAULT_COLOR which, video::SColor newColor)
{
	if ((u32)which < EGDC_COUNT)
		Colors[which] = newColor;
}


//! returns size for the given size type
s32 GUISkin::getSize(EGUI_DEFAULT_SIZE size) const
{
	if ((u32)size < EGDS_COUNT)
		return Sizes[size];
	else
		return 0;
}


//! sets a default size
void GUISkin::setSize(EGUI_DEFAULT_SIZE which, s32 size)
{
	if ((u32)which < EGDS_COUNT)
		Sizes[which] = size;
}


//! returns the default font
IGUIFont* GUISkin::getFont(EGUI_DEFAULT_FONT which) const
{
	if (((u32)which < EGDF_COUNT) && Fonts[which])
		return Fonts[which];
	else
		return Fonts[EGDF_DEFAULT];
}


//! sets a default font
void GUISkin::setFont(IGUIFont* font, EGUI_DEFAULT_FONT which)
{
	if ((u32)which >= EGDF_COUNT)
		return;

	if (font)
	{
		font->grab();
		if (Fonts[which])
			Fonts[which]->drop();

		Fonts[which] = font;
	}
}


//! gets the sprite bank stored
IGUISpriteBank* GUISkin::getSpriteBank() const
{
	return SpriteBank;
}


//! set a new sprite bank or remove one by passing 0
void GUISkin::setSpriteBank(IGUISpriteBank* bank)
{
	if (bank)
		bank->grab();

	if (SpriteBank)
		SpriteBank->drop();

	SpriteBank = bank;
}


//! Returns a default icon
u32 GUISkin::getIcon(EGUI_DEFAULT_ICON icon) const
{
	if ((u32)icon < EGDI_COUNT)
		return Icons[icon];
	else
		return 0;
}


//! Sets a default icon
void GUISkin::setIcon(EGUI_DEFAULT_ICON icon, u32 index)
{
	if ((u32)icon < EGDI_COUNT)
		Icons[icon] = index;
}


//! Returns a default text. For example for Message box button captions:
//! "OK", "Cancel", "Yes", "No" and so on.
const wchar_t* GUISkin::getDefaultText(EGUI_DEFAULT_TEXT text) const
{
	if ((u32)text < EGDT_COUNT)
		return Texts[text].c_str();
	else
		return Texts[0].c_str();
}


//! Sets a default text. For example for Message box button captions:
//! "OK", "Cancel", "Yes", "No" and so on.
void GUISkin::setDefaultText(EGUI_DEFAULT_TEXT which, const wchar_t* newText)
{
	if ((u32)which < EGDT_COUNT)
		Texts[which] = newText;
}


//! draws a standard 3d button pane
/**	Used for drawing for example buttons in normal state.
It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and
EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.
\param rect: Defining area where to draw.
\param clip: Clip area.
\param element: Pointer to the element which wishes to draw this. This parameter
is usually not used by ISkin, but can be used for example by more complex
implementations to find out how to draw the part exactly. */
// PATCH
void GUISkin::drawColored3DButtonPaneStandard(IGUIElement* element,
					const core::rect<s32>& r,
					const core::rect<s32>* clip,
					const video::SColor* colors)
{
	if (!Driver)
		return;

	if (!colors)
		colors = Colors;

	core::rect<s32> rect = r;

	if ( Type == EGST_BURNING_SKIN )
	{
		rect.UpperLeftCorner.X -= 1;
		rect.UpperLeftCorner.Y -= 1;
		rect.LowerRightCorner.X += 1;
		rect.LowerRightCorner.Y += 1;
		draw3DSunkenPane(element,
					colors[ EGDC_WINDOW ].getInterpolated( 0xFFFFFFFF, 0.9f )
					,false, true, rect, clip);
		return;
	}

	Driver->draw2DRectangle(colors[EGDC_3D_DARK_SHADOW], rect, clip);

	rect.LowerRightCorner.X -= 1;
	rect.LowerRightCorner.Y -= 1;
	Driver->draw2DRectangle(colors[EGDC_3D_HIGH_LIGHT], rect, clip);

	rect.UpperLeftCorner.X += 1;
	rect.UpperLeftCorner.Y += 1;
	Driver->draw2DRectangle(colors[EGDC_3D_SHADOW], rect, clip);

	rect.LowerRightCorner.X -= 1;
	rect.LowerRightCorner.Y -= 1;

	if (!UseGradient)
	{
		Driver->draw2DRectangle(colors[EGDC_3D_FACE], rect, clip);
	}
	else
	{
		const video::SColor c1 = colors[EGDC_3D_FACE];
		const video::SColor c2 = c1.getInterpolated(colors[EGDC_3D_DARK_SHADOW], 0.4f);
		Driver->draw2DRectangle(rect, c1, c1, c2, c2, clip);
	}
}
// END PATCH


//! draws a pressed 3d button pane
/**	Used for drawing for example buttons in pressed state.
It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and
EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.
\param rect: Defining area where to draw.
\param clip: Clip area.
\param element: Pointer to the element which wishes to draw this. This parameter
is usually not used by ISkin, but can be used for example by more complex
implementations to find out how to draw the part exactly. */
// PATCH
void GUISkin::drawColored3DButtonPanePressed(IGUIElement* element,
					const core::rect<s32>& r,
					const core::rect<s32>* clip,
					const video::SColor* colors)
{
	if (!Driver)
		return;

	if (!colors)
		colors = Colors;

	core::rect<s32> rect = r;
	Driver->draw2DRectangle(colors[EGDC_3D_HIGH_LIGHT], rect, clip);

	rect.LowerRightCorner.X -= 1;
	rect.LowerRightCorner.Y -= 1;
	Driver->draw2DRectangle(colors[EGDC_3D_DARK_SHADOW], rect, clip);

	rect.UpperLeftCorner.X += 1;
	rect.UpperLeftCorner.Y += 1;
	Driver->draw2DRectangle(colors[EGDC_3D_SHADOW], rect, clip);

	rect.UpperLeftCorner.X += 1;
	rect.UpperLeftCorner.Y += 1;

	if (!UseGradient)
	{
		Driver->draw2DRectangle(colors[EGDC_3D_FACE], rect, clip);
	}
	else
	{
		const video::SColor c1 = colors[EGDC_3D_FACE];
		const video::SColor c2 = c1.getInterpolated(colors[EGDC_3D_DARK_SHADOW], 0.4f);
		Driver->draw2DRectangle(rect, c1, c1, c2, c2, clip);
	}
}
// END PATCH


//! draws a sunken 3d pane
/** Used for drawing the background of edit, combo or check boxes.
\param element: Pointer to the element which wishes to draw this. This parameter
is usually not used by ISkin, but can be used for example by more complex
implementations to find out how to draw the part exactly.
\param bgcolor: Background color.
\param flat: Specifies if the sunken pane should be flat or displayed as sunken
deep into the ground.
\param rect: Defining area where to draw.
\param clip: Clip area.	*/
// PATCH
void GUISkin::drawColored3DSunkenPane(IGUIElement* element, video::SColor bgcolor,
				bool flat, bool fillBackGround,
				const core::rect<s32>& r,
				const core::rect<s32>* clip,
				const video::SColor* colors)
{
	if (!Driver)
		return;

	if (!colors)
		colors = Colors;

	core::rect<s32> rect = r;

	if (fillBackGround)
		Driver->draw2DRectangle(bgcolor, rect, clip);

	if (flat)
	{
		// draw flat sunken pane

		rect.LowerRightCorner.Y = rect.UpperLeftCorner.Y + 1;
		Driver->draw2DRectangle(colors[EGDC_3D_SHADOW], rect, clip);	// top

		++rect.UpperLeftCorner.Y;
		rect.LowerRightCorner.Y = r.LowerRightCorner.Y;
		rect.LowerRightCorner.X = rect.UpperLeftCorner.X + 1;
		Driver->draw2DRectangle(colors[EGDC_3D_SHADOW], rect, clip);	// left

		rect = r;
		++rect.UpperLeftCorner.Y;
		rect.UpperLeftCorner.X = rect.LowerRightCorner.X - 1;
		Driver->draw2DRectangle(colors[EGDC_3D_HIGH_LIGHT], rect, clip);	// right

		rect = r;
		++rect.UpperLeftCorner.X;
		rect.UpperLeftCorner.Y = r.LowerRightCorner.Y - 1;
		--rect.LowerRightCorner.X;
		Driver->draw2DRectangle(colors[EGDC_3D_HIGH_LIGHT], rect, clip);	// bottom
	}
	else
	{
		// draw deep sunken pane
		rect.LowerRightCorner.Y = rect.UpperLeftCorner.Y + 1;
		Driver->draw2DRectangle(colors[EGDC_3D_SHADOW], rect, clip);	// top
		++rect.UpperLeftCorner.X;
		++rect.UpperLeftCorner.Y;
		--rect.LowerRightCorner.X;
		++rect.LowerRightCorner.Y;
		Driver->draw2DRectangle(colors[EGDC_3D_DARK_SHADOW], rect, clip);

		rect.UpperLeftCorner.X = r.UpperLeftCorner.X;
		rect.UpperLeftCorner.Y = r.UpperLeftCorner.Y+1;
		rect.LowerRightCorner.X = rect.UpperLeftCorner.X + 1;
		rect.LowerRightCorner.Y = r.LowerRightCorner.Y;
		Driver->draw2DRectangle(colors[EGDC_3D_SHADOW], rect, clip);	// left
		++rect.UpperLeftCorner.X;
		++rect.UpperLeftCorner.Y;
		++rect.LowerRightCorner.X;
		--rect.LowerRightCorner.Y;
		Driver->draw2DRectangle(colors[EGDC_3D_DARK_SHADOW], rect, clip);

		rect = r;
		rect.UpperLeftCorner.X = rect.LowerRightCorner.X - 1;
		++rect.UpperLeftCorner.Y;
		Driver->draw2DRectangle(colors[EGDC_3D_HIGH_LIGHT], rect, clip);	// right
		--rect.UpperLeftCorner.X;
		++rect.UpperLeftCorner.Y;
		--rect.LowerRightCorner.X;
		--rect.LowerRightCorner.Y;
		Driver->draw2DRectangle(colors[EGDC_3D_LIGHT], rect, clip);

		rect = r;
		++rect.UpperLeftCorner.X;
		rect.UpperLeftCorner.Y = r.LowerRightCorner.Y - 1;
		--rect.LowerRightCorner.X;
		Driver->draw2DRectangle(colors[EGDC_3D_HIGH_LIGHT], rect, clip);	// bottom
		++rect.UpperLeftCorner.X;
		--rect.UpperLeftCorner.Y;
		--rect.LowerRightCorner.X;
		--rect.LowerRightCorner.Y;
		Driver->draw2DRectangle(colors[EGDC_3D_LIGHT], rect, clip);
	}
}
// END PATCH

//! draws a window background
// return where to draw title bar text.
// PATCH
core::rect<s32> GUISkin::drawColored3DWindowBackground(IGUIElement* element,
				bool drawTitleBar, video::SColor titleBarColor,
				const core::rect<s32>& r,
				const core::rect<s32>* clip,
				core::rect<s32>* checkClientArea,
				const video::SColor* colors)
{
	if (!Driver)
	{
		if ( checkClientArea )
		{
			*checkClientArea = r;
		}
		return r;
	}

	if (!colors)
		colors = Colors;

	core::rect<s32> rect = r;

	// top border
	rect.LowerRightCorner.Y = rect.UpperLeftCorner.Y + 1;
	if ( !checkClientArea )
	{
		Driver->draw2DRectangle(colors[EGDC_3D_HIGH_LIGHT], rect, clip);
	}

	// left border
	rect.LowerRightCorner.Y = r.LowerRightCorner.Y;
	rect.LowerRightCorner.X = rect.UpperLeftCorner.X + 1;
	if ( !checkClientArea )
	{
		Driver->draw2DRectangle(colors[EGDC_3D_HIGH_LIGHT], rect, clip);
	}

	// right border dark outer line
	rect.UpperLeftCorner.X = r.LowerRightCorner.X - 1;
	rect.LowerRightCorner.X = r.LowerRightCorner.X;
	rect.UpperLeftCorner.Y = r.UpperLeftCorner.Y;
	rect.LowerRightCorner.Y = r.LowerRightCorner.Y;
	if ( !checkClientArea )
	{
		Driver->draw2DRectangle(colors[EGDC_3D_DARK_SHADOW], rect, clip);
	}

	// right border bright innner line
	rect.UpperLeftCorner.X -= 1;
	rect.LowerRightCorner.X -= 1;
	rect.UpperLeftCorner.Y += 1;
	rect.LowerRightCorner.Y -= 1;
	if ( !checkClientArea )
	{
		Driver->draw2DRectangle(colors[EGDC_3D_SHADOW], rect, clip);
	}

	// bottom border dark outer line
	rect.UpperLeftCorner.X = r.UpperLeftCorner.X;
	rect.UpperLeftCorner.Y = r.LowerRightCorner.Y - 1;
	rect.LowerRightCorner.Y = r.LowerRightCorner.Y;
	rect.LowerRightCorner.X = r.LowerRightCorner.X;
	if ( !checkClientArea )
	{
		Driver->draw2DRectangle(colors[EGDC_3D_DARK_SHADOW], rect, clip);
	}

	// bottom border bright inner line
	rect.UpperLeftCorner.X += 1;
	rect.LowerRightCorner.X -= 1;
	rect.UpperLeftCorner.Y -= 1;
	rect.LowerRightCorner.Y -= 1;
	if ( !checkClientArea )
	{
		Driver->draw2DRectangle(colors[EGDC_3D_SHADOW], rect, clip);
	}

	// client area for background
	rect = r;
	rect.UpperLeftCorner.X +=1;
	rect.UpperLeftCorner.Y +=1;
	rect.LowerRightCorner.X -= 2;
	rect.LowerRightCorner.Y -= 2;
	if (checkClientArea)
	{
		*checkClientArea = rect;
	}

	if ( !checkClientArea )
	{
		if (!UseGradient)
		{
			Driver->draw2DRectangle(colors[EGDC_3D_FACE], rect, clip);
		}
		else if ( Type == EGST_BURNING_SKIN )
		{
			const video::SColor c1 = colors[EGDC_WINDOW].getInterpolated ( 0xFFFFFFFF, 0.9f );
			const video::SColor c2 = colors[EGDC_WINDOW].getInterpolated ( 0xFFFFFFFF, 0.8f );

			Driver->draw2DRectangle(rect, c1, c1, c2, c2, clip);
		}
		else
		{
			const video::SColor c2 = colors[EGDC_3D_SHADOW];
			const video::SColor c1 = colors[EGDC_3D_FACE];
			Driver->draw2DRectangle(rect, c1, c1, c1, c2, clip);
		}
	}

	// title bar
	rect = r;
	rect.UpperLeftCorner.X += 2;
	rect.UpperLeftCorner.Y += 2;
	rect.LowerRightCorner.X -= 2;
	rect.LowerRightCorner.Y = rect.UpperLeftCorner.Y + getSize(EGDS_WINDOW_BUTTON_WIDTH) + 2;

	if (drawTitleBar )
	{
		if (checkClientArea)
		{
			(*checkClientArea).UpperLeftCorner.Y = rect.LowerRightCorner.Y;
		}
		else
		{
			// draw title bar
			//if (!UseGradient)
			//	Driver->draw2DRectangle(titleBarColor, rect, clip);
			//else
			if ( Type == EGST_BURNING_SKIN )
			{
				const video::SColor c = titleBarColor.getInterpolated( video::SColor(titleBarColor.getAlpha(),255,255,255), 0.8f);
				Driver->draw2DRectangle(rect, titleBarColor, titleBarColor, c, c, clip);
			}
			else
			{
				const video::SColor c = titleBarColor.getInterpolated(video::SColor(titleBarColor.getAlpha(),0,0,0), 0.2f);
				Driver->draw2DRectangle(rect, titleBarColor, c, titleBarColor, c, clip);
			}
		}
	}

	return rect;
}
// END PATCH


//! draws a standard 3d menu pane
/**	Used for drawing for menus and context menus.
It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and
EGDC_3D_FACE for this. See EGUI_DEFAULT_COLOR for details.
\param element: Pointer to the element which wishes to draw this. This parameter
is usually not used by ISkin, but can be used for example by more complex
implementations to find out how to draw the part exactly.
\param rect: Defining area where to draw.
\param clip: Clip area.	*/
// PATCH
void GUISkin::drawColored3DMenuPane(IGUIElement* element,
			const core::rect<s32>& r, const core::rect<s32>* clip,
			const video::SColor* colors)
{
	if (!Driver)
		return;

	if (!colors)
		colors = Colors;

	core::rect<s32> rect = r;

	if ( Type == EGST_BURNING_SKIN )
	{
		rect.UpperLeftCorner.Y -= 3;
		draw3DButtonPaneStandard(element, rect, clip);
		return;
	}

	// in this skin, this is exactly what non pressed buttons look like,
	// so we could simply call
	// draw3DButtonPaneStandard(element, rect, clip);
	// here.
	// but if the skin is transparent, this doesn't look that nice. So
	// We draw it a little bit better, with some more draw2DRectangle calls,
	// but there aren't that much menus visible anyway.

	rect.LowerRightCorner.Y = rect.UpperLeftCorner.Y + 1;
	Driver->draw2DRectangle(colors[EGDC_3D_HIGH_LIGHT], rect, clip);

	rect.LowerRightCorner.Y = r.LowerRightCorner.Y;
	rect.LowerRightCorner.X = rect.UpperLeftCorner.X + 1;
	Driver->draw2DRectangle(colors[EGDC_3D_HIGH_LIGHT], rect, clip);

	rect.UpperLeftCorner.X = r.LowerRightCorner.X - 1;
	rect.LowerRightCorner.X = r.LowerRightCorner.X;
	rect.UpperLeftCorner.Y = r.UpperLeftCorner.Y;
	rect.LowerRightCorner.Y = r.LowerRightCorner.Y;
	Driver->draw2DRectangle(colors[EGDC_3D_DARK_SHADOW], rect, clip);

	rect.UpperLeftCorner.X -= 1;
	rect.LowerRightCorner.X -= 1;
	rect.UpperLeftCorner.Y += 1;
	rect.LowerRightCorner.Y -= 1;
	Driver->draw2DRectangle(colors[EGDC_3D_SHADOW], rect, clip);

	rect.UpperLeftCorner.X = r.UpperLeftCorner.X;
	rect.UpperLeftCorner.Y = r.LowerRightCorner.Y - 1;
	rect.LowerRightCorner.Y = r.LowerRightCorner.Y;
	rect.LowerRightCorner.X = r.LowerRightCorner.X;
	Driver->draw2DRectangle(colors[EGDC_3D_DARK_SHADOW], rect, clip);

	rect.UpperLeftCorner.X += 1;
	rect.LowerRightCorner.X -= 1;
	rect.UpperLeftCorner.Y -= 1;
	rect.LowerRightCorner.Y -= 1;
	Driver->draw2DRectangle(colors[EGDC_3D_SHADOW], rect, clip);

	rect = r;
	rect.UpperLeftCorner.X +=1;
	rect.UpperLeftCorner.Y +=1;
	rect.LowerRightCorner.X -= 2;
	rect.LowerRightCorner.Y -= 2;

	if (!UseGradient)
		Driver->draw2DRectangle(colors[EGDC_3D_FACE], rect, clip);
	else
	{
		const video::SColor c1 = colors[EGDC_3D_FACE];
		const video::SColor c2 = colors[EGDC_3D_SHADOW];
		Driver->draw2DRectangle(rect, c1, c1, c2, c2, clip);
	}
}
// END PATCH


//! draws a standard 3d tool bar
/**	Used for drawing for toolbars and menus.
\param element: Pointer to the element which wishes to draw this. This parameter
is usually not used by ISkin, but can be used for example by more complex
implementations to find out how to draw the part exactly.
\param rect: Defining area where to draw.
\param clip: Clip area.	*/
// PATCH
void GUISkin::drawColored3DToolBar(IGUIElement* element,
				const core::rect<s32>& r,
				const core::rect<s32>* clip,
				const video::SColor* colors)
{
	if (!Driver)
		return;

	if (!colors)
		colors = Colors;

	core::rect<s32> rect = r;

	rect.UpperLeftCorner.X = r.UpperLeftCorner.X;
	rect.UpperLeftCorner.Y = r.LowerRightCorner.Y - 1;
	rect.LowerRightCorner.Y = r.LowerRightCorner.Y;
	rect.LowerRightCorner.X = r.LowerRightCorner.X;
	Driver->draw2DRectangle(colors[EGDC_3D_SHADOW], rect, clip);

	rect = r;
	rect.LowerRightCorner.Y -= 1;

	if (!UseGradient)
	{
		Driver->draw2DRectangle(colors[EGDC_3D_FACE], rect, clip);
	}
	else
	if ( Type == EGST_BURNING_SKIN )
	{
		const video::SColor c1 = 0xF0000000 | colors[EGDC_3D_FACE].color;
		const video::SColor c2 = 0xF0000000 | colors[EGDC_3D_SHADOW].color;

		rect.LowerRightCorner.Y += 1;
		Driver->draw2DRectangle(rect, c1, c2, c1, c2, clip);
	}
	else
	{
		const video::SColor c1 = colors[EGDC_3D_FACE];
		const video::SColor c2 = colors[EGDC_3D_SHADOW];
		Driver->draw2DRectangle(rect, c1, c1, c2, c2, clip);
	}
}
// END PATCH

//! draws a tab button
/**	Used for drawing for tab buttons on top of tabs.
\param element: Pointer to the element which wishes to draw this. This parameter
is usually not used by ISkin, but can be used for example by more complex
implementations to find out how to draw the part exactly.
\param active: Specifies if the tab is currently active.
\param rect: Defining area where to draw.
\param clip: Clip area.	*/
// PATCH
void GUISkin::drawColored3DTabButton(IGUIElement* element, bool active,
	const core::rect<s32>& frameRect, const core::rect<s32>* clip, EGUI_ALIGNMENT alignment,
	const video::SColor* colors)
{
	if (!Driver)
		return;

	if (!colors)
		colors = Colors;

	core::rect<s32> tr = frameRect;

	if ( alignment == EGUIA_UPPERLEFT )
	{
		tr.LowerRightCorner.X -= 2;
		tr.LowerRightCorner.Y = tr.UpperLeftCorner.Y + 1;
		tr.UpperLeftCorner.X += 1;
		Driver->draw2DRectangle(colors[EGDC_3D_HIGH_LIGHT], tr, clip);

		// draw left highlight
		tr = frameRect;
		tr.LowerRightCorner.X = tr.UpperLeftCorner.X + 1;
		tr.UpperLeftCorner.Y += 1;
		Driver->draw2DRectangle(colors[EGDC_3D_HIGH_LIGHT], tr, clip);

		// draw grey background
		tr = frameRect;
		tr.UpperLeftCorner.X += 1;
		tr.UpperLeftCorner.Y += 1;
		tr.LowerRightCorner.X -= 2;
		Driver->draw2DRectangle(colors[EGDC_3D_FACE], tr, clip);

		// draw right middle gray shadow
		tr.LowerRightCorner.X += 1;
		tr.UpperLeftCorner.X = tr.LowerRightCorner.X - 1;
		Driver->draw2DRectangle(colors[EGDC_3D_SHADOW], tr, clip);

		tr.LowerRightCorner.X += 1;
		tr.UpperLeftCorner.X += 1;
		tr.UpperLeftCorner.Y += 1;
		Driver->draw2DRectangle(colors[EGDC_3D_DARK_SHADOW], tr, clip);
	}
	else
	{
		tr.LowerRightCorner.X -= 2;
		tr.UpperLeftCorner.Y = tr.LowerRightCorner.Y - 1;
		tr.UpperLeftCorner.X += 1;
		Driver->draw2DRectangle(colors[EGDC_3D_HIGH_LIGHT], tr, clip);

		// draw left highlight
		tr = frameRect;
		tr.LowerRightCorner.X = tr.UpperLeftCorner.X + 1;
		tr.LowerRightCorner.Y -= 1;
		Driver->draw2DRectangle(colors[EGDC_3D_HIGH_LIGHT], tr, clip);

		// draw grey background
		tr = frameRect;
		tr.UpperLeftCorner.X += 1;
		tr.UpperLeftCorner.Y -= 1;
		tr.LowerRightCorner.X -= 2;
		tr.LowerRightCorner.Y -= 1;
		Driver->draw2DRectangle(colors[EGDC_3D_FACE], tr, clip);

		// draw right middle gray shadow
		tr.LowerRightCorner.X += 1;
		tr.UpperLeftCorner.X = tr.LowerRightCorner.X - 1;
		//tr.LowerRightCorner.Y -= 1;
		Driver->draw2DRectangle(colors[EGDC_3D_SHADOW], tr, clip);

		tr.LowerRightCorner.X += 1;
		tr.UpperLeftCorner.X += 1;
		tr.LowerRightCorner.Y -= 1;
		Driver->draw2DRectangle(colors[EGDC_3D_DARK_SHADOW], tr, clip);
	}
}
// END PATCH


//! draws a tab control body
/**	\param element: Pointer to the element which wishes to draw this. This parameter
is usually not used by ISkin, but can be used for example by more complex
implementations to find out how to draw the part exactly.
\param border: Specifies if the border should be drawn.
\param background: Specifies if the background should be drawn.
\param rect: Defining area where to draw.
\param clip: Clip area.	*/
// PATCH
void GUISkin::drawColored3DTabBody(IGUIElement* element, bool border, bool background,
	const core::rect<s32>& rect, const core::rect<s32>* clip, s32 tabHeight, EGUI_ALIGNMENT alignment,
	const video::SColor* colors)
{
	if (!Driver)
		return;

	if (!colors)
		colors = Colors;

	core::rect<s32> tr = rect;

	if ( tabHeight == -1 )
		tabHeight = getSize(gui::EGDS_BUTTON_HEIGHT);

	// draw border.
	if (border)
	{
		if ( alignment == EGUIA_UPPERLEFT )
		{
			// draw left hightlight
			tr.UpperLeftCorner.Y += tabHeight + 2;
			tr.LowerRightCorner.X = tr.UpperLeftCorner.X + 1;
			Driver->draw2DRectangle(colors[EGDC_3D_HIGH_LIGHT], tr, clip);

			// draw right shadow
			tr.UpperLeftCorner.X = rect.LowerRightCorner.X - 1;
			tr.LowerRightCorner.X = tr.UpperLeftCorner.X + 1;
			Driver->draw2DRectangle(colors[EGDC_3D_SHADOW], tr, clip);

			// draw lower shadow
			tr = rect;
			tr.UpperLeftCorner.Y = tr.LowerRightCorner.Y - 1;
			Driver->draw2DRectangle(colors[EGDC_3D_SHADOW], tr, clip);
		}
		else
		{
			// draw left hightlight
			tr.LowerRightCorner.Y -= tabHeight + 2;
			tr.LowerRightCorner.X = tr.UpperLeftCorner.X + 1;
			Driver->draw2DRectangle(colors[EGDC_3D_HIGH_LIGHT], tr, clip);

			// draw right shadow
			tr.UpperLeftCorner.X = rect.LowerRightCorner.X - 1;
			tr.LowerRightCorner.X = tr.UpperLeftCorner.X + 1;
			Driver->draw2DRectangle(colors[EGDC_3D_SHADOW], tr, clip);

			// draw lower shadow
			tr = rect;
			tr.LowerRightCorner.Y = tr.UpperLeftCorner.Y + 1;
			Driver->draw2DRectangle(colors[EGDC_3D_HIGH_LIGHT], tr, clip);
		}
	}

	if (background)
	{
		if ( alignment == EGUIA_UPPERLEFT )
		{
			tr = rect;
			tr.UpperLeftCorner.Y += tabHeight + 2;
			tr.LowerRightCorner.X -= 1;
			tr.UpperLeftCorner.X += 1;
			tr.LowerRightCorner.Y -= 1;
		}
		else
		{
			tr = rect;
			tr.UpperLeftCorner.X += 1;
			tr.UpperLeftCorner.Y -= 1;
			tr.LowerRightCorner.X -= 1;
			tr.LowerRightCorner.Y -= tabHeight + 2;
			//tr.UpperLeftCorner.X += 1;
		}

		if (!UseGradient)
			Driver->draw2DRectangle(colors[EGDC_3D_FACE], tr, clip);
		else
		{
			video::SColor c1 = colors[EGDC_3D_FACE];
			video::SColor c2 = colors[EGDC_3D_SHADOW];
			Driver->draw2DRectangle(tr, c1, c1, c2, c2, clip);
		}
	}
}
// END PATCH


//! draws an icon, usually from the skin's sprite bank
/**	\param parent: Pointer to the element which wishes to draw this icon.
This parameter is usually not used by IGUISkin, but can be used for example
by more complex implementations to find out how to draw the part exactly.
\param icon: Specifies the icon to be drawn.
\param position: The position to draw the icon
\param starttime: The time at the start of the animation
\param currenttime: The present time, used to calculate the frame number
\param loop: Whether the animation should loop or not
\param clip: Clip area.	*/
// PATCH
void GUISkin::drawColoredIcon(IGUIElement* element, EGUI_DEFAULT_ICON icon,
			const core::position2di position,
			u32 starttime, u32 currenttime,
			bool loop, const core::rect<s32>* clip,
			const video::SColor* colors)
{
	if (!SpriteBank)
		return;

	if (!colors)
		colors = Colors;

	bool gray = element && !element->isEnabled();
	SpriteBank->draw2DSprite(Icons[icon], position, clip,
			colors[gray? EGDC_GRAY_WINDOW_SYMBOL : EGDC_WINDOW_SYMBOL], starttime, currenttime, loop, true);
}
// END PATCH


EGUI_SKIN_TYPE GUISkin::getType() const
{
	return Type;
}


//! draws a 2d rectangle.
void GUISkin::draw2DRectangle(IGUIElement* element,
		const video::SColor &color, const core::rect<s32>& pos,
		const core::rect<s32>* clip)
{
	Driver->draw2DRectangle(color, pos, clip);
}


//! Writes attributes of the object.
//! Implement this to expose the attributes of your scene node animator for
//! scripting languages, editors, debuggers or xml serialization purposes.
void GUISkin::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const
{
	u32 i;
	for (i=0; i<EGDC_COUNT; ++i)
		out->addColor(GUISkinColorNames[i], Colors[i]);

	for (i=0; i<EGDS_COUNT; ++i)
		out->addInt(GUISkinSizeNames[i], Sizes[i]);

	for (i=0; i<EGDT_COUNT; ++i)
		out->addString(GUISkinTextNames[i], Texts[i].c_str());

	for (i=0; i<EGDI_COUNT; ++i)
		out->addInt(GUISkinIconNames[i], Icons[i]);
}


//! Reads attributes of the object.
//! Implement this to set the attributes of your scene node animator for
//! scripting languages, editors, debuggers or xml deserialization purposes.
void GUISkin::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options)
{
	// TODO: This is not nice code for downward compatibility, whenever new values are added and users
	// load an old skin the corresponding values will be set to 0.
	u32 i;
	for (i=0; i<EGDC_COUNT; ++i)
		Colors[i] = in->getAttributeAsColor(GUISkinColorNames[i]);

	for (i=0; i<EGDS_COUNT; ++i)
		Sizes[i] = in->getAttributeAsInt(GUISkinSizeNames[i]);

	for (i=0; i<EGDT_COUNT; ++i)
		Texts[i] = in->getAttributeAsStringW(GUISkinTextNames[i]);

	for (i=0; i<EGDI_COUNT; ++i)
		Icons[i] = in->getAttributeAsInt(GUISkinIconNames[i]);
}


//! gets the colors
// PATCH
void GUISkin::getColors(video::SColor* colors)
{
	u32 i;
	for (i=0; i<EGDC_COUNT; ++i)
		colors[i] = Colors[i];
}
// END PATCH

} // end namespace gui
} // end namespace irr


#endif // _IRR_COMPILE_WITH_GUI_