Changing the format for writing chain-calls for FormSpecs.
This commit is contained in:
@@ -40,24 +40,24 @@ local function getFormSpecString(self, playerName, isSelect)
|
||||
size = {x=21, y=12},
|
||||
})
|
||||
|
||||
listForm:
|
||||
list('current_player', 'main', 10.5, 6.5, 8, 4):
|
||||
scrollContainer(listFormItems, 0.5, 0.5, 9, 11, 'admin_commands:list_items', 'vertical'):
|
||||
scrollbar(10, 0.5, 0.25, 10, 'vertical', 'admin_commands:list_items', self:getContex(playerName, 'scroll'))
|
||||
listForm
|
||||
:list('current_player', 'main', 10.5, 6.5, 8, 4)
|
||||
:scrollContainer(listFormItems, 0.5, 0.5, 9, 11, 'admin_commands:list_items', 'vertical')
|
||||
:scrollbar(10, 0.5, 0.25, 10, 'vertical', 'admin_commands:list_items', self:getContex(playerName, 'scroll'))
|
||||
|
||||
if isSelect then
|
||||
---@type ItemStackString
|
||||
local item = self:getContex(playerName, 'select_item')
|
||||
local itemDef = core.registered_items[item]
|
||||
listForm:
|
||||
itemImage(11, 0.5, 2, 2, item):
|
||||
areaLabel(11, 4.5, 4, 1, 'Add to inventory:'):
|
||||
button(11, 5, 3, 1, 'admin_commands:list_add_item', '1'):
|
||||
button(14, 5,3, 1, 'admin_commands:list_add_item', ''..tostring(itemDef.stack_max)):
|
||||
areaLabel(14.5, 0.5, 6, 4,
|
||||
item..'\n\n'..
|
||||
itemDef._title..'\n'..
|
||||
itemDef._description)
|
||||
listForm
|
||||
:itemImage(11, 0.5, 2, 2, item)
|
||||
:areaLabel(11, 4.5, 4, 1, 'Add to inventory:')
|
||||
:button(11, 5, 3, 1, 'admin_commands:list_add_item', '1')
|
||||
:button(14, 5,3, 1, 'admin_commands:list_add_item', ''..tostring(itemDef.stack_max))
|
||||
:areaLabel(14.5, 0.5, 6, 4,
|
||||
item..'\n\n'..
|
||||
itemDef._title..'\n'..
|
||||
itemDef._description)
|
||||
end
|
||||
|
||||
return listForm:toString()
|
||||
|
||||
Reference in New Issue
Block a user