gui manager hacks
This commit is contained in:
parent
a968ce2ad0
commit
91638909f6
@ -158,6 +158,8 @@ public:
|
|||||||
|
|
||||||
void DeleteWidgetOnUpdate(const std::string& name);
|
void DeleteWidgetOnUpdate(const std::string& name);
|
||||||
void DeleteWidgetGroupOnUpdate(const std::string& groupName);
|
void DeleteWidgetGroupOnUpdate(const std::string& groupName);
|
||||||
|
void DeleteWidgetLaterOnUpdate(const std::string& name);
|
||||||
|
void DeleteWidgetGroupLaterOnUpdate(const std::string& groupName);
|
||||||
|
|
||||||
void Update(cardinal dt);
|
void Update(cardinal dt);
|
||||||
void Draw();
|
void Draw();
|
||||||
|
@ -37,6 +37,7 @@ namespace SE
|
|||||||
void TryUpdateMainThreadId();
|
void TryUpdateMainThreadId();
|
||||||
|
|
||||||
void PerformInMainThreadAsync(boost::function<void()> f);
|
void PerformInMainThreadAsync(boost::function<void()> f);
|
||||||
|
void PerformInMainThreadAsyncLater(boost::function<void()> f);
|
||||||
|
|
||||||
template<typename RETURNTYPE>
|
template<typename RETURNTYPE>
|
||||||
RETURNTYPE PerformInMainThread(boost::function<RETURNTYPE()> f);
|
RETURNTYPE PerformInMainThread(boost::function<RETURNTYPE()> f);
|
||||||
|
@ -90,16 +90,29 @@ void TGUIManager::DeleteWidgetGroup(std::string groupName)
|
|||||||
|
|
||||||
void TGUIManager::DeleteWidgetOnUpdate(const std::string& name)
|
void TGUIManager::DeleteWidgetOnUpdate(const std::string& name)
|
||||||
{
|
{
|
||||||
|
//PerformInMainThreadAsyncLater(boost::bind(&TGUIManager::DeleteWidget, this, name));
|
||||||
PerformInMainThreadAsync(boost::bind(&TGUIManager::DeleteWidget, this, name));
|
PerformInMainThreadAsync(boost::bind(&TGUIManager::DeleteWidget, this, name));
|
||||||
//PostUpdateSignal.connect(boost::bind(&TGUIManager::DeleteWidget, this, name));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TGUIManager::DeleteWidgetGroupOnUpdate(const std::string& groupName)
|
void TGUIManager::DeleteWidgetGroupOnUpdate(const std::string& groupName)
|
||||||
{
|
{
|
||||||
|
//PerformInMainThreadAsyncLater(boost::bind(&TGUIManager::DeleteWidgetGroup, this, groupName));
|
||||||
PerformInMainThreadAsync(boost::bind(&TGUIManager::DeleteWidgetGroup, this, groupName));
|
PerformInMainThreadAsync(boost::bind(&TGUIManager::DeleteWidgetGroup, this, groupName));
|
||||||
//PostUpdateSignal.connect(boost::bind(&TGUIManager::DeleteWidgetGroup, this, groupName));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TGUIManager::DeleteWidgetLaterOnUpdate(const std::string& name)
|
||||||
|
{
|
||||||
|
PerformInMainThreadAsyncLater(boost::bind(&TGUIManager::DeleteWidget, this, name));
|
||||||
|
}
|
||||||
|
|
||||||
|
void TGUIManager::DeleteWidgetGroupLaterOnUpdate(const std::string& groupName)
|
||||||
|
{
|
||||||
|
PerformInMainThreadAsyncLater(boost::bind(&TGUIManager::DeleteWidgetGroup, this, groupName));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void TGUIManager::AddWidgetTransformTask(TWidgetTransformTask widgetTransformTask)
|
void TGUIManager::AddWidgetTransformTask(TWidgetTransformTask widgetTransformTask)
|
||||||
|
@ -46,8 +46,11 @@ namespace SE
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PerformInMainThreadAsyncLater(boost::function<void()> f)
|
||||||
|
{
|
||||||
|
ST::MainThreadIoService.post(f);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user