mirror of
https://github.com/edubart/otclient.git
synced 2025-10-16 20:43:26 +02:00
Full modal dialog functionality
This commit is contained in:
@@ -8,52 +8,61 @@ ChoiceListLabel < Label
|
||||
background-color: #ffffff22
|
||||
color: #ffffff
|
||||
|
||||
ChoiceList < TextList
|
||||
id: choiceList
|
||||
vertical-scrollbar: choiceScrollBar
|
||||
anchors.fill: parent
|
||||
anchors.top: prev.bottom
|
||||
anchors.bottom: next.top
|
||||
padding: 1
|
||||
margin-top: 4
|
||||
margin-bottom: 10
|
||||
focusable: false
|
||||
visible: false
|
||||
|
||||
ChoiceScrollBar < VerticalScrollBar
|
||||
id: choiceScrollBar
|
||||
anchors.top: choiceList.top
|
||||
anchors.bottom: choiceList.bottom
|
||||
anchors.right: choiceList.right
|
||||
step: 14
|
||||
pixels-scroll: true
|
||||
visible: false
|
||||
|
||||
ModalButton < Button
|
||||
width: 60
|
||||
margin: 2
|
||||
|
||||
ModalDialog < MainWindow
|
||||
id: modalDialog
|
||||
!text: tr('Title')
|
||||
size: 280 230
|
||||
@onEscape: self:destroy()
|
||||
size: 280 97
|
||||
&minimumWidth: 200
|
||||
&maximumWidth: 500
|
||||
&minimumChoices: 4
|
||||
&maximumChoices: 10
|
||||
|
||||
Label
|
||||
id: messageLabel
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
text-align: left
|
||||
text: Message
|
||||
height: 60
|
||||
text-auto-resize: true
|
||||
text-wrap: true
|
||||
|
||||
TextList
|
||||
id: choiceList
|
||||
vertical-scrollbar: choiceScrollBar
|
||||
anchors.fill: parent
|
||||
anchors.top: prev.bottom
|
||||
anchors.bottom: next.top
|
||||
margin-bottom: 10
|
||||
margin-top: 10
|
||||
padding: 1
|
||||
focusable: false
|
||||
|
||||
Button
|
||||
id: enterButton
|
||||
!text: tr('Ok')
|
||||
anchors.top: next.top
|
||||
anchors.right: next.left
|
||||
margin-right: 8
|
||||
width: 60
|
||||
ChoiceList
|
||||
|
||||
Button
|
||||
id: escapeButton
|
||||
!text: tr('Cancel')
|
||||
anchors.bottom: parent.bottom
|
||||
HorizontalSeparator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
margin-top: 10
|
||||
width: 60
|
||||
anchors.bottom: next.top
|
||||
|
||||
VerticalScrollBar
|
||||
id: choiceScrollBar
|
||||
anchors.top: choiceList.top
|
||||
anchors.bottom: choiceList.bottom
|
||||
anchors.right: choiceList.right
|
||||
step: 14
|
||||
pixels-scroll: true
|
||||
Panel
|
||||
id: buttonList
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
height: 24
|
||||
layout: horizontalBox
|
||||
align-right: true
|
||||
|
||||
ChoiceScrollBar
|
||||
|
Reference in New Issue
Block a user