Fixed issue #24

This commit is contained in:
Henrique Santiago 2012-08-20 20:56:16 -03:00
parent ddd3f84ad7
commit 4caf5bfcac
5 changed files with 17 additions and 1 deletions

View File

@ -49,6 +49,9 @@ function init()
mouseWidget:setVisible(false) mouseWidget:setVisible(false)
mouseWidget:setFocusable(false) mouseWidget:setFocusable(false)
battleWindow:setContentMinimumHeight(56)
battleWindow:setContentMaximumHeight(384)
connect(Creature, { onSkullChange = checkCreatureSkull, connect(Creature, { onSkullChange = checkCreatureSkull,
onEmblemChange = checkCreatureEmblem, onEmblemChange = checkCreatureEmblem,
onHealthPercentChange = onCreatureHealthPercentChange, onHealthPercentChange = onCreatureHealthPercentChange,

View File

@ -93,7 +93,11 @@ function onContainerOpen(container, previousContainer)
local cellSize = layout:getCellSize() local cellSize = layout:getCellSize()
containerWindow:setContentMinimumHeight(cellSize.height*1) containerWindow:setContentMinimumHeight(cellSize.height*1)
containerWindow:setContentMaximumHeight(cellSize.height*layout:getNumLines()) containerWindow:setContentMaximumHeight(cellSize.height*layout:getNumLines())
containerWindow:setContentHeight(3*cellSize.height/2)
if not previousContainer then
local filledLines = math.max(math.ceil(container:getItemsCount() / layout:getNumColumns()), 1)
containerWindow:setContentHeight(filledLines*cellSize.height)
end
end end
function onContainerClose(container) function onContainerClose(container)

View File

@ -25,6 +25,8 @@ function init()
minimapButton:setOn(true) minimapButton:setOn(true)
minimapWindow = g_ui.loadUI('minimap.otui', modules.game_interface.getRightPanel()) minimapWindow = g_ui.loadUI('minimap.otui', modules.game_interface.getRightPanel())
minimapWindow:setContentMinimumHeight(64)
minimapWindow:setContentMaximumHeight(256)
minimapWidget = minimapWindow:recursiveGetChildById('minimap') minimapWidget = minimapWindow:recursiveGetChildById('minimap')
g_mouse.bindAutoPress(minimapWidget, compassClick, nil, MouseRightButton) g_mouse.bindAutoPress(minimapWidget, compassClick, nil, MouseRightButton)

View File

@ -164,6 +164,10 @@ function refresh()
end end
update() update()
local contentsPanel = skillsWindow:getChildById('contentsPanel')
skillsWindow:setContentMinimumHeight(44)
skillsWindow:setContentMaximumHeight(contentsPanel:getChildrenRect().height)
end end
function toggle() function toggle()

View File

@ -32,6 +32,9 @@ function refresh()
for id,vip in pairs(g_game.getVips()) do for id,vip in pairs(g_game.getVips()) do
onAddVip(id, unpack(vip)) onAddVip(id, unpack(vip))
end end
vipWindow:setContentMinimumHeight(38)
vipWindow:setContentMaximumHeight(256)
end end
function clear() function clear()