素材接入:分享面板图标 + 启动闪屏 + App 图标(从 docs/Res 拷入)
- 分享图标:shareWechat/QQ/Douyin@3x → entry media,SharePanel 颜色块占位替换为
真实图标 Image($r('app.media.share_*'))
- 启动闪屏:LaunchImage(2436x1125 横屏) → launch_image,SplashPage 改为全屏背景图
+ 底部叠加启动进度/公告(白字)
- App 图标:AppIcon 替换 AppScope/entry 的 layered_image foreground 前景层
docs/Res 为只读原始素材库,按需拷入;显示效果待真机/模拟器确认
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 14 KiB |
@@ -26,9 +26,9 @@ export struct SharePanel {
|
|||||||
.margin({ top: 16, bottom: 16 })
|
.margin({ top: 16, bottom: 16 })
|
||||||
|
|
||||||
Row() {
|
Row() {
|
||||||
this.platformButton('微信', 'wechat', '#07C160')
|
this.platformButton('微信', 'wechat', $r('app.media.share_wechat'))
|
||||||
this.platformButton('QQ', 'qq', '#12B7F5')
|
this.platformButton('QQ', 'qq', $r('app.media.share_qq'))
|
||||||
this.platformButton('抖音', 'douyin', '#000000')
|
this.platformButton('抖音', 'douyin', $r('app.media.share_douyin'))
|
||||||
}
|
}
|
||||||
.width('100%')
|
.width('100%')
|
||||||
.justifyContent(FlexAlign.SpaceEvenly)
|
.justifyContent(FlexAlign.SpaceEvenly)
|
||||||
@@ -55,9 +55,12 @@ export struct SharePanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Builder
|
@Builder
|
||||||
platformButton(label: string, platform: string, color: string) {
|
platformButton(label: string, platform: string, icon: Resource) {
|
||||||
Column() {
|
Column() {
|
||||||
Circle({ width: 56, height: 56 }).fill(color)
|
Image(icon)
|
||||||
|
.width(56)
|
||||||
|
.height(56)
|
||||||
|
.objectFit(ImageFit.Contain)
|
||||||
Text(label)
|
Text(label)
|
||||||
.fontSize(13)
|
.fontSize(13)
|
||||||
.fontColor('#333333')
|
.fontColor('#333333')
|
||||||
|
|||||||
@@ -40,27 +40,38 @@ export struct SplashPage {
|
|||||||
|
|
||||||
build() {
|
build() {
|
||||||
NavDestination() {
|
NavDestination() {
|
||||||
Column({ space: 16 }) {
|
Stack() {
|
||||||
Text('TSGame')
|
// 启动闪屏全屏背景(docs/Res/LaunchImage,横屏 2436x1125)
|
||||||
.fontSize(28)
|
Image($r('app.media.launch_image'))
|
||||||
.fontWeight(FontWeight.Bold)
|
.width('100%')
|
||||||
if (this.blocked === '') {
|
.height('100%')
|
||||||
Text(`${this.stageText} ${this.percent}%`)
|
.objectFit(ImageFit.Cover)
|
||||||
.fontSize(14)
|
// 启动进度/公告叠加在底部
|
||||||
.fontColor(Color.Gray)
|
Column({ space: 12 }) {
|
||||||
Progress({ value: this.percent, total: 100, type: ProgressType.Linear })
|
if (this.blocked === '') {
|
||||||
.width('60%')
|
Text(`${this.stageText} ${this.percent}%`)
|
||||||
} else {
|
.fontSize(14)
|
||||||
Text(this.blocked)
|
.fontColor(Color.White)
|
||||||
.fontSize(16)
|
Progress({ value: this.percent, total: 100, type: ProgressType.Linear })
|
||||||
.fontColor(Color.Red)
|
.width('60%')
|
||||||
.textAlign(TextAlign.Center)
|
} else {
|
||||||
.padding({ left: 24, right: 24 })
|
Text(this.blocked)
|
||||||
|
.fontSize(16)
|
||||||
|
.fontColor(Color.White)
|
||||||
|
.textAlign(TextAlign.Center)
|
||||||
|
.backgroundColor('rgba(0,0,0,0.5)')
|
||||||
|
.borderRadius(8)
|
||||||
|
.padding(12)
|
||||||
|
.margin({ left: 24, right: 24 })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
.width('100%')
|
||||||
|
.height('100%')
|
||||||
|
.justifyContent(FlexAlign.End)
|
||||||
|
.padding({ bottom: 60 })
|
||||||
}
|
}
|
||||||
.width('100%')
|
.width('100%')
|
||||||
.height('100%')
|
.height('100%')
|
||||||
.justifyContent(FlexAlign.Center)
|
|
||||||
}
|
}
|
||||||
.hideTitleBar(true)
|
.hideTitleBar(true)
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 5.0 KiB |