Must change UIMap class checks to UIGameMap.

master
BenDol 10 years ago
parent c083d02bef
commit 99b1ddf44c

@ -251,7 +251,7 @@ function onChooseItemMouseRelease(self, mousePosition, mouseButton)
if mouseButton == MouseLeftButton then if mouseButton == MouseLeftButton then
local clickedWidget = modules.game_interface.getRootPanel():recursiveGetChildByPos(mousePosition, false) local clickedWidget = modules.game_interface.getRootPanel():recursiveGetChildByPos(mousePosition, false)
if clickedWidget then if clickedWidget then
if clickedWidget:getClassName() == 'UIMap' then if clickedWidget:getClassName() == 'UIGameMap' then
local tile = clickedWidget:getTile(mousePosition) local tile = clickedWidget:getTile(mousePosition)
if tile then if tile then
local thing = tile:getTopMoveThing() local thing = tile:getTopMoveThing()

@ -351,7 +351,7 @@ function onMouseGrabberRelease(self, mousePosition, mouseButton)
end end
function onUseWith(clickedWidget, mousePosition) function onUseWith(clickedWidget, mousePosition)
if clickedWidget:getClassName() == 'UIMap' then if clickedWidget:getClassName() == 'UIGameMap' then
local tile = clickedWidget:getTile(mousePosition) local tile = clickedWidget:getTile(mousePosition)
if tile then if tile then
if selectedThing:isFluidContainer() then if selectedThing:isFluidContainer() then
@ -371,7 +371,7 @@ function onUseWith(clickedWidget, mousePosition)
end end
function onTradeWith(clickedWidget, mousePosition) function onTradeWith(clickedWidget, mousePosition)
if clickedWidget:getClassName() == 'UIMap' then if clickedWidget:getClassName() == 'UIGameMap' then
local tile = clickedWidget:getTile(mousePosition) local tile = clickedWidget:getTile(mousePosition)
if tile then if tile then
g_game.requestTrade(selectedThing, tile:getTopCreature()) g_game.requestTrade(selectedThing, tile:getTopCreature())

@ -57,7 +57,7 @@ function UIItem:onHoverChange(hovered)
local draggingWidget = g_ui.getDraggingWidget() local draggingWidget = g_ui.getDraggingWidget()
if draggingWidget and self ~= draggingWidget then if draggingWidget and self ~= draggingWidget then
local gotMap = draggingWidget:getClassName() == 'UIMap' local gotMap = draggingWidget:getClassName() == 'UIGameMap'
local gotItem = draggingWidget:getClassName() == 'UIItem' and not draggingWidget:isVirtual() local gotItem = draggingWidget:getClassName() == 'UIItem' and not draggingWidget:isVirtual()
if hovered and (gotItem or gotMap) then if hovered and (gotItem or gotMap) then
self:setBorderWidth(1) self:setBorderWidth(1)

Loading…
Cancel
Save