diff --git a/data/locales/pt.lua b/data/locales/pt.lua index bd9226ea..1cc91f03 100644 --- a/data/locales/pt.lua +++ b/data/locales/pt.lua @@ -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", diff --git a/modules/corelib/ui/uiminiwindow.lua b/modules/corelib/ui/uiminiwindow.lua index fc9310b3..785a52be 100644 --- a/modules/corelib/ui/uiminiwindow.lua +++ b/modules/corelib/ui/uiminiwindow.lua @@ -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 diff --git a/modules/corelib/ui/uiscrollarea.lua b/modules/corelib/ui/uiscrollarea.lua index e63f4a36..d45f692d 100644 --- a/modules/corelib/ui/uiscrollarea.lua +++ b/modules/corelib/ui/uiscrollarea.lua @@ -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) diff --git a/modules/gamelib/protocollogin.lua b/modules/gamelib/protocollogin.lua index a65c5ec3..8d03b615 100644 --- a/modules/gamelib/protocollogin.lua +++ b/modules/gamelib/protocollogin.lua @@ -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) diff --git a/src/framework/luafunctions.cpp b/src/framework/luafunctions.cpp index ed14348c..32d4df73 100644 --- a/src/framework/luafunctions.cpp +++ b/src/framework/luafunctions.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include