Skip to content

Commit

Permalink
fix(nui/core): register 'cfx-nui-*' for any resource
Browse files Browse the repository at this point in the history
This apparently was only registered for resources with a UI page, unlike
the old `nui://` scheme.
  • Loading branch information
blattersturm committed Feb 3, 2023
1 parent c51b83a commit b0d492e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/components/nui-resources/src/ResourceUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ bool ResourceUI::Create()
std::transform(resourceName.begin(), resourceName.end(), resourceName.begin(), ::ToLower);
nui::RegisterSchemeHandlerFactory("http", resourceName, Instance<NUISchemeHandlerFactory>::Get());
nui::RegisterSchemeHandlerFactory("https", resourceName, Instance<NUISchemeHandlerFactory>::Get());
nui::RegisterSchemeHandlerFactory("https", "cfx-nui-" + resourceName, Instance<NUISchemeHandlerFactory>::Get());

// get the metadata component
fwRefContainer<fx::ResourceMetaDataComponent> metaData = m_resource->GetComponent<fx::ResourceMetaDataComponent>();
Expand All @@ -63,7 +64,6 @@ bool ResourceUI::Create()

// get the page name from the iterator
std::string pageName = uiPageData.begin()->second;
nui::RegisterSchemeHandlerFactory("https", "cfx-nui-" + resourceName, Instance<NUISchemeHandlerFactory>::Get());

// create the NUI frame
auto rmvRes = metaData->IsManifestVersionBetween("cerulean", "");
Expand Down

0 comments on commit b0d492e

Please sign in to comment.