UWP: Fix loading the default theme.

Hopefully takes care of #15496

See also #15464
This commit is contained in:
Henrik Rydgård 2022-04-24 14:12:15 +02:00
parent 13fcff328c
commit 2178567ba0
4 changed files with 26 additions and 4 deletions

View File

@ -36,6 +36,7 @@ void UIContext::Init(Draw::DrawContext *thin3d, Draw::Pipeline *uipipe, Draw::Pi
}
void UIContext::setUIAtlas(const std::string &name) {
_dbg_assert_(!name.empty());
UIAtlas_ = name;
}

View File

@ -73,6 +73,7 @@ static void LoadThemeInfo(const std::vector<Path> &directories) {
themeInfos.clear();
ThemeInfo def{};
def.name = "Default";
def.UIAtlas = "ui_atlas";
themeInfos.push_back(def);
// This will update the theme if already present, as such default in assets/theme will get priority if exist

View File

@ -599,6 +599,20 @@
<None Include="..\assets\ppge_atlas.meta">
<DeploymentContent>true</DeploymentContent>
</None>
<None Include="..\assets\themes\defaultthemes.ini">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='UWP Gold|Win32'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='UWP Gold|ARM64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='UWP Gold|ARM'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='UWP Gold|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
</None>
<None Include="..\assets\ui_atlas.meta">
<DeploymentContent>true</DeploymentContent>
</None>

View File

@ -50,6 +50,9 @@
<Filter Include="Content\flash0\font">
<UniqueIdentifier>{d2294c79-82bd-470f-b984-f838f0fbcd25}</UniqueIdentifier>
</Filter>
<Filter Include="Content\themes">
<UniqueIdentifier>{da2113a6-e616-4fc9-8be3-ff75b963664b}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="App.cpp" />
@ -359,6 +362,9 @@
<None Include="..\assets\ui_atlas.meta">
<Filter>Content</Filter>
</None>
<None Include="..\assets\themes\defaultthemes.ini">
<Filter>Content\themes</Filter>
</None>
</ItemGroup>
<ItemGroup>
<Text Include="Content\gamecontrollerdb.txt">