Acerta o espacamento cara, ele define os atributos pela identacao, se tu der dois espacos ele entende que e como se fosse algum subwidget ta ligado, dai nao vai funcionar, tem que estar alinhado no arquivo, dois espacos por nivel de tabulacao
- Fórum
- OTServ
- Tutoriais
- Tutoriais de Clients
- [Tutorial] Mudar miniwidow
[Tutorial] Mudar miniwidow
Por Deadpool, 11 de out. de 2015 em Tutoriais de Clients
info
Grupo: Conde
Registrado: 12/04/15
Posts: 655
Reputação: +65
Gênero: Masculino
Char no Tibia: Developer Berg

Acerta o espacamento cara, ele define os atributos pela identacao, se tu der dois espacos ele entende que e como se fosse algum subwidget ta ligado, dai nao vai funcionar, tem que estar alinhado no arquivo, dois espacos por nivel de tabulacao
alinhei, e ficou do mesmo jeito '-' o entergame desapareceu que nem ta ai no print rs
EnterGameWindow < MainWindow
size: 330 312
image-source: enter.png
EnterGameButton < Button
width: 64
ServerListButton < UIButton
size: 17 17
image-source: /images/topbuttons/minimap
image-color: #ffffffff
$hover !disabled:
image-color: #ffffff99
$pressed:
image-color: #ffffff44
$disabled:
image-color: #ffffff55
EnterGameWindow
id: enterGame
@onEnter: EnterGame.doLogin()
MenuLabel
!text: tr('Account name')
anchors.left: parent.left
anchors.top: parent.top
text-auto-resize: true
margin-top: 30
PasswordTextEdit
id: accountNameTextEdit
anchors.left: parent.left
anchors.right: parent.right
anchors.top: prev.bottom
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
id: serverLabel
!text: tr('Server')
anchors.left: prev.left
anchors.top: prev.bottom
margin-top: 8
text-auto-resize: true
ServerListButton
id: serverListButton
!tooltip: tr('Server list')
anchors.right: parent.right
anchors.top: serverLabel.bottom
margin-top: 3
@onClick: ServerList.show()
TextEdit
id: serverHostTextEdit
!tooltip: tr('Make sure that your client uses\nthe correct game client version')
anchors.left: parent.left
anchors.right: serverListButton.left
anchors.top: serverLabel.bottom
margin-top: 2
margin-right: 4
MenuLabel
id: clientLabel
!text: tr('Client Version')
anchors.left: parent.left
anchors.top: serverHostTextEdit.bottom
text-auto-resize: true
margin-right: 10
margin-top: 8
ComboBox
id: clientComboBox
anchors.left: parent.left
anchors.right: parent.horizontalCenter
anchors.top: clientLabel.bottom
margin-top: 2
margin-right: 3
width: 90
MenuLabel
id: portLabel
!text: tr('Port')
anchors.left: serverPortTextEdit.left
anchors.top: serverHostTextEdit.bottom
margin-top: 8
text-auto-resize: true
TextEdit
id: serverPortTextEdit
text: 7171
anchors.right: parent.right
anchors.left: parent.horizontalCenter
anchors.top: clientComboBox.top
margin-left: 3
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: 10
@onCheckChange: self:getParent():getChildById('autoLoginBox'):setEnabled(self:isChecked())
CheckBox
id: autoLoginBox
enabled: false
!text: tr('Auto login')
!tooltip: tr('Open charlist automatically when starting client')
anchors.left: parent.left
anchors.right: parent.right
anchors.top: prev.bottom
margin-top: 2
EnterGameButton
!text: tr('Ok')
anchors.right: parent.right
anchors.bottom: parent.bottom
@onClick: EnterGame.doLogin()
margin-right: 5
Label
id: serverInfoLabel
font: verdana-11px-rounded
anchors.bottom: parent.bottom
anchors.left: parent.left
color: green
text-auto-resize: true
é que ta bugando quando copio e colo aqui no spoiler, + aqui na script está alinhada e continua desaparecendo o enter game '-'
Editado Outubro 19 por ricardoberg
info
Grupo: Campones
Registrado: 02/10/15
Posts: 92
Reputação: +18

Ótimo tutorial! Estou utilizando.
Adicionarei seus devidos créditos.
yep :>
mas cuidado pra nao fazer um nil:destroy() vai dar zebra se tentar destruir uma coisa que nao existe '-'
function EnterGame.terminate:destroy()
Quando coloco isso lá no entergame.lua , toda a Window desaparece ...
mas é claro que isso ta errado ne vei, quando eu faço dar um destrou no terminate é dentro do escopo da função terminate ![]()
se ta assim
function terminate()
--blalblablalba
end
tu coloca assim
function terminate()
nomeDoWindow:destroy()
end
info
Grupo: Conde
Registrado: 12/04/15
Posts: 655
Reputação: +65
Gênero: Masculino
Char no Tibia: Developer Berg

