1
0
Fork 0

Docs/README.add-ons: add documentation for addons.Addon.resourcePath()

This commit is contained in:
Florent Rougon 2018-01-10 14:13:25 +01:00
parent ab8774a3e0
commit acd54efff7

View file

@ -547,6 +547,21 @@ Read-only data members (attributes) of addons.Addon objects:
loadSequenceNumber 0 for the first registered add-on, 1 for the
second one, etc. (integer)
Member functions (methods) of addons.Addon objects:
resourcePath(string relPath) -> string
Return a resource path suitable for use with the
simgear::ResourceManager. 'relPath' must be
relative to the add-on base directory, and
mustn't start with a '/'. You should use this
method to load for instance a property-rule
configuration file, or an image to display in a
Canvas widget.
In you want a full path to the resource file
(e.g., for troubleshooting), call resolvepath()
with the return value of addons.Addon.resourcePath().
Read-only data members (attributes) of addons.AddonVersion objects:
majorNumber non-negative integer