* fix viplist
* fix skills update
* fix mouse grabber
* minimize send interval
* add api to get world name
This commit is contained in:
Eduardo Bart
2012-03-29 16:25:04 -03:00
parent 47e7eef716
commit a475384b73
9 changed files with 25 additions and 27 deletions

View File

@@ -40,7 +40,7 @@ local function tryLogin(charInfo, tries)
CharacterList.destroyLoadBox()
g_game.loginWorld(EnterGame.account, EnterGame.password, charInfo.worldHost, charInfo.worldPort, charInfo.characterName)
g_game.loginWorld(EnterGame.account, EnterGame.password, charInfo.worldName, charInfo.worldHost, charInfo.worldPort, charInfo.characterName)
loadBox = displayCancelBox('Please wait', 'Connecting to game server...')
connect(loadBox, { onCancel = function()

View File

@@ -7,7 +7,7 @@ local gameRightPanel
local gameLeftPanel
local gameBottomPanel
local logoutButton
local m_mouseGrabberWidget
local mouseGrabberWidget
function GameInterface.init()
connect(g_game, { onGameStart = GameInterface.show }, true)
@@ -17,9 +17,9 @@ function GameInterface.init()
gameRootPanel:hide()
gameRootPanel:lower()
m_mouseGrabberWidget = gameRootPanel:getChildById('mouseGrabber')
connect(m_mouseGrabberWidget, { onMouseRelease = GameInterface.onUseWithMouseRelease })
mouseGrabberWidget = gameRootPanel:getChildById('mouseGrabber')
mouseGrabberWidget.onMouseRelease = GameInterface.onUseWithMouseRelease
gameMapPanel = gameRootPanel:getChildById('gameMapPanel')
gameRightPanel = gameRootPanel:getChildById('gameRightPanel')
gameLeftPanel = gameRootPanel:getChildById('gameLeftPanel')
@@ -60,7 +60,6 @@ end
function GameInterface.terminate()
disconnect(g_game, { onGameStart = GameInterface.show })
disconnect(g_game, { onGameEnd = GameInterface.hide })
disconnect(m_mouseGrabberWidget, { onMouseRelease = onUseWithMouseRelease })
logoutButton:destroy()
logoutButton = nil
@@ -70,9 +69,8 @@ function GameInterface.terminate()
gameRightPanel = nil
gameLeftPanel = nil
gameBottomPanel = nil
mouseGrabberWidget = nil
GameInterface = nil
m_mouseGrabberWidget:destroy()
m_mouseGrabberWidget = nil
end
function GameInterface.show()
@@ -128,7 +126,7 @@ end
function GameInterface.startUseWith(thing)
GameInterface.selectedThing = thing
m_mouseGrabberWidget:grabMouse()
mouseGrabberWidget:grabMouse()
Mouse.setTargetCursor()
end

View File

@@ -20,23 +20,17 @@ end
local function setSkillValue(id, value)
local skill = skillsWindow:recursiveGetChildById(id)
if skill then
local widget = skill:getChildById('value')
widget:setText(value)
end
local widget = skill:getChildById('value')
widget:setText(value)
end
local function setSkillPercent(id, percent, tooltip)
local skill = skillsWindow:recursiveGetChildById(id)
local widget = skill:getChildById('percent')
widget:setPercent(percent)
if skill then
local widget = skill:getChildById('percent')
widget:setPercent(percent)
if tooltip then
widget:setTooltip(tooltip)
end
if tooltip then
widget:setTooltip(tooltip)
end
end

View File

@@ -101,7 +101,7 @@ function VipList.onAddVip(id, name, online)
end
function VipList.onVipStateChange(id, online)
local vipList = vipWindow:getChildById('vipList')
local vipList = vipWindow:getChildById('contentsPanel')
local label = vipList:getChildById('vip' .. id)
local text = label:getText()
vipList:removeChild(label)