mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-12 07:48:16 -05:00
Make use of custom functions when converting menus
This commit is contained in:
@ -37,6 +37,7 @@ public:
|
||||
return dynamic_cast<T*>(foundEntry->second.get());
|
||||
|
||||
auto newState = std::make_unique<T>();
|
||||
newState->SetZone(m_zone);
|
||||
auto* newStatePtr = newState.get();
|
||||
m_zone_asset_loader_states.emplace(std::make_pair<std::type_index, std::unique_ptr<IZoneAssetLoaderState>>(typeid(T), std::move(newState)));
|
||||
return newStatePtr;
|
||||
|
@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include "Zone/Zone.h"
|
||||
|
||||
class IZoneAssetLoaderState
|
||||
{
|
||||
@ -11,4 +12,9 @@ public:
|
||||
IZoneAssetLoaderState(IZoneAssetLoaderState&& other) noexcept = default;
|
||||
IZoneAssetLoaderState& operator=(const IZoneAssetLoaderState& other) = default;
|
||||
IZoneAssetLoaderState& operator=(IZoneAssetLoaderState&& other) noexcept = default;
|
||||
};
|
||||
|
||||
virtual void SetZone(Zone* zone)
|
||||
{
|
||||
// Do nothing by default
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user