Pui2Canvas Maintenance Guide

From FlightGear wiki
Jump to navigation Jump to search
WIP.png Work in progress
This article or section will be worked on in the upcoming hours or days.
See history for the latest developments.

This article is a summary of the steps/pointers needed to successfully parse and re-interpret a subset of PropertyList XML File using Nasal scripting and the Canvas system:

Background and Motivation

See:

XML processing

XML processing can be done via io.nas - however, strictly speaking, it's not needed because the Nasal library/props module can transparently load an XML file from the base package and return it as a hash, so that you don't have to do any XML handling at all.

Creating a Canvas

It's best to look at Canvas Snippets and see how easy it is to create a new Canvas from scratch.

Creating Popups

See Tooltips

Using Canvas Layouts

For now, please look at Canvas Layout System

Event Handling

For event handling purposes, there's Canvas Event Handling

Existing Widgets

See Canvas Widget Matrix

Creating new Widgets

See Howto:Creating a Canvas GUI Widget

Related

References