This commit is contained in:
OTCv8
2020-07-23 02:37:11 +02:00
parent a65844f182
commit 929ab400ed
19 changed files with 489 additions and 84 deletions

View File

@@ -1,85 +1,210 @@
MainWindow
id: editWindow
size: 550 580
!text: tr("Config editor")
!text: tr("Config editor & manager")
@onEscape: self:hide()
@onEnter: self:hide()
size: 550 570
$mobile:
size: 550 240
Label
Panel
id: manager
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
text-auto-resize: true
text-align: center
text-wrap: true
!text: tr("Bot configs are stored in:")
height: 152
Label
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
text-auto-resize: true
text-align: center
text-wrap: true
!text: tr("Config Manager\nYou can use config manager to share configs between different machines, especially smartphones. After you configure your config, you can upload it, then you'll get unique hash code which you can use on diffent machinge (for eg. mobile phone) to download it.")
HorizontalSeparator
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
margin-top: 3
height: 2
Panel
id: upload
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.horizontalCenter
anchors.bottom: parent.bottom
margin-top: 3
TextEdit
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: prev.bottom
height: 20
width: 400
margin-top: 5
editable: false
!text: g_resources.getWriteDir() .. "bot"
text-align: center
Label
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
text-auto-resize: true
text-align: center
text-wrap: true
!text: tr("Upload config")
Button
id: documentationButton
!text: tr('Click here to open bot directory')
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: prev.bottom
margin-top: 5
width: 250
@onClick: g_platform.openDir(g_resources.getWriteDir() .. "bot")
Label
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
margin-top: 7
text-auto-resize: true
text-align: center
text-wrap: true
!text: tr("Select config to upload")
Label
margin-top: 5
ComboBox
id: config
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
margin-top: 4
margin-left: 20
margin-right: 20
text-offset: 3 0
Button
id: submit
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
!text: tr('Upload config')
margin-top: 4
margin-left: 40
margin-right: 40
@onClick: modules.game_bot.uploadConfig()
Panel
id: download
anchors.top: prev.top
anchors.left: parent.horizontalCenter
anchors.right: parent.right
anchors.bottom: parent.bottom
Label
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
text-auto-resize: true
text-align: center
text-wrap: true
!text: tr("Download config")
Label
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
margin-top: 7
text-auto-resize: true
text-align: center
text-wrap: true
!text: tr("Enter config hash code")
TextEdit
id: config
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
margin-top: 4
margin-left: 20
margin-right: 20
Button
id: submit
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
!text: tr('Download config')
margin-top: 4
margin-left: 40
margin-right: 40
@onClick: modules.game_bot.downloadConfig()
HorizontalSeparator
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
text-auto-resize: true
text-align: center
text-wrap: true
!text: tr("Every directory in bot directory is treated as different config.\nTo create new config just create new directory.")
Label
margin-top: 5
anchors.top: prev.bottom
anchors.horizontalCenter: parent.horizontalCenter
height: 175
image-source: configs.png
image-fixed-ratio: true
image-size: 500 175
Label
margin-top: 5
margin-top: 3
height: 2
Panel
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
text-auto-resize: true
text-align: center
text-wrap: true
!text: tr("Inside config directory put .lua and .otui files.\nEvery file will be loaded and executed in alphabetical order, .otui first and then .lua.")
Label
anchors.right: parent.right
margin-top: 5
anchors.top: prev.bottom
anchors.horizontalCenter: parent.horizontalCenter
height: 150
image-source: scripts.png
image-fixed-ratio: true
image-size: 500 150
height: 330
$mobile:
visible: false
Label
margin-top: 5
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
text-auto-resize: true
text-align: center
text-wrap: true
!text: tr("To reload configs just press On and Off in bot window.\nTo learn more about bot click Tutorials button.")
Label
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
text-auto-resize: true
text-align: center
text-wrap: true
!text: tr("Bot configs are stored in:")
TextEdit
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: prev.bottom
height: 20
width: 400
margin-top: 5
editable: false
!text: g_resources.getWriteDir() .. "bot"
text-align: center
Button
id: documentationButton
!text: tr('Click here to open bot directory')
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: prev.bottom
margin-top: 5
width: 250
@onClick: g_platform.openDir(g_resources.getWriteDir() .. "bot")
Label
margin-top: 5
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
text-auto-resize: true
text-align: center
text-wrap: true
!text: tr("Every directory in bot directory is treated as different config.\nTo create new config just create new directory.")
Label
margin-top: 5
anchors.top: prev.bottom
anchors.horizontalCenter: parent.horizontalCenter
height: 175
image-source: configs.png
image-fixed-ratio: true
image-size: 500 175
Label
margin-top: 3
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
text-auto-resize: true
text-align: center
text-wrap: true
!text: tr("Inside config directory put .lua and .otui files.\nEvery file will be loaded and executed in alphabetical order, .otui first and then .lua.")
Label
margin-top: 3
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
text-auto-resize: true
text-align: center
text-wrap: true
!text: tr("To reload configs just press On and Off in bot window.\nTo learn more about bot click Tutorials button.")
Button
!text: tr('Documentation')