Support to miniwindow margin, fix protocollogin connectCallback, pt translation

master
Henrique Santiago 11 years ago
parent eb46b96ffa
commit 46aa0c005f

@ -303,6 +303,7 @@ locale = {
["Send Message"] = "Enviar Mensagem",
["Send"] = "Enviar",
["Server List"] = "Lista de Servidores",
["Server list"] = "Lista de servidores",
["Server Log"] = "Registro do servidor",
["Server"] = "Servidor",
["Set Outfit"] = "Escolher Roupa",

@ -166,9 +166,10 @@ end
function UIMiniWindow:onDragLeave(droppedWidget, mousePos)
if self.movedWidget then
self.setMovedChildMargin(0)
self.setMovedChildMargin(self.movedOldMargin or 0)
self.movedWidget = nil
self.setMovedChildMargin = nil
self.movedOldMargin = nil
self.movedIndex = nil
end
@ -190,14 +191,16 @@ function UIMiniWindow:onDragMove(mousePos, mouseMoved)
end
if self.movedWidget then
self.setMovedChildMargin(0)
self.setMovedChildMargin(self.movedOldMargin or 0)
self.setMovedChildMargin = nil
end
if mousePos.y < childCenterY then
self.movedOldMargin = child:getMarginTop()
self.setMovedChildMargin = function(v) child:setMarginTop(v) end
self.movedIndex = 0
else
self.movedOldMargin = child:getMarginBottom()
self.setMovedChildMargin = function(v) child:setMarginBottom(v) end
self.movedIndex = 1
end
@ -209,7 +212,7 @@ function UIMiniWindow:onDragMove(mousePos, mouseMoved)
end
if not overAnyWidget and self.movedWidget then
self.setMovedChildMargin(0)
self.setMovedChildMargin(self.movedOldMargin or 0)
self.movedWidget = nil
end

@ -135,7 +135,7 @@ function UIScrollArea:ensureChildVisible(child)
if deltaY > 0 then
self.verticalScrollBar:increment(deltaY)
end
else
elseif self.horizontalScrollBar then
local deltaX = paddingRect.x - child:getX()
if deltaX > 0 then
self.horizontalScrollBar:decrement(deltaX)

@ -16,7 +16,7 @@ function ProtocolLogin:login(host, port, accountName, accountPassword)
self.accountName = accountName
self.accountPassword = accountPassword
self.connectCallback = sendLoginPacket
self.connectCallback = self.sendLoginPacket
self:connect(host, port)
end
@ -86,7 +86,8 @@ end
function ProtocolLogin:onConnect()
self.gotConnection = true
self:sendLoginPacket()
self:connectCallback()
self.connectCallback = nil
end
function ProtocolLogin:onRecv(msg)

@ -27,7 +27,6 @@
#include <framework/otml/otml.h>
#include <framework/core/modulemanager.h>
#include <framework/core/module.h>
#include <framework/sound/soundmanager.h>
#include <framework/util/crypt.h>
#include <framework/core/resourcemanager.h>
#include <framework/graphics/texturemanager.h>

Loading…
Cancel
Save