examples/inventory: keep focus on main menu if the source is a pointer
This commit is contained in:
parent
3339e675d3
commit
2462b29ea3
1 changed files with 4 additions and 1 deletions
|
@ -93,8 +93,11 @@ function InventoryWidget:new(scene, menu, newmenu, fullname)
|
||||||
InventoryWidget.super.new(self, widgetmenu, font, fullname)
|
InventoryWidget.super.new(self, widgetmenu, font, fullname)
|
||||||
end
|
end
|
||||||
|
|
||||||
function InventoryWidget:action()
|
function InventoryWidget:action(source)
|
||||||
self.scene.menusystem:switchMenu(self.newmenu)
|
self.scene.menusystem:switchMenu(self.newmenu)
|
||||||
|
if (source == "pointer") then
|
||||||
|
self.scene.menusystem.menus["main"]:getFocus()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Scene widget :: switch scene
|
-- Scene widget :: switch scene
|
||||||
|
|
Loading…
Reference in a new issue