parent
911584e816
commit
4de5e45d52
@ -1,6 +1,6 @@
|
||||
Creature < UICreature
|
||||
size: 66 66
|
||||
creature-margin: 1
|
||||
padding: 1
|
||||
border-image:
|
||||
source: /core_styles/images/panel_flat.png
|
||||
border: 1
|
||||
|
@ -1,6 +1,6 @@
|
||||
Item < UIItem
|
||||
size: 34 34
|
||||
item margin: 1
|
||||
padding: 1
|
||||
border-image:
|
||||
source: /core_styles/images/panel_flat.png
|
||||
border: 1
|
||||
|
@ -1,26 +1,5 @@
|
||||
function UIMap:onMouseRelease(mousePos, mouseButton)
|
||||
local tile = self:getTile(mousePos)
|
||||
if not tile then return false end
|
||||
|
||||
local keyboardModifiers = g_window.getKeyboardModifiers()
|
||||
if not Options.classicControl then
|
||||
if keyboardModifiers == KeyboardNoModifier and mouseButton == MouseLeftButton then
|
||||
-- auto walk
|
||||
return true
|
||||
elseif keyboardModifiers == KeyboardNoModifier and mouseButton == MouseRightButton then
|
||||
Game.createThingMenu(mousePos, tile:getTopLookThing(), tile:getTopUseThing(), tile:getTopCreature())
|
||||
return true
|
||||
elseif keyboardModifiers == KeyboardShiftModifier and (mouseButton == MouseRightButton or mouseButton == MouseLeftButton) then
|
||||
Game.look(tile:getTopLookThing())
|
||||
return true
|
||||
elseif keyboardModifiers == KeyboardCtrlModifier and (mouseButton == MouseRightButton or mouseButton == MouseLeftButton) then
|
||||
Game.use(tile:getTopUseThing())
|
||||
return true
|
||||
elseif keyboardModifiers == KeyboardAltModifier and (mouseButton == MouseRightButton or mouseButton == MouseLeftButton) then
|
||||
Game.attack(tile:getTopCreature())
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
function UIMap:onMouseRelease(mousePosition, mouseButton)
|
||||
local tile = self:getTile(mousePosition)
|
||||
if tile and Game.processMouseAction(mousePosition, mouseButton, nil, tile:getTopLookThing(), tile:getTopUseThing(), tile:getTopCreature(), tile:getTopMultiUseThing()) then return true end
|
||||
return false
|
||||
end
|
||||
|
Loading…
Reference in new issue