mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: custom show vip danmaku
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -113,7 +113,10 @@ class _PlDanmakuState extends State<PlDanmaku> {
|
||||
? Colors.white
|
||||
: DmUtils.decimalToColor(e.color),
|
||||
type: DmUtils.getPosition(e.mode),
|
||||
isColorful: e.colorful == DmColorfulType.VipGradualColor,
|
||||
isColorful: playerController.showVipDanmaku &&
|
||||
e.colorful == DmColorfulType.VipGradualColor
|
||||
? true
|
||||
: null,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1747,6 +1747,13 @@ List<SettingsModel> get extraSettings => [
|
||||
}
|
||||
},
|
||||
),
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
title: '显示会员彩色弹幕',
|
||||
leading: Icon(MdiIcons.gradientHorizontal),
|
||||
setKey: SettingBoxKey.showVipDanmaku,
|
||||
defaultVal: true,
|
||||
),
|
||||
SettingsModel(
|
||||
settingsType: SettingsType.sw1tch,
|
||||
enableFeedback: true,
|
||||
|
||||
@@ -274,6 +274,7 @@ class PlPlayerController {
|
||||
late int subtitlePaddingH = GStorage.subtitlePaddingH;
|
||||
late int subtitlePaddingB = GStorage.subtitlePaddingB;
|
||||
late double subtitleBgOpaticy = GStorage.subtitleBgOpaticy;
|
||||
late bool showVipDanmaku = GStorage.showVipDanmaku;
|
||||
|
||||
// 播放顺序相关
|
||||
PlayRepeat playRepeat = PlayRepeat.pause;
|
||||
|
||||
@@ -336,6 +336,9 @@ class GStorage {
|
||||
static bool get savedRcmdTip =>
|
||||
GStorage.setting.get(SettingBoxKey.savedRcmdTip, defaultValue: true);
|
||||
|
||||
static bool get showVipDanmaku =>
|
||||
GStorage.setting.get(SettingBoxKey.showVipDanmaku, defaultValue: true);
|
||||
|
||||
static List<double> get dynamicDetailRatio => List<double>.from(setting
|
||||
.get(SettingBoxKey.dynamicDetailRatio, defaultValue: [60.0, 40.0]));
|
||||
|
||||
@@ -554,6 +557,7 @@ class SettingBoxKey {
|
||||
openInBrowser = 'openInBrowser',
|
||||
refreshDragPercentage = 'refreshDragPercentage',
|
||||
refreshDisplacement = 'refreshDisplacement',
|
||||
showVipDanmaku = 'showVipDanmaku',
|
||||
|
||||
// Sponsor Block
|
||||
enableSponsorBlock = 'enableSponsorBlock',
|
||||
|
||||
Reference in New Issue
Block a user