mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
Some more UI updates and fixes.
* Added UICreatureButton class for handling/replacing "battle buttons" (can now be used in other modules). * Added the ability to use items on creatures via the battle window. * Some minor cosmetics.
This commit is contained in:
@@ -182,6 +182,11 @@ function onUseWith(clickedWidget, mousePosition)
|
||||
end
|
||||
elseif clickedWidget:getClassName() == 'UIItem' and not clickedWidget:isVirtual() then
|
||||
g_game.useWith(selectedThing, clickedWidget:getItem())
|
||||
elseif clickedWidget:getClassName() == 'UICreatureButton' then
|
||||
local creature = clickedWidget:getCreature()
|
||||
if creature then
|
||||
g_game.useWith(selectedThing, creature)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user