mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 11:42:45 +08:00
Compare commits
3 Commits
9daeb15dca
...
bb1edddddf
Author | SHA1 | Date | |
---|---|---|---|
|
bb1edddddf | ||
|
f0bb15cf0a | ||
|
2ca68e061a |
|
@ -184,6 +184,12 @@ Item {
|
|||
return ret;
|
||||
}
|
||||
delegate: Text {
|
||||
width: parent.width / 2
|
||||
wrapMode: Text.WordWrap
|
||||
fontSizeMode: Text.HorizontalFit
|
||||
minimumPixelSize: 14
|
||||
elide: Text.ElideRight
|
||||
height: 24
|
||||
text: luatr(modelData)
|
||||
font.pixelSize: 16
|
||||
}
|
||||
|
|
|
@ -718,6 +718,15 @@ function updateSelectedTargets(playerid, selected) {
|
|||
}
|
||||
|
||||
if (candidate) {
|
||||
roomScene.resetPrompt(); // update prompt due to selected_targets
|
||||
const prompt = lcall("ActiveSkillPrompt",
|
||||
dashboard.pending_skill !== "" ? dashboard.pending_skill: lcall("GetCardSkill", card),
|
||||
dashboard.pending_skill !== "" ? dashboard.pendings : [card],
|
||||
selected_targets);
|
||||
if (prompt !== "") {
|
||||
roomScene.setPrompt(Util.processPrompt(prompt));
|
||||
}
|
||||
|
||||
all_photos.forEach(photo => {
|
||||
if (photo.selected) return;
|
||||
const id = photo.playerid;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
import QtQuick
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Controls
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
@ -86,7 +87,40 @@ Item {
|
|||
}
|
||||
|
||||
TapHandler {
|
||||
enabled: root.type !== "notactive" && root.enabled
|
||||
onTapped: parent.pressed = !parent.pressed;
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.NoButton
|
||||
onTapped: (p, btn) => {
|
||||
if ((btn === Qt.LeftButton || btn === Qt.NoButton) && root.type !== "notactive" && root.enabled) {
|
||||
parent.pressed = !parent.pressed;
|
||||
} else if (btn === Qt.RightButton) {
|
||||
skillDetail.open();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Popup {
|
||||
id: skillDetail
|
||||
x: Math.round((parent.width - width) / 2)
|
||||
y: Math.round((parent.height - height) / 2)
|
||||
property string text: ""
|
||||
width: Math.min(contentWidth, realMainWin.width * 0.4)
|
||||
height: Math.min(contentHeight + 24, realMainWin.height * 0.9)
|
||||
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
|
||||
padding: 12
|
||||
background: Rectangle {
|
||||
color: "#EEEEEEEE"
|
||||
radius: 5
|
||||
border.color: "#A6967A"
|
||||
border.width: 1
|
||||
}
|
||||
contentItem: Text {
|
||||
text: "<b>" + luatr(orig) + "</b>: " + luatr(":" + orig)
|
||||
font.pixelSize: 20
|
||||
wrapMode: Text.WordWrap
|
||||
textFormat: TextEdit.RichText
|
||||
|
||||
TapHandler {
|
||||
onTapped: skillDetail.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user