mas é claro que isso ta errado ne vei, quando eu faço dar um destrou no terminate é dentro do escopo da função terminate
se ta assim
function terminate()
--blalblablalba
end
tu coloca assim
function terminate()
nomeDoWindow:destroy()
end
ei man, da pra vc editar a script do meu entergame e me passar ? n estou conseguindo posicionar o nome e o " Ok " '-' a script está ai no meu comentário de cima
mas é claro que isso ta errado ne vei, quando eu faço dar um destrou no terminate é dentro do escopo da função terminate
se ta assim
function terminate()
--blalblablalba
end
tu coloca assim
function terminate()
nomeDoWindow:destroy()
end
info
Grupo: Campones
Registrado: 02/10/15
Posts: 92
Reputação: +18

desculpem reviver o tópico, mas tem como fazer isso com o MOTD (Msg do dia), colocar uma imagem no lugar da window?
info
Grupo: Conde
Registrado: 12/04/15
Posts: 655
Reputação: +65
Gênero: Masculino
Char no Tibia: Developer Berg

desculpem reviver o tópico, mas tem como fazer isso com o MOTD (Msg do dia), colocar uma imagem no lugar da window?
também estou tentando mudar o msg do dia, mais n to achando o lugar
info
Grupo: Campones
Registrado: 02/10/15
Posts: 92
Reputação: +18

Procurei por partes iguais do Entergame, mas não achei, somente a jenela, sem parte de tamanho e tal.
info
Grupo: Herói
Registrado: 25/10/11
Posts: 2.2k
Reputação: +862
Gênero: Masculino
Char no Tibia: Sociopata

Tem sim haha
info
Grupo: Conde
Registrado: 12/04/15
Posts: 655
Reputação: +65
Gênero: Masculino
Char no Tibia: Developer Berg

Tem sim haha
poderia dizer onde que é que muda ?
info
Grupo: Campones
Registrado: 02/10/15
Posts: 92
Reputação: +18

Nos ajude mestre OVERLLORD




info
Grupo: Conde
Registrado: 12/04/15
Posts: 655
Reputação: +65
Gênero: Masculino
Char no Tibia: Developer Berg
eu fiz oque vc falou, e n funcionou, o entergame desapareceu '-' vou deixar print
olha a script ai de como ficou
EnterGameWindow < MainWindow size: 330 312 image-source: enter.png EnterGameButton < Button width: 64 ServerListButton < UIButton size: 17 17 image-source: /images/topbuttons/minimap image-color: #ffffffff $hover !disabled: image-color: #ffffff99 $pressed: image-color: #ffffff44 $disabled: image-color: #ffffff55 EnterGameWindow id: enterGame @onEnter: EnterGame.doLogin() MenuLabel !text: tr('Account name') anchors.left: parent.left anchors.top: parent.top text-auto-resize: true margin-top: 30 PasswordTextEdit id: accountNameTextEdit anchors.left: parent.left anchors.right: parent.right anchors.top: prev.bottom 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 id: serverLabel !text: tr('Server') anchors.left: prev.left anchors.top: prev.bottom margin-top: 8 text-auto-resize: true ServerListButton id: serverListButton !tooltip: tr('Server list') anchors.right: parent.right anchors.top: serverLabel.bottom margin-top: 3 @onClick: ServerList.show() TextEdit id: serverHostTextEdit !tooltip: tr('Make sure that your client uses\nthe correct game client version') anchors.left: parent.left anchors.right: serverListButton.left anchors.top: serverLabel.bottom margin-top: 2 margin-right: 4 MenuLabel id: clientLabel !text: tr('Client Version') anchors.left: parent.left anchors.top: serverHostTextEdit.bottom text-auto-resize: true margin-right: 10 margin-top: 8 ComboBox id: clientComboBox anchors.left: parent.left anchors.right: parent.horizontalCenter anchors.top: clientLabel.bottom margin-top: 2 margin-right: 3 width: 90 MenuLabel id: portLabel !text: tr('Port') anchors.left: serverPortTextEdit.left anchors.top: serverHostTextEdit.bottom margin-top: 8 text-auto-resize: true TextEdit id: serverPortTextEdit text: 7171 anchors.right: parent.right anchors.left: parent.horizontalCenter anchors.top: clientComboBox.top margin-left: 3 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: 10 @onCheckChange: self:getParent():getChildById('autoLoginBox'):setEnabled(self:isChecked()) CheckBox id: autoLoginBox enabled: false !text: tr('Auto login') !tooltip: tr('Open charlist automatically when starting client') anchors.left: parent.left anchors.right: parent.right anchors.top: prev.bottom margin-top: 2 EnterGameButton !text: tr('Ok') anchors.right: parent.right anchors.bottom: parent.bottom @onClick: EnterGame.doLogin() margin-right: 5 Label id: serverInfoLabel font: verdana-11px-rounded anchors.bottom: parent.bottom anchors.left: parent.left color: green text-auto-resize: true