2011-04-09 01:20:44 +02:00
|
|
|
/* The MIT License
|
|
|
|
*
|
|
|
|
* Copyright (c) 2010 OTClient, https://github.com/edubart/otclient
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
* in the Software without restriction, including without limitation the rights
|
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
* THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef UISKIN_H
|
|
|
|
#define UISKIN_H
|
|
|
|
|
2011-04-17 21:14:24 +02:00
|
|
|
#include <prerequisites.h>
|
|
|
|
#include <graphics/texture.h>
|
|
|
|
#include <ui/uielementskin.h>
|
2011-05-12 00:16:11 +02:00
|
|
|
#include <graphics/font.h>
|
2011-04-09 01:20:44 +02:00
|
|
|
|
|
|
|
class UISkins
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
UISkins() { }
|
2011-04-10 03:13:12 +02:00
|
|
|
|
2011-05-19 19:11:05 +02:00
|
|
|
void load(const std::string& skinName);
|
2011-04-10 03:13:12 +02:00
|
|
|
void terminate();
|
2011-04-09 01:20:44 +02:00
|
|
|
|
2011-05-09 22:38:01 +02:00
|
|
|
UIElementSkinPtr getElementSkin(UI::ElementType elementType, const std::string& name = "default");
|
2011-04-09 01:20:44 +02:00
|
|
|
TexturePtr getDefaultTexture() { return m_defaultTexture; }
|
2011-05-12 00:16:11 +02:00
|
|
|
FontPtr getDefaultFont() { return m_defaultFont; }
|
|
|
|
Color getDefaultFontColor() { return m_defaultFontColor; }
|
2011-04-09 01:20:44 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
TexturePtr m_defaultTexture;
|
2011-05-12 00:16:11 +02:00
|
|
|
FontPtr m_defaultFont;
|
|
|
|
Color m_defaultFontColor;
|
2011-04-09 01:20:44 +02:00
|
|
|
|
2011-04-17 21:14:24 +02:00
|
|
|
std::vector<UIElementSkinPtr> m_elementSkins;
|
2011-04-09 01:20:44 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
extern UISkins g_uiSkins;
|
|
|
|
|
|
|
|
#endif // UISKIN_H
|