--[[
Name = Test1
Script = TestMFD1.cfg
Key = 0x16 ; 'U'
Persist = vessel
END_PARSE
--]]

-- global reference to vessel associated with MFD
vi = vessel.get_focusinterface()

-- the list of button labels
btn_label = {'BT1','BT2'}

-- table of button menu entries
btn_menu = {
  {l1='This is the first',l2='MFD button',sel='a'},
  {l1='This is the second',l2='MFD button',sel='b'}
}

-- callback function: button label for button 'bt' (>= 0)
function buttonlabel(bt)
  if bt < 2 then
    return btn_label[bt+1]
  end
  return nil
end

-- callback function: button menu entries
function buttonmenu()
  return btn_menu,2
end

-- callback function: update display
function update(skp)
  mfd:set_title(skp,'TestMFD1')
  return true
end
