mirror of
https://github.com/haven1433/HexManiacAdvance.git
synced 2026-05-19 19:58:04 -05:00
Adding a field `name|python=function` to a table will add a button to the table. Clicking the button will run a python function from `hma.py`. The function is expected to have one element, which will be the current selected element of the table as a `ModelArrayElement`. This python code still has access to the entire rom and the print() function. The button's text is based on the name of the field, and therefore cannot have a spaces or special characters, just letters / numbers. The button will get tooltip that is based on the comment of the chosen function.
7 lines
244 B
Python
7 lines
244 B
Python
|
|
# these fuctions are loaded automatically and are available
|
|
# from the python automation tool or python table buttons
|
|
|
|
# if running from a table button, the argument will be the
|
|
# current element in the current table as a ModelArrayElement
|