Must change UIMap class checks to UIGameMap.
This commit is contained in:
parent
c083d02bef
commit
99b1ddf44c
|
@ -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()
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue