Code: Select all
commands.add_command('debug_gui', '', function(data)
local player = game.get_player(data.player_index)
local frame = player.gui.screen.add {
type = 'frame'
}
frame.force_auto_center()
local flow = frame.add {
type = 'flow',
direction = 'horizontal'
}
flow.style.padding = 0
local button = flow.add {
type = 'sprite-button',
style = 'tool_button',
sprite = 'utility/shuffle'
}
button.style.margin = 0
local list_box_item = flow.add {
type = 'button',
style = 'list_box_item',
caption = 'list box item caption'
}
list_box_item.style.margin = 0
end)
Many thanks in advance!