mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: add sent danmaku
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -572,10 +572,12 @@ class SlideColorPicker extends StatefulWidget {
|
|||||||
super.key,
|
super.key,
|
||||||
required this.color,
|
required this.color,
|
||||||
required this.callback,
|
required this.callback,
|
||||||
|
this.showResetBtn,
|
||||||
});
|
});
|
||||||
|
|
||||||
final Color color;
|
final Color color;
|
||||||
final Function(Color? color) callback;
|
final Function(Color? color) callback;
|
||||||
|
final bool? showResetBtn;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<SlideColorPicker> createState() => _SlideColorPickerState();
|
State<SlideColorPicker> createState() => _SlideColorPickerState();
|
||||||
@@ -703,6 +705,7 @@ class _SlideColorPickerState extends State<SlideColorPicker> {
|
|||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
|
if (widget.showResetBtn != false) ...[
|
||||||
const SizedBox(width: 16),
|
const SizedBox(width: 16),
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
@@ -714,6 +717,7 @@ class _SlideColorPickerState extends State<SlideColorPicker> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
|
],
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: Get.back,
|
onPressed: Get.back,
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|||||||
@@ -530,8 +530,12 @@ class _SendDanmakuPanelState extends State<SendDanmakuPanel>
|
|||||||
widget.callback(
|
widget.callback(
|
||||||
DanmakuContentItem(
|
DanmakuContentItem(
|
||||||
_textController.text,
|
_textController.text,
|
||||||
color: Colors.white,
|
color: _color.value,
|
||||||
type: DanmakuItemType.scroll,
|
type: switch (_mode.value) {
|
||||||
|
5 => DanmakuItemType.top,
|
||||||
|
4 => DanmakuItemType.bottom,
|
||||||
|
_ => DanmakuItemType.scroll,
|
||||||
|
},
|
||||||
selfSend: true,
|
selfSend: true,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -575,6 +579,7 @@ class _SendDanmakuPanelState extends State<SendDanmakuPanel>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
content: SlideColorPicker(
|
content: SlideColorPicker(
|
||||||
|
showResetBtn: false,
|
||||||
color: _color.value,
|
color: _color.value,
|
||||||
callback: (Color? color) {
|
callback: (Color? color) {
|
||||||
if (color != null) {
|
if (color != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user