Fixes for last commit
This commit is contained in:
parent
c54cd1fdf1
commit
bb52608cda
|
@ -478,15 +478,15 @@ function onCreatureSpeak(name, level, speaktype, message, channelId, creaturePos
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function onOpenChannel(channelId, channelName)
|
function onOpenChannel(channelId, channelName)
|
||||||
addChannel(channelName, channelId)
|
addChannel(channelName, channelId)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function onOpenPrivateChannel(receiver)
|
function onOpenPrivateChannel(receiver)
|
||||||
addPrivateChannel(receiver)
|
addPrivateChannel(receiver)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function onOpenOwnPrivateChannel(channelId, channelName)
|
function onOpenOwnPrivateChannel(channelId, channelName)
|
||||||
local privateTab = getTab(channelName)
|
local privateTab = getTab(channelName)
|
||||||
if privateTab == nil then
|
if privateTab == nil then
|
||||||
addChannel(channelName, channelId)
|
addChannel(channelName, channelId)
|
||||||
|
@ -494,7 +494,7 @@ local function onOpenOwnPrivateChannel(channelId, channelName)
|
||||||
ownPrivateName = channelName
|
ownPrivateName = channelName
|
||||||
end
|
end
|
||||||
|
|
||||||
local function onCloseChannel(channelId)
|
function onCloseChannel(channelId)
|
||||||
local channel = channels[channelId]
|
local channel = channels[channelId]
|
||||||
if channel then
|
if channel then
|
||||||
local tab = getTab(channel)
|
local tab = getTab(channel)
|
||||||
|
@ -507,7 +507,7 @@ local function onCloseChannel(channelId)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function doChannelListSubmit()
|
function doChannelListSubmit()
|
||||||
local channelListPanel = channelsWindow:getChildById('channelList')
|
local channelListPanel = channelsWindow:getChildById('channelList')
|
||||||
local openPrivateChannelWith = channelsWindow:getChildById('openPrivateChannelWith'):getText()
|
local openPrivateChannelWith = channelsWindow:getChildById('openPrivateChannelWith'):getText()
|
||||||
if openPrivateChannelWith ~= '' then
|
if openPrivateChannelWith ~= '' then
|
||||||
|
@ -525,7 +525,7 @@ local function doChannelListSubmit()
|
||||||
channelsWindow:destroy()
|
channelsWindow:destroy()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function onChannelList(channelList)
|
function onChannelList(channelList)
|
||||||
if channelsWindow then channelsWindow:destroy() end
|
if channelsWindow then channelsWindow:destroy() end
|
||||||
channelsWindow = g_ui.displayUI('channelswindow.otui')
|
channelsWindow = g_ui.displayUI('channelswindow.otui')
|
||||||
local channelListPanel = channelsWindow:getChildById('channelList')
|
local channelListPanel = channelsWindow:getChildById('channelList')
|
||||||
|
@ -549,7 +549,7 @@ local function onChannelList(channelList)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function onGameStart()
|
function onGameStart()
|
||||||
-- open last channels
|
-- open last channels
|
||||||
local player = g_game.getLocalPlayer()
|
local player = g_game.getLocalPlayer()
|
||||||
if(player) then
|
if(player) then
|
||||||
|
|
|
@ -90,22 +90,22 @@ local function onContainerOpen(container, previousContainer)
|
||||||
container.itemsPanel = containerPanel
|
container.itemsPanel = containerPanel
|
||||||
end
|
end
|
||||||
|
|
||||||
local function onContainerClose(container)
|
function onContainerClose(container)
|
||||||
if container.window then container.window:destroy() end
|
if container.window then container.window:destroy() end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function onContainerAddItem(container, slot, item)
|
function onContainerAddItem(container, slot, item)
|
||||||
if not container.window then return end
|
if not container.window then return end
|
||||||
refreshContainerItems(container)
|
refreshContainerItems(container)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function onContainerUpdateItem(container, slot, item, oldItem)
|
function onContainerUpdateItem(container, slot, item, oldItem)
|
||||||
if not container.window then return end
|
if not container.window then return end
|
||||||
local itemWidget = container.itemsPanel:getChildById('item' .. slot)
|
local itemWidget = container.itemsPanel:getChildById('item' .. slot)
|
||||||
itemWidget:setItem(item)
|
itemWidget:setItem(item)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function onContainerRemoveItem(container, slot, item)
|
function onContainerRemoveItem(container, slot, item)
|
||||||
if not container.window then return end
|
if not container.window then return end
|
||||||
refreshContainerItems(container)
|
refreshContainerItems(container)
|
||||||
end
|
end
|
||||||
|
|
|
@ -505,7 +505,7 @@ function getBottomPanel()
|
||||||
return gameBottomPanel
|
return gameBottomPanel
|
||||||
end
|
end
|
||||||
|
|
||||||
local function onLeftPanelVisibilityChange(leftPanel, visible)
|
function onLeftPanelVisibilityChange(leftPanel, visible)
|
||||||
if not visible then
|
if not visible then
|
||||||
local children = leftPanel:getChildren()
|
local children = leftPanel:getChildren()
|
||||||
for i=1,#children do
|
for i=1,#children do
|
||||||
|
|
Loading…
Reference in New Issue