class_name
use this keyword right after extends
line, followed by your chosen name. From this moment on You will be able to see Your class among other nodes in editor, it will also be autocompleted when typing in editor. When You drag it into viewport or create it on run by code with .new()
, it will basically be the node You extend
ed it from with all your additional code.
If you modified exported buttons properties in editor and saved it as a scene, these changes will not be remembered by class script. Still You can just add your class script to the modifed button scene and save it again. From this moment on your other custom button classes can inherit from whole scene.