examples/inventory: translate inventory
This commit is contained in:
parent
374ca29d3a
commit
a224021726
1 changed files with 9 additions and 7 deletions
|
@ -38,10 +38,10 @@ function Inventory:new()
|
|||
|
||||
|
||||
HListBox(self.menusystem, "main", 42, 32, 424-84, 32, 5)
|
||||
self:addSubMenu("weapon", "Weapons")
|
||||
self:addSubMenu("shield", "Shields")
|
||||
self:addSubMenu("stuff", "Stuff")
|
||||
ExitWidget(self, "main", "Exit")
|
||||
self:addSubMenu("weapon", "weapons")
|
||||
self:addSubMenu("shield", "shields")
|
||||
self:addSubMenu("stuff", "stuff")
|
||||
ExitWidget(self, "main", "exit")
|
||||
|
||||
self:addItem("weapon", 3)
|
||||
self:addItem("weapon", 2)
|
||||
|
@ -89,7 +89,8 @@ function InventoryWidget:new(scene, menu, newmenu, fullname)
|
|||
local widgetmenu = self.scene.menusystem.menus[menu]
|
||||
local font = self.scene.assets.fonts["medium"]
|
||||
self.newmenu = newmenu
|
||||
InventoryWidget.super.new(self, widgetmenu, font, fullname)
|
||||
local label = core.lang:translate("inventory", fullname)
|
||||
InventoryWidget.super.new(self, widgetmenu, font, label)
|
||||
end
|
||||
|
||||
function InventoryWidget:action(source)
|
||||
|
@ -114,11 +115,12 @@ end
|
|||
|
||||
-- Exit widget
|
||||
|
||||
function ExitWidget:new(scene, menu, fullname)
|
||||
function ExitWidget:new(scene, menu)
|
||||
self.scene = scene
|
||||
local widgetmenu = self.scene.menusystem.menus[menu]
|
||||
local font = self.scene.assets.fonts["medium"]
|
||||
ExitWidget.super.new(self, widgetmenu, font, fullname)
|
||||
local label = core.lang:translate("commons", "exit")
|
||||
ExitWidget.super.new(self, widgetmenu, font, label)
|
||||
end
|
||||
|
||||
function ExitWidget:action(source)
|
||||
|
|
Loading…
Reference in a new issue