tibia-client/src/framework/ui/uimanager.h

35 lines
852 B
C
Raw Normal View History

2011-08-14 04:09:11 +02:00
#ifndef UIMANAGER_H
#define UIMANAGER_H
2011-08-15 16:06:15 +02:00
#include "declarations.h"
#include <framework/platform/platformevent.h>
#include <framework/otml/declarations.h>
2011-08-14 04:09:11 +02:00
class UIManager
{
public:
void init();
void terminate();
void render();
void resize(const Size& size);
2011-08-15 21:15:49 +02:00
void inputEvent(const PlatformEvent& event);
2011-08-14 04:09:11 +02:00
bool importStyles(const std::string& file);
void importStyleFromOTML(const OTMLNodePtr& styleNode);
OTMLNodePtr getStyle(const std::string& styleName);
UIWidgetPtr loadUI(const std::string& file, const UIWidgetPtr& parent = nullptr);
UIWidgetPtr loadWidgetFromOTML(const OTMLNodePtr& widgetNode, const UIWidgetPtr& parent);
2011-08-14 04:09:11 +02:00
UIWidgetPtr getRootWidget() { return m_rootWidget; }
private:
UIWidgetPtr m_rootWidget;
std::map<std::string, OTMLNodePtr> m_styles;
};
extern UIManager g_ui;
#endif