mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 19:58:13 +08:00
cec18e0614
- 新增船新“休整”机制; - 修改作废逻辑,并可在当前响应读条禁用该技能(出牌阶段空闲时间点尚未完成限制); - 修复锁视技的相关bug,其cardFilter新增标识是否为判定的参数; - 将护甲扣减融合进体力扣减流程,为伤害流程增加“虚拟伤害”概念,为伤害流程增加“造成过伤害”标识id以供记录搜索使用; - 为变将新增可删除副将。 --------- Co-authored-by: notify <notify-ctrl@qq.com>
56 lines
1.2 KiB
QML
56 lines
1.2 KiB
QML
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
import QtQuick
|
|
import QtQuick.Controls
|
|
|
|
ListView {
|
|
id: root
|
|
|
|
clip: true
|
|
|
|
highlight: Rectangle { color: "#EEEEEE"; radius: 5 }
|
|
highlightMoveDuration: 500
|
|
|
|
ScrollBar.vertical: ScrollBar {
|
|
parent: root.parent
|
|
anchors.top: root.top
|
|
anchors.right: root.right
|
|
anchors.bottom: root.bottom
|
|
}
|
|
|
|
model: ListModel { id: logModel }
|
|
delegate: TextEdit {
|
|
id: textEdit
|
|
|
|
text: logText
|
|
width: root.width
|
|
clip: true
|
|
readOnly: true
|
|
selectByKeyboard: true
|
|
selectByMouse: false
|
|
wrapMode: TextEdit.WrapAnywhere
|
|
textFormat: TextEdit.RichText
|
|
font.pixelSize: 16
|
|
|
|
TapHandler {
|
|
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.NoButton
|
|
gesturePolicy: TapHandler.WithinBounds
|
|
onTapped: root.currentIndex = index;
|
|
}
|
|
}
|
|
|
|
Button {
|
|
text: "Return to Bottom"
|
|
visible: root.currentIndex !== logModel.count - 1
|
|
onClicked: root.currentIndex = logModel.count - 1;
|
|
}
|
|
|
|
function append(data) {
|
|
const autoScroll = root.currentIndex === logModel.count - 1;
|
|
logModel.append(data);
|
|
if (autoScroll) {
|
|
root.currentIndex = logModel.count - 1;
|
|
}
|
|
}
|
|
}
|