| 123456789101112131415161718192021222324252627 |
- #include "BsGUISkin.h"
- #include "BsGUIElementStyle.h"
- #include "CmDebug.h"
- using namespace CamelotFramework;
- namespace BansheeEngine
- {
- GUIElementStyle GUISkin::DefaultStyle;
- const GUIElementStyle* GUISkin::getStyle(const String& guiElemType) const
- {
- auto iterFind = mStyles.find(guiElemType);
- if(iterFind != mStyles.end())
- return &iterFind->second;
- LOGWRN("Cannot find GUI style with name: " + guiElemType + ". Returning default style.");
- return &DefaultStyle;
- }
- void GUISkin::setStyle(const String& guiElemType, const GUIElementStyle& style)
- {
- mStyles[guiElemType] = style;
- }
- }
|