mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-10-19 22:23:28 +02:00
Version 1.9
This commit is contained in:
@@ -1,5 +1,72 @@
|
||||
local entergameWindow
|
||||
local characterGroup
|
||||
|
||||
function init()
|
||||
if not USE_NEW_ENERGAME then return end
|
||||
entergameWindow = g_ui.displayUI('entergamev2')
|
||||
|
||||
--entergameWindow.news:hide()
|
||||
--entergameWindow.quick:hide()
|
||||
entergameWindow.registration:hide()
|
||||
entergameWindow.characters:hide()
|
||||
entergameWindow.createcharacter:hide()
|
||||
|
||||
-- entergame
|
||||
entergameWindow.entergame.register.onClick = function()
|
||||
entergameWindow.registration:show()
|
||||
entergameWindow.entergame:hide()
|
||||
end
|
||||
entergameWindow.entergame.mainPanel.button.onClick = function()
|
||||
entergameWindow.entergame:hide()
|
||||
entergameWindow.characters:show()
|
||||
g_game.setClientVersion(1099) -- for tests
|
||||
end
|
||||
|
||||
-- registration
|
||||
entergameWindow.registration.back.onClick = function()
|
||||
entergameWindow.registration:hide()
|
||||
entergameWindow.entergame:show()
|
||||
end
|
||||
|
||||
-- characters
|
||||
entergameWindow.characters.logout.onClick = function()
|
||||
entergameWindow.characters:hide()
|
||||
entergameWindow.entergame:show()
|
||||
end
|
||||
entergameWindow.characters.createcharacter.onClick = function()
|
||||
entergameWindow.characters:hide()
|
||||
entergameWindow.createcharacter:show()
|
||||
end
|
||||
entergameWindow.characters.mainPanel.autoReconnect.onClick = function()
|
||||
entergameWindow.characters.mainPanel.autoReconnect:setOn(not entergameWindow.characters.mainPanel.autoReconnect:isOn())
|
||||
end
|
||||
|
||||
-- create character
|
||||
entergameWindow.createcharacter.back.onClick = function()
|
||||
entergameWindow.createcharacter:hide()
|
||||
entergameWindow.characters:show()
|
||||
end
|
||||
|
||||
-- tests
|
||||
characterGroup = UIRadioGroup.create()
|
||||
for i=1,20 do
|
||||
local character = g_ui.createWidget('EntergameCharacter', entergameWindow.characters.mainPanel.charactersPanel)
|
||||
characterGroup:addWidget(character)
|
||||
character.outfit:setOutfit({feet=10,legs=10,body=176,type=129,auxType=0,addons=3,head=48})
|
||||
end
|
||||
characterGroup:selectWidget(entergameWindow.characters.mainPanel.charactersPanel:getFirstChild())
|
||||
characterGroup:getSelectedWidget()
|
||||
|
||||
for i=1,100 do
|
||||
local l = g_ui.createWidget("NewsLabel", entergameWindow.news.content)
|
||||
l:setText("test xxx ssss eeee uu u llel " .. i)
|
||||
end
|
||||
end
|
||||
|
||||
function terminate()
|
||||
end
|
||||
if not USE_NEW_ENERGAME then return end
|
||||
entergameWindow:destroy()
|
||||
if characterGroup then
|
||||
characterGroup:destroy()
|
||||
end
|
||||
end
|
587
modules/client_entergamev2/entergamev2.otui
Normal file
587
modules/client_entergamev2/entergamev2.otui
Normal file
@@ -0,0 +1,587 @@
|
||||
EnterGamePanel < Panel
|
||||
font: verdana-11px-antialised
|
||||
color: #dfdfdf
|
||||
text-offset: 0 6
|
||||
text-align: top
|
||||
image-source: /images/ui/window
|
||||
image-border: 6
|
||||
image-border-top: 27
|
||||
padding-top: 28
|
||||
padding-left: 8
|
||||
padding-right: 8
|
||||
padding-bottom: 8
|
||||
|
||||
News < EnterGamePanel
|
||||
id: news
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: 230
|
||||
!text: tr("News")
|
||||
|
||||
ScrollablePanel
|
||||
id: content
|
||||
anchors.fill: parent
|
||||
margin-right: 8
|
||||
margin-left: 1
|
||||
margin-bottom: 5
|
||||
vertical-scrollbar: newsPanelScroll
|
||||
layout:
|
||||
type: verticalBox
|
||||
|
||||
SmallScrollBar
|
||||
id: newsPanelScroll
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
|
||||
NewsLabel < Label
|
||||
text-wrap: true
|
||||
text-auto-resize: true
|
||||
text-align: center
|
||||
font: terminus-14px-bold
|
||||
|
||||
NewsText < Label
|
||||
text-wrap: true
|
||||
text-auto-resize: true
|
||||
text-align: left
|
||||
margin-bottom: 10
|
||||
|
||||
NewsImage < Label
|
||||
text-wrap: true
|
||||
margin-bottom: 5
|
||||
text-align: center
|
||||
|
||||
EnterGame < Panel
|
||||
anchors.fill: parent
|
||||
id: entergame
|
||||
|
||||
EnterGamePanel
|
||||
id: mainPanel
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
size: 250 210
|
||||
!text: tr("Enter Game")
|
||||
padding-top: 36
|
||||
padding-left: 16
|
||||
padding-right: 16
|
||||
padding-bottom: 16
|
||||
|
||||
MenuLabel
|
||||
!text: tr('Account name')
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
text-auto-resize: true
|
||||
|
||||
TextEdit
|
||||
id: account
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 2
|
||||
|
||||
MenuLabel
|
||||
!text: tr('Password')
|
||||
anchors.left: prev.left
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 8
|
||||
text-auto-resize: true
|
||||
|
||||
PasswordTextEdit
|
||||
id: password
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 2
|
||||
|
||||
HorizontalSeparator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 10
|
||||
|
||||
CheckBox
|
||||
id: rememberPasswordBox
|
||||
!text: tr('Remember password')
|
||||
!tooltip: tr('Remember account and password when starts client')
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 9
|
||||
|
||||
HorizontalSeparator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 9
|
||||
|
||||
Button
|
||||
id: button
|
||||
!text: tr('Login')
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 10
|
||||
margin-left: 50
|
||||
margin-right: 50
|
||||
|
||||
EnterGamePanel
|
||||
id: buttons
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 20
|
||||
size: 200 50
|
||||
image-source: /images/ui/window_headless
|
||||
image-border: 6
|
||||
padding-top: 8
|
||||
|
||||
Button
|
||||
id: register
|
||||
anchors.verticalCenter: buttons.verticalCenter
|
||||
anchors.horizontalCenter: buttons.horizontalCenter
|
||||
!text: tr("Create account")
|
||||
size: 160 30
|
||||
|
||||
Registration < Panel
|
||||
anchors.fill: parent
|
||||
id: registration
|
||||
|
||||
EnterGamePanel
|
||||
id: mainPanel
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
size: 250 262
|
||||
!text: tr("Create Acoount")
|
||||
padding-top: 36
|
||||
padding-left: 16
|
||||
padding-right: 16
|
||||
padding-bottom: 16
|
||||
|
||||
MenuLabel
|
||||
!text: tr('Account name')
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
text-auto-resize: true
|
||||
|
||||
TextEdit
|
||||
id: accountNameTextEdit
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 2
|
||||
|
||||
MenuLabel
|
||||
!text: tr('Email')
|
||||
anchors.left: prev.left
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 8
|
||||
text-auto-resize: true
|
||||
|
||||
TextEdit
|
||||
id: emailTextEdit
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 2
|
||||
|
||||
MenuLabel
|
||||
!text: tr('Password')
|
||||
anchors.left: prev.left
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 8
|
||||
text-auto-resize: true
|
||||
|
||||
PasswordTextEdit
|
||||
id: accountPasswordTextEdit
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 2
|
||||
|
||||
MenuLabel
|
||||
!text: tr('Password confirmation')
|
||||
anchors.left: prev.left
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 8
|
||||
text-auto-resize: true
|
||||
|
||||
PasswordTextEdit
|
||||
id: accountPasswordTextEdit
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 2
|
||||
|
||||
HorizontalSeparator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 9
|
||||
|
||||
Button
|
||||
!text: tr('Create account')
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 10
|
||||
margin-left: 50
|
||||
margin-right: 50
|
||||
@onClick: EnterGame.doLogin()
|
||||
|
||||
EnterGamePanel
|
||||
id: buttons
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 20
|
||||
size: 200 50
|
||||
image-source: /images/ui/window_headless
|
||||
image-border: 6
|
||||
padding-top: 8
|
||||
|
||||
Button
|
||||
id: back
|
||||
anchors.verticalCenter: buttons.verticalCenter
|
||||
anchors.horizontalCenter: buttons.horizontalCenter
|
||||
!text: tr("Back")
|
||||
size: 160 30
|
||||
|
||||
QuickLogin < EnterGamePanel
|
||||
id: quick
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
size: 230 312
|
||||
!text: tr("Quick Login & Registration")
|
||||
|
||||
UIButton
|
||||
id: qrcode
|
||||
width: 200
|
||||
height: 200
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
image-fixed-ratio: true
|
||||
image-smooth: false
|
||||
margin-top: 5
|
||||
qr: 123
|
||||
|
||||
UIButton
|
||||
id: quathlogo
|
||||
width: 66
|
||||
height: 40
|
||||
anchors.verticalCenter: prev.verticalCenter
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
image-fixed-ratio: true
|
||||
image-smooth: false
|
||||
image-source: /images/ui/qauth
|
||||
|
||||
Label
|
||||
anchors.top: qrcode.bottom
|
||||
anchors.left: qrcode.left
|
||||
anchors.right: qrcode.right
|
||||
text-align: center
|
||||
text-auto-resize: true
|
||||
!text: tr("Scan or click QR code\nto register or login")
|
||||
height: 40
|
||||
margin-top: 10
|
||||
margin-bottom: 5
|
||||
|
||||
Button
|
||||
anchors.top: prev.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
text-align: center
|
||||
!text: tr("Click to get PC/Android/iOS app")
|
||||
height: 23
|
||||
margin-top: 10
|
||||
margin-left: 5
|
||||
margin-right: 5
|
||||
color: #FFFFFF
|
||||
@onClick: g_platform.openUrl("http://qauth.co")
|
||||
|
||||
Characters < Panel
|
||||
id: characters
|
||||
anchors.fill: parent
|
||||
|
||||
EnterGamePanel
|
||||
id: mainPanel
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
size: 550 350
|
||||
!text: tr("Characters")
|
||||
padding-top: 36
|
||||
padding-left: 16
|
||||
padding-right: 16
|
||||
padding-bottom: 16
|
||||
|
||||
Label
|
||||
id: motd
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
text-auto-resize: true
|
||||
text-wrap: true
|
||||
text: This is motd ;)
|
||||
text-align: center
|
||||
|
||||
HorizontalSeparator
|
||||
id: motdSeparator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 5
|
||||
height: 10
|
||||
|
||||
ScrollablePanel
|
||||
id: charactersPanel
|
||||
layout:
|
||||
type: grid
|
||||
cell-size: 100 100
|
||||
cell-spacing: 1
|
||||
flow: true
|
||||
vertical-scrollbar: charactersScroll
|
||||
anchors.top: prev.bottom
|
||||
anchors.bottom: bottomSeparator.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
margin-bottom: 10
|
||||
margin-right: 12
|
||||
|
||||
VerticalScrollBar
|
||||
id: charactersScroll
|
||||
anchors.top: charactersPanel.top
|
||||
anchors.bottom: charactersPanel.bottom
|
||||
anchors.left: charactersPanel.right
|
||||
step: 14
|
||||
pixels-scroll: true
|
||||
|
||||
HorizontalSeparator
|
||||
id: bottomSeparator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
height: 35
|
||||
|
||||
Button
|
||||
id: autoReconnect
|
||||
!text: tr('Auto reconnect: On')
|
||||
width: 140
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
image-color: green
|
||||
$!on:
|
||||
image-color: red
|
||||
!text: tr('Auto reconnect: Off')
|
||||
|
||||
Button
|
||||
id: createCharacter
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
!text: tr("Connect")
|
||||
width: 140
|
||||
|
||||
EnterGamePanel
|
||||
id: buttons
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 20
|
||||
size: 450 50
|
||||
image-source: /images/ui/window_headless
|
||||
image-border: 6
|
||||
padding-top: 8
|
||||
|
||||
Button
|
||||
id: createcharacter
|
||||
anchors.verticalCenter: buttons.verticalCenter
|
||||
anchors.left: buttons.left
|
||||
!text: tr("Create character")
|
||||
margin-left: 10
|
||||
size: 140 30
|
||||
|
||||
Button
|
||||
id: casts
|
||||
anchors.verticalCenter: buttons.verticalCenter
|
||||
anchors.horizontalCenter: buttons.horizontalCenter
|
||||
!text: tr("Casts")
|
||||
size: 140 30
|
||||
|
||||
Button
|
||||
id: logout
|
||||
anchors.verticalCenter: buttons.verticalCenter
|
||||
anchors.right: buttons.right
|
||||
margin-right: 10
|
||||
!text: tr("Logout")
|
||||
size: 140 30
|
||||
|
||||
EntergameCharacter < UIButton
|
||||
border-width: 1
|
||||
padding: 1 1 1 1
|
||||
@onClick: self:setChecked(true)
|
||||
|
||||
$checked:
|
||||
border-color: #ffffff
|
||||
|
||||
$!checked:
|
||||
border-color: black
|
||||
|
||||
UICreature
|
||||
id: outfit
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
size: 48 48
|
||||
margin-bottom: 3
|
||||
phantom: true
|
||||
|
||||
Label
|
||||
id: line1
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
text: Dagusia Druid
|
||||
text-align: center
|
||||
text-wrap: false
|
||||
height: 16
|
||||
font: terminus-10px
|
||||
border-width-bottom: 1
|
||||
border-color: #00000077
|
||||
|
||||
Label
|
||||
id: line2
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
text: Level: 666
|
||||
text-align: center
|
||||
text-wrap: false
|
||||
height: 16
|
||||
font: terminus-10px
|
||||
border-width-bottom: 1
|
||||
border-color: #00000077
|
||||
|
||||
Label
|
||||
id: line3
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
text: World: nemezis
|
||||
text-align: center
|
||||
text-wrap: false
|
||||
height: 16
|
||||
font: terminus-10px
|
||||
border-width-bottom: 1
|
||||
border-color: #00000077
|
||||
|
||||
CreateCharacter < Panel
|
||||
anchors.fill: parent
|
||||
id: createcharacter
|
||||
|
||||
EnterGamePanel
|
||||
id: mainPanel
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
size: 250 262
|
||||
!text: tr("Create Character")
|
||||
padding-top: 36
|
||||
padding-left: 16
|
||||
padding-right: 16
|
||||
padding-bottom: 16
|
||||
|
||||
MenuLabel
|
||||
!text: tr('Name')
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
text-auto-resize: true
|
||||
|
||||
TextEdit
|
||||
id: accountNameTextEdit
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 2
|
||||
|
||||
MenuLabel
|
||||
!text: tr('Vocation')
|
||||
anchors.left: prev.left
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 8
|
||||
text-auto-resize: true
|
||||
|
||||
TextEdit
|
||||
id: emailTextEdit
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 2
|
||||
|
||||
MenuLabel
|
||||
!text: tr('Password')
|
||||
anchors.left: prev.left
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 8
|
||||
text-auto-resize: true
|
||||
|
||||
PasswordTextEdit
|
||||
id: accountPasswordTextEdit
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 2
|
||||
|
||||
MenuLabel
|
||||
!text: tr('Password confirmation')
|
||||
anchors.left: prev.left
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 8
|
||||
text-auto-resize: true
|
||||
|
||||
PasswordTextEdit
|
||||
id: accountPasswordTextEdit
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 2
|
||||
|
||||
HorizontalSeparator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 9
|
||||
|
||||
Button
|
||||
!text: tr('Create character')
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 10
|
||||
margin-left: 50
|
||||
margin-right: 50
|
||||
@onClick: EnterGame.doLogin()
|
||||
|
||||
EnterGamePanel
|
||||
id: buttons
|
||||
anchors.horizontalCenter: prev.horizontalCenter
|
||||
anchors.top: prev.bottom
|
||||
margin-top: 20
|
||||
size: 200 50
|
||||
image-source: /images/ui/window_headless
|
||||
image-border: 6
|
||||
padding-top: 8
|
||||
|
||||
Button
|
||||
id: back
|
||||
anchors.verticalCenter: buttons.verticalCenter
|
||||
anchors.horizontalCenter: buttons.horizontalCenter
|
||||
!text: tr("Back")
|
||||
size: 160 30
|
||||
|
||||
Panel
|
||||
anchors.top: topMenu.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
margin: 10 10 10 10
|
||||
|
||||
News
|
||||
QuickLogin
|
||||
EnterGame
|
||||
Registration
|
||||
Characters
|
||||
CreateCharacter
|
Reference in New Issue
Block a user