GUI functions/classes
The tiny pillow argument passed to your plugin's functions has a variable named gui which contains ready-made functions to speed up the plugin-making process. These functions are:
tpil.gui.carouselMenu(tpil:tinyPillow)A left-and-right scrollable menu that can show lots of text at once, as well as how many items are in the menu
tpil.gui.keyLegend(tpil:tinyPillow, legend:dict)A overlay for the UI that shows what each key does (that's why it's called a key legend)
For example, if you want to show the user that the key
leftis used to go back, you'd pass the dictionary{"left": "Go Back"}to thelegendparameter.
tpil.gui.setFloat(tpil:tinyPillow)Used to allow the user to set precise floats, editable by each place value.
This is depreciated - you shouldn't use this in your code unless absolutely necessary.
tpil.gui.slider(tpil:tinyPillow, caption:str)Used to enter numbers, from a specific range of numbers set by the kwargs
minimumandmaximum
tpil.gui.screenConsole(tpil:tinyPillow)Used as a terminal console, so you can add and clear text, etc.
Words do not wrap (because my code sucks)
Last updated