Must change UIMap class checks to UIGameMap.

This commit is contained in:
BenDol 2014-06-07 05:05:57 +12:00
parent c083d02bef
commit 99b1ddf44c
3 changed files with 4 additions and 4 deletions

View File

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

View File

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

View File

@ -57,7 +57,7 @@ function UIItem:onHoverChange(hovered)
local draggingWidget = g_ui.getDraggingWidget()
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()
if hovered and (gotItem or gotMap) then
self:setBorderWidth(1)