> ## 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

定義遊戲在殼層中的呈現方式，例如影像和名稱。在註冊期間用於在殼層中顯示遊戲。

## 父系

此元素的父系是 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 屬性都是封裝時的必要屬性。
* PC 遊戲不需要 SplashScreenImage 屬性，但建議將其作為最佳做法。
* 其他所有屬性都是選擇性的。
* 如需色彩值常見名稱的完整清單，請參閱 MicrosoftGame.config 結構描述中的 ST\_Color 區段。

### ShellVisuals 與 Executable 中的標誌

Executable 內的 OverrideLogo 元素與 ShellVisuals 中的 Logo 元素相關聯。如果已定義 OverrideLogo，則對該可執行檔而言，它會優先於 Logo 中所定義的內容。ShellVisuals 中的 Logo 是用於在套件層級定義。對於單一可執行檔的套件，只需要 Logo 元素。Square150x150Logo 屬性的 Logo 大小應為 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 上的 SplashScreenImage 已改為選擇性。對於 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 參考 - 目錄](/zh-TW/reference/system/microsoftgameconfig/elements/gc-microsoftgameconfig-toc)


## Related topics

- [MicrosoftGame.config 元素 - ShellVisuals](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-shellvisuals.md)
- [MicrosoftGame.config Element - ShellVisuals](/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-shellvisuals.md)
- [MicrosoftGame.config 要素 - ShellVisuals](/ja-jp/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-shellvisuals.md)
- [Elemento de MicrosoftGame.config - ShellVisuals](/es/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-shellvisuals.md)
- [MicrosoftGame.config 元素 - Resources](/zh-CN/reference/system/microsoftgameconfig/elements/microsoftgameconfig-element-resources.md)
