2015-12-06 01:27:02 +00:00
|
|
|
#ifndef RUDE_VIEW_MANAGER_HPP
|
|
|
|
#define RUDE_VIEW_MANAGER_HPP
|
|
|
|
|
|
|
|
#include <Specter/Specter.hpp>
|
|
|
|
#include <HECL/CVarManager.hpp>
|
|
|
|
|
|
|
|
namespace RUDE
|
|
|
|
{
|
|
|
|
|
|
|
|
class ViewManager : Specter::IViewManager
|
|
|
|
{
|
|
|
|
HECL::CVarManager& m_cvarManager;
|
|
|
|
Specter::FontCache m_fontCache;
|
|
|
|
Specter::ViewResources m_viewResources;
|
|
|
|
std::unique_ptr<boo::IWindow> m_mainWindow;
|
|
|
|
std::unique_ptr<Specter::RootView> m_rootView;
|
|
|
|
|
2015-12-08 04:27:35 +00:00
|
|
|
Specter::Space* m_space1;
|
|
|
|
Specter::Space* m_space2;
|
|
|
|
|
2015-12-08 01:49:54 +00:00
|
|
|
HECL::CVar* m_cvPixelFactor;
|
2015-12-09 01:04:50 +00:00
|
|
|
|
|
|
|
bool m_updatePf = false;
|
|
|
|
float m_reqPf;
|
2015-12-06 01:27:02 +00:00
|
|
|
|
|
|
|
void SetupRootView();
|
|
|
|
public:
|
|
|
|
ViewManager(HECL::Runtime::FileStoreManager& fileMgr, HECL::CVarManager& cvarMgr)
|
|
|
|
: m_cvarManager(cvarMgr), m_fontCache(fileMgr) {}
|
|
|
|
|
2015-12-08 04:27:35 +00:00
|
|
|
Specter::RootView& rootView() const {return *m_rootView;}
|
2015-12-09 01:04:50 +00:00
|
|
|
void RequestPixelFactor(float pf)
|
|
|
|
{
|
|
|
|
m_reqPf = pf;
|
|
|
|
m_updatePf = true;
|
|
|
|
}
|
2015-12-08 04:27:35 +00:00
|
|
|
|
2015-12-06 01:27:02 +00:00
|
|
|
void init(boo::IApplication* app);
|
|
|
|
bool proc();
|
|
|
|
void stop();
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // RUDE_VIEW_MANAGER_HPP
|