Merge pull request #176 from Quintinon/master

Minor Tweaks to UI and Fixed an error in NPC Trade
master
Ben Dol 11 years ago
commit 493202afcf

@ -4,8 +4,12 @@ local exitWindow
local exitButton
function Exit.init()
if not g_game.isOnline() then
exitButton = TopMenu.addRightButton('exitButton', tr('Exit Client'), 'exit.png', Exit.tryExit)
exitButton = TopMenu.addRightButton('exitButton', tr('Exit Client'), 'exit.png', Exit.tryExit)
if g_game.isOnline() then
exitButton:hide()
else
exitButton:show()
end
connect(g_game, {

@ -15,6 +15,17 @@ MiniWindow < UIMiniWindow
$on:
image-border-bottom: 2
UIWidget
id: miniwindowTopBar
anchors.top: parent.top
anchors.right: parent.right
anchors.left: parent.left
margin-right: 3
margin-left: 3
margin-top: 3
size: 258 18
phantom: true
UIButton
id: closeButton
anchors.top: parent.top

@ -81,6 +81,15 @@ function UIMiniWindow:setup()
self:minimize()
end
end
self:getChildById('miniwindowTopBar').onDoubleClick =
function()
if self:isOn() then
self:maximize()
else
self:minimize()
end
end
local oldParent = self:getParent()

@ -376,7 +376,7 @@ function onOpenNpcTrade(items)
newItem.price = item[5]
table.insert(tradeItems[SELL], newItem)
else
error("server error: item name " .. item[1] .. " has neither buy or sell price.")
error("server error: item name " .. item[2] .. " has neither buy or sell price.")
end
end

@ -94,7 +94,7 @@ function onAddVip(id, name, state)
local nameLower = name:lower()
local childrenCount = vipList:getChildCount()
for i=1,childrenCount do
local child = vipList:getChildByIndex(i)
if state == VipState.Online and child.vipState ~= VipState.Online then

Loading…
Cancel
Save