mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 14:58:10 -05:00
Only load menu files once
This commit is contained in:
@ -2,11 +2,6 @@
|
||||
|
||||
using namespace menu;
|
||||
|
||||
void MenuAssetZoneState::AddLoadedFile(std::string loadedFileName)
|
||||
{
|
||||
m_loaded_files.emplace(std::move(loadedFileName));
|
||||
}
|
||||
|
||||
void MenuAssetZoneState::AddFunction(std::unique_ptr<CommonFunctionDef> function)
|
||||
{
|
||||
m_functions_by_name.emplace(std::make_pair(function->m_name, function.get()));
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#include "AssetLoading/IZoneAssetLoaderState.h"
|
||||
@ -12,15 +11,13 @@ namespace menu
|
||||
class MenuAssetZoneState final : public IZoneAssetLoaderState
|
||||
{
|
||||
public:
|
||||
std::set<std::string> m_loaded_files;
|
||||
std::vector<std::unique_ptr<CommonFunctionDef>> m_functions;
|
||||
std::vector<std::unique_ptr<CommonMenuDef>> m_menus;
|
||||
|
||||
std::map<std::string, CommonFunctionDef*> m_functions_by_name;
|
||||
|
||||
MenuAssetZoneState() = default;
|
||||
|
||||
void AddLoadedFile(std::string loadedFileName);
|
||||
|
||||
void AddFunction(std::unique_ptr<CommonFunctionDef> function);
|
||||
void AddMenu(std::unique_ptr<CommonMenuDef> menu);
|
||||
};
|
||||
|
Reference in New Issue
Block a user