mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 21:13:26 +02:00
rework ui related scripting stuff
This commit is contained in:
67
data/modules/mainmenu/ui/entergamewindow.otml
Normal file
67
data/modules/mainmenu/ui/entergamewindow.otml
Normal file
@@ -0,0 +1,67 @@
|
||||
%window#enterGameWindow
|
||||
title: Enter Game
|
||||
size: [236, 178]
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onLoad: self:setLocked()
|
||||
|
||||
%label#accountNameLabel
|
||||
text: Account name
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.left: 18
|
||||
margin.top: 33
|
||||
|
||||
%label#passwordLabel
|
||||
text: "Password:"
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.left: 18
|
||||
margin.top: 62
|
||||
|
||||
%label#createAccountLabel
|
||||
text: |
|
||||
If you don't have
|
||||
an account yet
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.left: 18
|
||||
margin.top: 87
|
||||
|
||||
%button#createAccountButton
|
||||
text: Create Account
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.top: 94
|
||||
margin.left: 132
|
||||
onClick: displayErrorBox("Error", "Not implemented yet")
|
||||
|
||||
%button#okButton
|
||||
text: Ok
|
||||
size: [43, 20]
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 10
|
||||
margin.right: 66
|
||||
onClick: EnterGame_connectToLoginServer()
|
||||
|
||||
%button#cancelButton
|
||||
text: Cancel
|
||||
size: [43, 20]
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 10
|
||||
margin.right: 13
|
||||
onClick: self.parent:destroy()
|
||||
|
||||
%textEdit#accountNameTextEdit
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
margin.top: 32
|
||||
margin.right: 18
|
||||
|
||||
%textEdit#passwordTextEdit
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
margin.top: 61
|
||||
margin.right: 18
|
63
data/modules/mainmenu/ui/infowindow.otml
Normal file
63
data/modules/mainmenu/ui/infowindow.otml
Normal file
@@ -0,0 +1,63 @@
|
||||
%window#infoWindow
|
||||
title: Info
|
||||
size: [244, 221]
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onLoad: self.locked = true
|
||||
|
||||
%panel#infoPanel
|
||||
skin: flatPanel
|
||||
size: [208, 129]
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.top: 32
|
||||
margin.left: 18
|
||||
|
||||
%label#infoLabel
|
||||
align: center
|
||||
text: |-
|
||||
OTClient
|
||||
Version 0.2.0
|
||||
Created by edubart
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
margin.top: 20
|
||||
|
||||
%lineDecoration#bottomSeparator
|
||||
size: [190, 2]
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.top: 83
|
||||
margin.left: 9
|
||||
|
||||
%label#websiteLabel
|
||||
text: Official Website
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 14
|
||||
margin.left: 9
|
||||
|
||||
%button#websiteButton
|
||||
text: Github Page
|
||||
size: [80,22]
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 9
|
||||
margin.right: 9
|
||||
|
||||
%lineDecoration#bottomSeparator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 40
|
||||
margin.left: 13
|
||||
margin.right: 13
|
||||
|
||||
%button#okButton
|
||||
text: Ok
|
||||
size: [43, 20]
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.top: 191
|
||||
margin.left: 188
|
||||
onClick: self.parent:destroy()
|
49
data/modules/mainmenu/ui/mainmenu.otml
Normal file
49
data/modules/mainmenu/ui/mainmenu.otml
Normal file
@@ -0,0 +1,49 @@
|
||||
%panel#background
|
||||
skin: mainMenuBackground
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
%panel#mainMenu
|
||||
skin: roundedGridPanel
|
||||
size: [117, 171]
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
margin.left: 60
|
||||
margin.bottom: 70
|
||||
|
||||
%button#enterGameButton
|
||||
text: Enter Game
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
margin.top: 16
|
||||
onClick: UI.load("entergamewindow")
|
||||
|
||||
%button#accessAccountButton
|
||||
text: Access Account
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
margin.top: 46
|
||||
onClick: displayErrorBox("Error", "Not implemented yet")
|
||||
|
||||
%button#optionsButton
|
||||
text: Options
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
margin.top: 76
|
||||
onClick: UI.load("optionswindow")
|
||||
|
||||
%button#infoButton
|
||||
text: Info
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
margin.top: 106
|
||||
onClick: UI.load("infowindow")
|
||||
|
||||
%button#exitGameButton
|
||||
text: Exit
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
margin.top: 136
|
||||
onClick: terminateApplication()
|
113
data/modules/mainmenu/ui/optionswindow.otml
Normal file
113
data/modules/mainmenu/ui/optionswindow.otml
Normal file
@@ -0,0 +1,113 @@
|
||||
%window#optionsWindow
|
||||
title: Options
|
||||
size: [286, 262]
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onLoad: self.locked = true
|
||||
|
||||
# general
|
||||
%button#generalButton
|
||||
text: General
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.left: 18
|
||||
margin.top: 32
|
||||
|
||||
%label#generalLabel
|
||||
text: |-
|
||||
Change general
|
||||
game options
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.left: 117
|
||||
margin.top: 29
|
||||
|
||||
# graphics
|
||||
%button#graphicsButton
|
||||
text: Graphics
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.left: 18
|
||||
margin.top: 65
|
||||
|
||||
%label#graphicsLabel
|
||||
text: |-
|
||||
Change graphics and
|
||||
performance settings
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.left: 117
|
||||
margin.top: 62
|
||||
|
||||
# console
|
||||
%button#consoleButton
|
||||
text: Console
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.left: 18
|
||||
margin.top: 98
|
||||
|
||||
%label#consoleLabel
|
||||
text: Customise the console
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.left: 117
|
||||
margin.top: 95
|
||||
|
||||
# hotkeys
|
||||
%button#hotkeysButton
|
||||
text: Hotkeys
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.left: 18
|
||||
margin.top: 131
|
||||
|
||||
%label#hotkeysLabel
|
||||
text: Edit your hotkey texts
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
margin.left: 117
|
||||
margin.top: 128
|
||||
|
||||
%lineDecoration#middleSeparator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 97
|
||||
margin.left: 18
|
||||
margin.right: 18
|
||||
|
||||
# motd
|
||||
%button#motdButton
|
||||
text: Motd
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
margin.left: 18
|
||||
margin.bottom: 60
|
||||
|
||||
%label#motdLabel
|
||||
text: |
|
||||
Show the most recent
|
||||
Message of the Day
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
margin.left: 117
|
||||
margin.bottom: 56
|
||||
|
||||
%lineDecoration#bottomSeparator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
margin.bottom: 40
|
||||
margin.left: 13
|
||||
margin.right: 13
|
||||
|
||||
# ok button
|
||||
%button#okButton
|
||||
text: Ok
|
||||
size: [43, 20]
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
margin.right: 10
|
||||
margin.bottom: 13
|
||||
onClick: self.parent:destroy()
|
Reference in New Issue
Block a user