- Joined
- Mar 17, 2008
- Messages
- 179
- Reaction score
- 116
- Points
- 43
- Location
- Southwest Pennsylginia
- Website
- sites.google.com
Yes. This is the code I used. It is based on the Atlantis source code. I called everything directly from clbk_VCredrawevent() though I should have made a separate function.
Code:
local left_selection = {
[AID_MFD1_LBUTTONS] = true,
[AID_MFD1_RBUTTONS] = true
}
if left_selection[id] then
local bt, side
local mfd = id - AID_MFD1_LBUTTONS and MFDID.LEFT
side = (id == AID_MFD1_LBUTTONS and 0 or 1)
local skp = oapi.get_sketchpad(surf)
skp:set_font(gfont)
skp:set_textcolor(_RGB(97,160,80))
skp:set_textalign(SKP.CENTER, SKP.BASELINE)
skp:set_backgroundmode(SKP.TRANSPARENT)
local y = 24
for bt = 0,5 do
local label = oapi.mfd_buttonlabel(MFDID.LEFT, bt + side * 6)
if label then
skp:text(15, y, label, #label)
end
y = y + 36.5
end
oapi.release_sketchpad(skp)
return true
end










