text: ﻿#pragma once
  #include "Common.hpp"
  #include "Widget.hpp"
  #include "WidgetFactory.hpp"
  #include "IRenderer.hpp"
  
  namespace GUI
  {
  	void Init(std::shared_ptr<Font> font);
  
  	WidgetFactory& GetFactory();
  
  	void Update();
  
  	template<class WidgetT, class UidT>
  	WidgetT& CreateWidget(UidT uid, void* returnAddr = _ReturnAddress())
  	{
  		return std::get<WidgetT&>(GetFactory().getOrCreateWidget<WidgetT>(returnAddr, std::hash<UidT>()(uid)));
  	}
  }
  