> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MicrosoftGame.config 元素 - ShellVisuals

> MicrosoftGame.config 元素 - ShellVisuals

# MicrosoftGame.config 元素 - ShellVisuals

定义游戏在 Shell 中的展现方式，例如图像和名称。在注册期间用于在 Shell 中展示游戏。

## 父元素

此元素的父元素为 Game 元素。

## 要求

此元素为可选项，不要求必须设置。

## 平台

此元素适用于 PC 和主机。

## 行为

* 属性包括：
  * DefaultDisplayName
  * PublisherDisplayName
  * StoreLogo
  * Square150x150Logo
  * Square44x44Logo
  * Square480x480Logo
  * Description
  * ForegroundText
  * BackgroundColor
  * SplashScreenImage
* ForegroundText 属性的默认值为 'light'。BackgroundColor 属性的默认值为 'transparent'。所有其他属性均无默认值。
* 允许值：
  * DefaultDisplayName 属性为最长 256 个字符的字符串。
  * PublisherDisplayName 属性为最长 256 个字符的字符串。
  * StoreLogo 属性为指向包根目录下 .PNG 文件的有效文件路径。
  * Square150x150Logo 属性为指向包根目录下 .PNG 文件的有效文件路径。
  * Square44x44Logo 属性为指向包根目录下 .PNG 文件的有效文件路径。
  * Square480x480Logo 属性为指向包根目录下 .PNG 文件的有效文件路径。
  * Description 为字符串。
  * ForegroundText 属性为 light 或 dark。
  * BackgroundColor 属性为使用常用颜色名称或十六进制代码 (#RRGGBB) 格式的颜色值。
  * SplashScreenImage 属性为指向包根目录下 .PNG 文件的有效文件路径。

## 备注

* StoreLogo、Square150x150Logo、Square44x44Logo、Square480x480Logo 和 SplashScreenImage 属性都是打包所必需的。
* SplashScreenImage 属性对于 PC 游戏并非必需，但作为最佳实践建议提供。
* 所有其他属性均为可选。
* 有关颜色值常用名称的完整列表，请参阅 MicrosoftGame.config 架构中的 ST\_Color 部分。

### ShellVisuals 与 Executable 中的徽标

Executable 中的 OverrideLogo 元素与 ShellVisuals 中的 Logo 元素相关联。若已定义 OverrideLogo，则对于该可执行文件，其优先级高于 Logo 中所定义的内容。ShellVisuals 中的 Logo 应在包层级定义。对于仅包含单个可执行文件的包，只需 Logo 元素即可。Logo 大小应为 Square150x150Logo 属性对应的 150x150 像素。

OverrideLogo 属性将为该特定 Executable 覆盖 ShellVisuals 中指定的 Square150x150Logo .png 文件。除 OverrideLogo 属性外，还有 OverrideSquare480x480Logo 和 Square44x44Logo 属性，可分别指定用于覆盖该特定 Executable 在 ShellVisuals 中指定的 Square480x480Logo 和 Square44x44Logo .png 文件。

下面的示例详细说明了针对 Logo/DisplayName 覆盖的元素和属性配置。

```xml theme={null}
<ShellVisuals DefaultDisplayName="MyGame"
                Square150x150Logo="GraphicsLogo.png"
                Square44x44Logo="SmallLogo.png"
                Square480x480Logo="LargeLogo.png"
                SplashScreenImage="SplashScreen.png"
                StoreLogo="StoreLogo.png"/>

<ExecutableList>
    <Executable Name="MyGame.exe"
                OverrideDisplayName="MyGameOverride"
                OverrideLogo="GraphicsLogoOverride.png"
                OverrideSquare44x44Logo="SmallLogoOverride.png"
                OverrideSquare480x480Logo="LargeLogoOverride.png"
                OverrideSplashScreenImage="SplashScreenOverride.png"/>
</ExecutableList>
```

`OverrideDisplayName` 和 `OverrideSplashScreenImage` 的功能类似于 OverrideLogo。

#### 图像要求

对于 PC 和主机上的非 DLC 包，Square150x150Logo、Square44x44Logo 和 StoreLogo 均为必需项。SplashScreenImage 在主机上为必需项，但自 2021 年 2 月 GDK 起，在 PC 上为可选项。对于 DLC 包，仅需要 StoreLogo。

#### 图像分辨率和格式

所需的徽标格式为 .png，且对像素格式有要求（24-bpp RGB 或 32-bpp ARGB/PARGB）。SubmissionValidator 会强制执行这些要求。

每个图像都有所需的图像分辨率，具体如下：

* Square150x150Logo: 150x150
* Square44x44Logo: 44x44
* Square480x480Logo: 480x480
* StoreLogo: 100x100
* SplashScreenImage: 1920x1080

#### SplashScreenImage

SplashScreenImage 是游戏启动时所使用的图像。

Executable 元素的 OverrideSplashScreenImage 属性用于覆盖启动游戏时显示的启动屏幕图像。此覆盖机制现在允许在开发过程中为特定可执行文件设置启动屏幕图像。

<Note>虽然 SplashScreenImage 属性与平台无关，但目前 XBOX 主机开发要求提供，PC 开发则可选。</Note>

#### BackgroundColor

BackgroundColor 是 ShellVisuals 元素的一个属性。它使用 HTML 颜色代码为 PC 上的游戏定义背景色。该颜色会显示为任务栏和"开始"菜单中徽标周围的边框。

## 另请参阅

[MicrosoftGame.config 参考 - 目录](/reference/system/microsoftgameconfig/elements/gc-microsoftgameconfig-toc)


## Related topics

- [MicrosoftGame.config 元素 - Resources](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-resources.md)
- [MicrosoftGame.config 元素 - TitleId](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-titleid.md)
- [MicrosoftGame.config 元素 - Resource](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-resource.md)
- [MicrosoftGame.config 元素 - SCID](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-scid.md)
- [MicrosoftGame.config 元素 - Shareable](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-shareable.md)
