Make a save current project file button in TD?

I edited an interface with UI editor, and want to make a button to save the current project file, how should I do it?

The projectClass has a “save()” function that you can call to save your project.

Do not forget to put the button in to momentary mode :slight_smile:

Good practive would be the following approach:
So now are, when releasing the button, if we are still inside. If not, do nothing. But yeah, advanced stuff :slight_smile:

def onOnToOff(panelValue):
	owner = panelValue.owner
	if not owner.panel.inside: return
1 Like