Yeah, that is very easy to do and will take only 15-20 lines of Nasal code.
Actually, you can ignore your current MFD instrument and the code you have, because it's totally irrelevant what you add to a Canvas.
Even adding another canvas to a Canvas can be done via the Canvas.Image API. That way, an embedded Canvas can be easily shown, because it's just treated as a conventional raster image:
Thus, you can simply refer to the
Canvas Snippets article and look up the two snippets that you need, namely:
- one for adding buttons to a Canvas GUI dialog
- one for adding raster images
Depending on what you have in mind, it would probably suffice to simply use the Canvas snippets for buttons, and then just change the background image of the button or label according to your requirements. That way, you can have the exact same fancy "widgets" that the FSX screenshot is using.
Alternatively, you could also take screenshots of your MCP and create a simple texture map for the various states that you'd like to see supported - that way, you can simply change the texture lookup coordinates to change the state of the MCP shown below the actual MFD.
Anyway, you will probably want to structure your code so that it can work for different displays.
http://wiki.flightgear.org/Canvas_Snipp ... Layouts.29For the embedded Canvas, refer to this:
http://wiki.flightgear.org/Canvas_Snipp ... ter_Imageshttp://wiki.flightgear.org/Canvas_Imagehttp://wiki.flightgear.org/Howto:Using_ ... d_canvasesFeel free to get in touch if anything is missing - but actually this stuff is there for a reason, so if you do think something is missing, please also add the corresponding findings (and code snippets/screenshots) to the wiki - because that is why we created these articles originally.