[ImenuDef_t] Menu marking.
This commit is contained in:
parent
8c36783f1d
commit
26f8b86936
@ -2,6 +2,30 @@
|
|||||||
|
|
||||||
namespace Assets
|
namespace Assets
|
||||||
{
|
{
|
||||||
|
void ImenuDef_t::mark(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder)
|
||||||
|
{
|
||||||
|
Game::menuDef_t *asset = header.menu;
|
||||||
|
|
||||||
|
if (asset->window.background)
|
||||||
|
{
|
||||||
|
builder->loadAsset(Game::XAssetType::ASSET_TYPE_MATERIAL, asset->window.background);
|
||||||
|
}
|
||||||
|
|
||||||
|
// mark items
|
||||||
|
for (int i = 0; i < asset->itemCount; i++)
|
||||||
|
{
|
||||||
|
if (asset->items[i]->window.background)
|
||||||
|
{
|
||||||
|
builder->loadAsset(Game::XAssetType::ASSET_TYPE_MATERIAL, asset->items[i]->window.background);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (asset->items[i]->focusSound)
|
||||||
|
{
|
||||||
|
builder->loadAsset(Game::XAssetType::ASSET_TYPE_SOUND, asset->items[i]->focusSound);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void save_windowDef_t(Game::windowDef_t* asset, T* dest, Components::ZoneBuilder::Zone* builder)
|
void save_windowDef_t(Game::windowDef_t* asset, T* dest, Components::ZoneBuilder::Zone* builder)
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,7 @@ namespace Assets
|
|||||||
virtual Game::XAssetType getType() override { return Game::XAssetType::ASSET_TYPE_MENU; };
|
virtual Game::XAssetType getType() override { return Game::XAssetType::ASSET_TYPE_MENU; };
|
||||||
|
|
||||||
virtual void save(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder) override;
|
virtual void save(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder) override;
|
||||||
// virtual void mark(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder) override;
|
virtual void mark(Game::XAssetHeader header, Components::ZoneBuilder::Zone* builder) override;
|
||||||
// virtual void load(Game::XAssetHeader* header, std::string name, Components::ZoneBuilder::Zone* builder) override;
|
// virtual void load(Game::XAssetHeader* header, std::string name, Components::ZoneBuilder::Zone* builder) override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user