OMG the chat is finally scrolling!

* implement UIScrollArea
* rework console to allow scrolling
* many core ui changes in the way.. so maybe we will have new bugs
* fix in UIScrollBar
This commit is contained in:
Eduardo Bart
2012-03-25 14:10:19 -03:00
parent 179e53bb77
commit ccf55132a1
18 changed files with 200 additions and 72 deletions

View File

@@ -57,23 +57,19 @@ function UIGameMap:onDrop(widget, mousePos)
return true
end
function UIGameMap:onClick(mousePosition)
local tile = self:getTile(mousePosition)
if tile == nil then return false end
local dirs = g_map.findPath(g_game.getLocalPlayer():getPosition(), tile:getPosition(), 255)
if #dirs == 0 then
TextMessage.displayStatus('There is no way.')
return true
end
g_game.autoWalk(dirs)
return true
end
function UIGameMap:onMouseRelease(mousePosition, mouseButton)
local tile = self:getTile(mousePosition)
if tile == nil then return false end
if GameInterface.processMouseAction(mousePosition, mouseButton, nil, tile:getTopLookThing(), tile:getTopUseThing(), tile:getTopCreature(), tile:getTopMultiUseThing()) then
return true
elseif mouseButton == MouseLeftButton and self:isPressed() then
local dirs = g_map.findPath(g_game.getLocalPlayer():getPosition(), tile:getPosition(), 255)
if #dirs == 0 then
TextMessage.displayStatus('There is no way.')
return true
end
g_game.autoWalk(dirs)
return true
end
return false
end