This allows for more concise Python code and avoids constructing temporary pyKey objects in the engine. This API change is backwards incompatible, so I opted to make this a new method. I elected to not make ptGUIDialog a mapping type because controls can be fetched by both ID and tag, which are distinct values. It's better to be explicit in this case, IMO.
Further, I have applied the new methods to all Python code except for the KI (ki module and xOptionsMenu) because there are roughly 500 instances of the old junk in those files, and I'm getting tired.
This allows the scripter to avoid indirections through
ptKey
in their python code such that instead of writing something like:The following can be used:
This allows for more concise Python code and avoids constructing temporary
pyKey
objects in the engine. This API change is backwards incompatible, so I opted to make this a new method. I elected to not makeptGUIDialog
a mapping type because controls can be fetched by both ID and tag, which are distinct values. It's better to be explicit in this case, IMO.Further, I have applied the new methods to all Python code except for the KI (ki module and xOptionsMenu) because there are roughly 500 instances of the old junk in those files, and I'm getting tired.